Start with a dataframe
library(dplyr)
library(sparkline)
df <- data.frame(matrix(1:9, nrow = 3, ncol = 3))
   X1 X2 X3
1  1  4  7
2  2  5  8
3  3  6  9
Would like to add a column 'spark' for use with sparkline:
df <- df %>% mutate(spark = spk_chr(values = ?, type = "bar", elementId = X1))
So the question mark (?) would be replaced by a vector made up of each row of df.
For the first row, ? = c(1, 4, 7), the values from the first row, spark = spk(values = c(1, 4, 7)...)
I know how to extract a vector from any row, first row vector is unlist(df[1,]), but do not understand if this can be used in mutate.
