I look at the sparkline documentation. I create a few small data sets.
x <- rnorm(100) y <- dnorm(seq(-3,3,length.out = 100)) h <- hist(x,plot = FALSE)$counts v <- seq(0,4*pi,length.out = 100)
I try some commands. They don’t work. I realise that because this is blogdown, my sparklines need to be wrapped inside a call to
frameWidget. I try the commands again. They appear to work. I upload the post. They no longer work. I remove the references to
frameWidget. I check the blogdown documentation. I create a custom footer. I add an
exclude_jquery parameter. I modify the YAML header to the post. I upload again. Do my sparklines work?
sparkline(x, type = 'box')becomes
sparkline(x, type = 'box', lineColor = 'black', boxFillColor = 'white', medianColor = 'black')becomes
sparkline(h, type = 'bar')becomes
sparkline(1:3, type = 'pie')becomes
sparkline(x[1:20], type = 'discrete')becomes
They are cute. I am pleased. But that was more work than it should have been. Sometimes I doubt my commitment to sparklines.