I'm trying to use Rcpp within a rmarkdown document and having some troubles. This is the error that I get:
'rcpp' is not recognized as an internal or external command,
operable program or batch file.
I tried this on Windows:
'rcpp' is not recognized as an internal or external command,
operable program or batch file.
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] drat_0.1.4 compiler_3.5.1 tools_3.5.1 yaml_2.2.0 knitr_1.21 xfun_0.4
and Linux:
/bin/sh: 1: rcpp: not found
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] drat_0.1.4 compiler_3.5.1 tools_3.5.1 yaml_2.2.0
Rcpp works outside rmarkdown code chunks:
> Rcpp::evalCpp("1+2")
[1] 3
Is this a bug is something wrong with my installations?