Edy
September 25, 2020, 3:22pm
1
I made a dashboard with flexdashboard and after formatting, my notebook caused an error that is shown in the file attachment. I already tried to reinstall R, Rstudio, and the libraries and it continues to happen. I also tried to create a new project and run from zero again but without success. Can someone give me some advice about this problem?
I see some related discussion here
opened 12:07PM - 30 Nov 17 UTC
closed 01:18AM - 03 Jan 18 UTC
Thanks for providing a framework for dashboards! I played with the html widgets … example [here](https://beta.rstudioconnect.com/jjallaire/htmlwidgets-showcase-storyboard/) and tried to replace the MetricsGraphics one with an rgl one:
`library(rgl)`
`plot3d(mtcars$mpg, mtcars$disp, mtcars$hp,`
`xlab="miles per gallon", ylab="displacement", zlab="horse power", type="s", col=mtcars$cyl)`
`rglwidget()`
This code works in Rmarkdown or bookdown, but does not work within the flexdashboard. I get the error message given below (German machine). It would be nice if rgl could be used in a flexdashboard.
Best, Ulrike
Here is the error message:
"Error in validateCssUnit(sizeInfo$width) : CSS units must be a single-element numeric or character vector"
"Ruft auf: <Anonymous> ... <Anonymous> -> need_screenshot -> toHTML -> validateCssUnit"
Do you know what sizeInfo@width
might be causing this error? The issue above dealt with a htmlwidget.
Edy
September 25, 2020, 7:34pm
3
Curtis Kephart, many thanks for your guidance. I am a new user of R. I created the dashboard since the beginning of the coronavirus pandemic, and it always worked well ..... I have not introduced any recent changes that justify that error.
Edy
September 26, 2020, 7:07pm
4
The solution to the problem is:......
{r, echo=FALSE, fig.height = 4, dev = 'jpeg'}
1 Like
cderv
September 27, 2020, 5:34am
5
FWIW I think this is related to this issue :
opened 07:40AM - 26 Sep 20 UTC
closed 10:20AM - 05 Oct 20 UTC
By filing an issue to this repo, I promise that
- [x] I have fully read the i… ssue guide at https://yihui.org/issue/.
- [x] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('knitr')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('yihui/knitr')`.
- If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [x] I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
---
**NOTE**: this intermingles a couple of inter-related packages, I am submitting the issue to `knitr` first, as the issue producing the behaviour was tracked to the change in `knitr`.
Here is a simple Rmarkdown document example:
---
output:
flexdashboard::flex_dashboard:
theme: united
---
```{r main_index}
library(dygraphs)
lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths)
```
It works on knitr v1.29 but fails on knitr v1.30 with the following error:
> rmarkdown::render("index.Rmd")
processing file: index.Rmd
|........................................
ordinary text without R code
|.............................................................................................
Error in validateCssUnit(sizeInfo$width) :
CSS units must be a single-element numeric or character vector
Interestingly everything works if I manually revert this pull request in the newest knitr codebase: https://github.com/yihui/knitr/pull/1877
A fix will come soon.
2 Likes
system
Closed
October 4, 2020, 5:34am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.