nutterb / pixiedust

Tables So Beautifully Fine-Tuned You Will Believe It's Magic.
180 stars 18 forks source link

attempt to apply a non-function #88

Closed verajosemanuel closed 7 years ago

verajosemanuel commented 7 years ago

Got a dataframe rendering ok with Rmarkdown and knitr::kable that is inside a Rmd file. (for this issue to be tested i'll use iris dataset) Displaying ok if executed from Rstudio server interface (web browser), but when rendered via command line:

rmarkdown::render('/home/user/R/report/index.Rmd')

Got an error on pixiedust line:

pixiedust::dust(iris)

Quitting from lines 151-152 (index.Rmd)
Error in getOption("viewer")(tmpfile) :
  attempt to apply non-function
nutterb commented 7 years ago

I have a theory that this is similar to #85. Try adding %>% print(asis = FALSE) %>% cat() to your code to produce your tables. The results= 'asis' option will be needed for the chunk. The upcoming update should give better options to control this

verajosemanuel commented 7 years ago

That did the trick! Thanks a lot

and thank you for an excellent package by the way

nutterb commented 7 years ago

print_dust_html and print_dust_markdown gain an interactive argument in the upcoming 0.8 release. They may also be controlled using options(pixie_interactive = TRUE)