Skip to content

Instantly share code, notes, and snippets.

@lazycipher
Created June 6, 2020 13:23
Show Gist options
  • Save lazycipher/76769ef1e2ca0e6cbf0d22f8669a9031 to your computer and use it in GitHub Desktop.
Save lazycipher/76769ef1e2ca0e6cbf0d22f8669a9031 to your computer and use it in GitHub Desktop.
knit-print-output
tests_run(filter = "knit")
[1] "knitting multiple animint plots in a single Rmd"
|.............. | 10%
ordinary text without R code
|............................ | 20%
label: safety (with options)
List of 1
$ echo: logi FALSE
|........................................... | 30%
ordinary text without R code
|......................................................... | 40%
label: plot-1-top
|....................................................................... | 50%
ordinary text without R code
|..................................................................................... | 60%
label: plot.1.bottom
|................................................................................................... | 70%
ordinary text without R code
|.................................................................................................................. | 80%
label: boring
|................................................................................................................................ | 90%
ordinary text without R code
|..............................................................................................................................................| 100%
label: breakpoints
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS index.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output index.html --email-obfuscation none --standalone --section-divs --template "C:\Users\imhim\Documents\R\win-library\4.0\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\imhim\AppData\Local\Temp\RtmpgHoa3W\rmarkdown-str3fac27a14de.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --lua-filter "C:/Users/imhim/Documents/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/imhim/Documents/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua"
-- 1. Failure: knit_print.animint renders five x axis titles (@test-renderer1-kn
`value.vec` not identical to `expected.vec`.
Modes: list, character
Length mismatch: comparison on first 0 components
-- 2. Failure: segments and breakpoints are rendered (@test-renderer1-knit-print
length(seg.list) not equal to 6.
1/1 mismatches
[1] 0 - 6 == -6
-- 3. Failure: segments and breakpoints are rendered (@test-renderer1-knit-print
length(break.list) not equal to 5.
1/1 mismatches
[1] 0 - 5 == -5
-- 4. Error: svg id property is unique (@test-renderer1-knit-print.R#39) ------
incorrect number of dimensions
Backtrace:
1. base::table(attr.mat["id", ])
-- 5. Error: (unknown) (@test-renderer1-knit-print.R#100) ---------------------
Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException
Further Details: run errorDetails method
Backtrace:
1. animint2:::get_elements("plot1top")
2. remDr$findElement("id", id)
3. RSelenium:::queryRD(...)
4. RSelenium:::checkStatus(resContent)
== testthat results ===========================================================
[ OK: 3 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 5 ]
1. Failure: knit_print.animint renders five x axis titles (@test-renderer1-knit-print.R#26)
2. Failure: segments and breakpoints are rendered (@test-renderer1-knit-print.R#31)
3. Failure: segments and breakpoints are rendered (@test-renderer1-knit-print.R#33)
4. Error: svg id property is unique (@test-renderer1-knit-print.R#39)
5. Error: (unknown) (@test-renderer1-knit-print.R#100)
Error: testthat unit tests failed
>
@lazycipher
Copy link
Author

Rendered UI from the above HTML Code:
screencapture-localhost-4848-animint-htmltest-2020-06-06-13_27_08

@lazycipher
Copy link
Author

sessionInfo() returns:

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_India.1252  LC_CTYPE=English_India.1252    LC_MONETARY=English_India.1252 LC_NUMERIC=C                  
[5] LC_TIME=English_India.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] knitr_1.28        XML_3.99-0.3      RSelenium_1.7.7   animint2_2020.3.2 testthat_2.3.2   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6     compiler_4.0.0   plyr_1.8.6       bitops_1.0-6     tools_4.0.0      pkgload_1.1.0    digest_0.6.25    jsonlite_1.6.1  
 [9] evaluate_0.14    lifecycle_0.2.0  gtable_0.3.0     rlang_0.4.6      cli_2.0.2        rstudioapi_0.11  curl_4.3         yaml_2.2.1      
[17] xfun_0.14        binman_0.1.1     stringr_1.4.0    withr_2.2.0      httr_1.4.1       xml2_1.3.2       desc_1.2.0       askpass_1.1     
[25] caTools_1.18.0   rappdirs_0.3.1   rprojroot_1.3-2  grid_4.0.0       glue_1.4.1       R6_2.4.1         processx_3.4.2   fansi_0.4.1     
[33] rmarkdown_2.2    RJSONIO_1.3-1.4  farver_2.0.3     semver_0.2.0     magrittr_1.5     backports_1.1.7  scales_1.1.1     ps_1.3.3        
[41] htmltools_0.4.0  assertthat_0.2.1 colorspace_1.4-1 labeling_0.3     stringi_1.4.6    openssl_1.4.1    munsell_0.5.0    crayon_1.3.4    
[49] wdman_0.2.5     
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment