Skip to contents

Before anything else, try to restart the R session: * In R studio, on top go to “Session” * “Restart R”

Can not install the package

Note that in case you get the following error:

InternetOpenUrl failed: 'An error occurred in the secure channel support'

Enter the command:

setInternet2(TRUE)

Alternatively, you may add to .Rprofile or Rprofile.site the following line:

options(download.file.method = "wininet")

Unable to move temporary installation

One common errors during the package installation is linked to the antivirus “real time file system protection”. The following will fix the problem:

trace(utils:::unpackPkgZip, edit=TRUE)

Edit line 140:

Sys.sleep(0.5)

to:

Sys.sleep(2)

Error in strptime(xx, f, tz = tz) : unable to identify current timezone ‘C’: please set environment variable ‘TZ’

## enter this commaned to set up the time zone - you may change it to another anotherone.
Sys.setenv(TZ='GMT')
## Now you can check...
Sys.timezone()
Sys.getenv("TZ")

Error when building the dictionnary or configuration file

If you see this message (or similar error):

Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection

It is most likely because you have the form, dictionary or data set open in excel on your computer. Only a single session for that file is allowed in windos. If you close it and start over, the problem should be fixed.

Installing pacckage library on a one-drive folder

Installing your package library within your one drive synchronized folder can slow donw a lot your system.

As explained here: https://www.accelebrate.com/library/how-to-articles/r-rstudio-library, Go and edit to your Rprofile file by adding

my custom path

myPaths <- .libPaths() myPaths <- c(myPaths[2], myPaths[1]) # switch them myPaths <- c(myPaths, ‘C:’) # add new path .libPaths(myPaths) # reassign path