rstudio cannot run knitr - r

I've updated RSTUDIO to 1.0.143 and now knitr will not work:
Beginning of messages:
evaluate 0.8 is required but 0.7 is available
htmltools 0.3.5 is required but 0.2.6 is available
jasonlite ...
base64encode ...
rprojroot 1.0 is not available
I have tried stuff like update.packages() update.packages("evaluate") install.packages("evalute") (which installs version 0.7) on a few repositories without luck. (Global.rstudio, USA (IA))
I don't understand the ecosystem and I'm not finding any useful info from knitr or rstudio websites - how to I proceed?
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] knitr_1.10.5

Related

Gurobi library does not load anymore [Windows]

As it didn't work, I reinstalled. But without success.
What do I miss?
install.packages('C:/gurobi800/win64/R/gurobi_8.0-0.zip', repos=NULL)
# package ‘gurobi’ successfully unpacked and MD5 sums checked
Sys.getenv()
# ...
# GRB_LICENSE_FILE C:\gurobi800\gurobi.lic
# GUROBI_HOME C:\gurobi800\win64
# ...
library("gurobi")
Error: package or namespace load failed for ‘gurobi’: package ‘gurobi’
was installed by an R version with different internals; it needs to be
reinstalled for use with this R version
From the DESCRIPTION in Gurobi's R folder:
Depends: slam (>= 0.1-9)
URL: http://www.gurobi.com
Built: R 3.4.0; x86_64-w64-mingw32; 2018-04-21 00:42:28 UTC; windows
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=German_Switzerland.1252 LC_CTYPE=German_Switzerland.1252 LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C LC_TIME=German_Switzerland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] slam_0.1-44
loaded via a namespace (and not attached):
[1] compiler_3.5.1 imsbasics_1.9.7 tools_3.5.1 yaml_2.1.19
It looks like you'll either need to go back to R 3.4.4 or get Gurobi >= 8.0.1; because a lot was changed under the hood in R moving from 3.4.4 to 3.5.0, binaries compiled for R versions < 3.5.0 will not work with R >= 3.5.0, so your Gurobi 8.0.0 will not work with your current installation of R.
Other Gurobi users have had this issue; see here, and more informatively, here:
The current Gurobi release 8.0.1 ships a R package for R 3.5.X
If you'd prefer to go to an older version of R rather than a newer version of Gurobi, you can get R 3.4.4 for Windows here.

RStudio crashes with call to getURL in RCurl

I am using the latest stable release of R (3.2.0) with RStudio (0.98.1103) on Mac OS 10.10.3.
When calling getURL from the RCurl package RStudio terminates with a fatal error.
This does not happen when using R from the command line, only in RStudio.
library("RCurl")
getURL("http://www.omegahat.org/RCurl/")
Checking the output of sessionInfo(), system.file(), and .libPaths() after library("RCurl") does indeed lead me to believe I am using the same version of R and RCurl in both scenarios.
Executing R from the command line:
> library("RCurl")
Loading required package: bitops
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)
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] RCurl_1.95-4.6 bitops_1.0-6
> system.file()
[1] "/Library/Frameworks/R.framework/Resources/library/base"
> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"
and then from inside RStudio:
> library("RCurl")
Loading required package: bitops
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)
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] RCurl_1.95-4.6 bitops_1.0-6
loaded via a namespace (and not attached):
[1] tools_3.2.0
> system.file()
[1] "/Library/Frameworks/R.framework/Resources/library/base"
> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"
Any help greatly appreciated.
This seems to have been fixed with upgrading to Mac OS 10.10.5, RStudio Version 0.99.489 and the latest R 3.2.3

Can't connect to a local database using Monetdb.R

I'm trying to set a local connection to a database using Monetdb.R, but for some reason it is not working. I'm using the latest version of monetdb (MonetDB5 64 bits "Jan2014-SP3", 2014-07-25 release) in a Windows 7.
Here it is a short reproducible example:
> library(MonetDB.R)
Carregando pacotes exigidos: DBI
Carregando pacotes exigidos: digest
> conn <- dbConnect(dbDriver("MonetDB"), "monetdb://localhost/demo")
Error in .mapiRead(con) : ERROR reading MAPI block header (0)
I haven't seen this error occuring with other users...
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252 LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MonetDB.R_0.9.4 digest_0.6.4 DBI_0.3.0
loaded via a namespace (and not attached):
[1] tools_3.1.1
MonetDB.R 0.9.5 has been released to CRAN. Windows binary distributions should be available shortly.

R language setting can't be change with "default writes" command on mac

I'm a mac user and want to change R locale to English.
I know defaults write should set R's locale on osx. But, strangely, the command doesn't work.
defaults write org.R-project.R force.LANG en_US.UTF-8
When I launch R by executing R.app, English messages are properly shown, but Terminal.app shows Japanese messages:
My Environment is as follows:
Mac OS 10.8.5
R version 3.0.1 (2013-05-16) -- "Good Sport" Platform: x86_64-apple-darwin10.8.0 (64-bit)
Result of sessionInfo() on Terminal:
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/C/ja_JP.UTF-8/ja_JP.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
On R.app:
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] caret_5.17-7 grid_3.0.1 kernlab_0.9-18 lattice_0.20-15
As #plannapus wrote, starting R with Language=en R works well in my environment. See here.
Thank you for your help.
edit (2013/11/8)
According to gentle community replies, there seems to be several solutions. As for me, both of these ways works well.
Launching R console with specifying language as Language=en R (already mentioned previous post)
Set environment variable by adding just one line Language=en R to ~/.Renviron

calling `file.show` on a directory causing crash

I called file.show on a variable that contained a path instead of a file and R crashed.
When I brought it back up, I tested
file.show("~")
And I get a consistent crash.
Can anyone confirm? I'm getting an issue on both R 3.0 and R 2.15.3
R 3.0 - hangs indefinitely
> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.8.8
R 2.15.3 - crashes and cannot gracefully abort
R version 2.15.3 (2013-03-01)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base

Resources