Closed brimoran closed 7 years ago
Thanks for the bug report @brimoran. Can you please provide the steps you're using to load treemapify and check whether the G20 data frame is present? Also please provide the output of sessionInfo()
after loading treemapify. Thanks!
Hi David - first, thank you very much for this library, I very much prefer it to the other options for treemaps in R.
All I do to get the error is follow the first stage of your demo:
library(treemapify) kable(G20)
And then I get this output including the error:
library(treemapify) Loading required package: ggplot2 Loading required package: ggfittext Package treemapify 2.2.2 has been loaded!
kable(G20) Error in kable(G20) : could not find function "kable"
I was able to go through your demo by creating the dataset as a csv.
Here is the output from sessionInfo():
sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Sierra 10.12.3
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] treemapify_2.2.2 ggfittext_0.4 ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.10 grid_3.4.0 plyr_1.8.4 gtable_0.2.0 magrittr_1.5
[6] scales_0.4.1 stringi_1.1.5 reshape2_1.4.2 lazyeval_0.2.0 tools_3.4.0
[11] stringr_1.2.0 munsell_0.4.3 compiler_3.4.0 colorspace_1.3-2 tibble_1.3.0
I can see why this was ambiguous – kable
is a function from the knitr
package that renders the data frame as a markdown table. I've changed that part of the README to remove the visible kable
call and released the fix as version 2.2.3.
Just to make sure that everything is working as it should, could you load treemapify then type print(G20)
? It should print the G20 data frame. Thanks!
Ah! I didn't have knitr loaded I see. Great stuff.
When I installed treemapify it doesn't seem to contain the G20 dataset used in the example.