3

When I start R on my windows machine, I get below log. Why do i get 2 errors below? how could I debug them? Is the problem associated with packages Arules and Matrix? Why do I get this error only for these 2 packages? I also installed rest of the packages in the same location...

What does it mean when it says " The following objects are masked from ‘package:base’: "?

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)


R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

**Error installing package: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Error installing package: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.**

Loading required package: arules
Loading required package: Matrix

Attaching package: ‘arules’

The following objects are masked from ‘package:base’:

    %in%, write
user2543622
  • 5,760
  • 25
  • 91
  • 159
  • Not sure about the error, but it looks like the library `arules` overwrites the functions `%in%` and `write`. That's why you see them being masked. – Brandon Bertelsen Jul 25 '14 at 20:59

2 Answers2

1

This may be related to a space in the install location of R, which is not recommended see:

Error installing R Packages

Community
  • 1
  • 1
Ryan Horrisberger
  • 955
  • 11
  • 16
0

Did you just re-install R? It looks like it is complaining when it tries to reload an old .RData file and that is looking for something that no longer exists. It could also be a problem with spaces in file names. I typically override the default path and install R in a directory with no spaces in the path (typically C:\Apps\R\R-3.1.0 with Rtools in C:\Apps\R\Rtools). This makes batch scripts a lot less hassle...

jrminter
  • 318
  • 2
  • 7
  • I recently upgraded my Rstudio as I got a prompt to do so. Please let me know how do avoid such errors... – user2543622 Jul 27 '14 at 23:18
  • 1. From your example, R had loaded a workspace from ~/.RData. That is reloading an environment. RStudio can either store environments to this file by default or not. This is an easy way to get a contaminated environment. You could move this file to foo.RData and see if that makes a difference. 2. You can choose the directory to install R. The default is "C:\Program Files\R-3.1.0" (or other version). Sometimes spaces in these paths can cause problems if they aren't properly quoted. Notice your error message complained about "C:\Program"... That's why I create "C:\Apps" and install there... – jrminter Jul 28 '14 at 01:41