2014-07-25 30 views
3

當我在Windows機器上啓動R時,出現日誌。爲什麼我會在下面得到2個錯誤?我怎麼能調試它們?問題與包裝Arules和Matrix有關嗎?爲什麼只有這兩個軟件包出現此錯誤?我還在同一位置安裝了其餘的軟件包...開始時出現R錯誤安裝包

當它說「以下對象從'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 
+0

不知道的錯誤,但它看起來像庫'arules'覆蓋函數'%in%'和'write'。這就是爲什麼你看到他們被掩蓋。 –

回答

0

剛剛重新安裝了R嗎?它似乎在嘗試重新加載舊的.RData文件時發出抱怨,並且正在尋找不再存在的內容。它也可能是文件名中空格的問題。我通常會覆蓋默認路徑並將R安裝在路徑中沒有空格的目錄中(通常爲C:\ Apps \ R \ R-3.1.0,其中包含C:\ Apps \ R \ Rtools中的Rtools)。這使得批處理腳本少了很多麻煩......

+0

我最近升級了我的Rstudio,因爲我得到了提示。請讓我知道如何避免這樣的錯誤... – user2543622

+0

1.在你的例子中,R從〜/ .RData加載了一個工作空間。這是重新加載一個環境。 RStudio可以將環境默認存儲到此文件或不存儲。這是獲得污染環境的簡單方法。你可以將這個文件移動到foo.RData,看看是否有所作爲。 2.您可以選擇要安裝的目錄R.默認爲「C:\ Program Files \ R-3.1.0」(或其他版本)。如果這些路徑中的空間沒有被正確引用,有時會導致問題。注意你的錯誤消息抱怨「C:\ Program」...這就是爲什麼我創建「C:\ Apps」並在那裏安裝... – jrminter