2016-08-12 43 views
0

下載swirl包,下載的所有壓縮成ZIP文件,但運行命令時,將它解壓縮在R,它顯示了以下味精解壓漩渦加載問題

install_course_zip("~/Downloads/swirl_courses-master.zip", multi=TRUE, which_course="R Programming") 

錯誤(路徑,列表= TRUE):zip文件 'C:/Users/sony/Documents/Downloads/swirl_courses-master.zip' 不能是 打開

+0

'〜//Downloads/swirl_courses-master.zip'是一個unix路徑,不確定window是否會以相同的方式解釋它。你*在窗戶上,不是嗎?否則,zip命令正在接收錯誤的路徑。而在Unix上,「文檔」和「下載」處於同一水平。 – jcoppens

+0

我只使用Windows,現在該如何進行? –

+0

它已經有一段時間了,但你通常可以直接從R本身安裝R包。啓動R,然後在命令提示符處輸入'install.packages(「swirl」)'。 R應該照顧一切。你應該可以用兩條線啓動'旋流':庫(「旋流」)和 '旋流()' – jcoppens

回答

0

第一步驟(安裝R,和啓動R,當然後) :

> install.packages('swirl') 
--- Please select a CRAN mirror for use in this session --- 
trying URL ...Your selected CPAN mirror... 
Content type 'application/x-gzip' length 98565 bytes (96 KB) 
================================================== 
downloaded 96 KB 

* installing *source* package 'swirl' ... 
** package 'swirl' successfully unpacked and MD5 sums checked 
** R 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
* DONE (swirl) 

The downloaded source packages are in 
    '/tmp/RtmpUfIWep/downloaded_packages' 
Updating HTML index of packages in '.Library' 
Making 'packages.html' ... done 

請注意,在開始時,當被要求選擇CPAN鏡像時,應該出現一個圖形化菜單,您必須單擊選擇。

然後加載庫使用它的功能:

library(swirl) 

最後,安裝過程中(注:在此之前,不要啓動swirl()):

> install_from_swirl("R Programming") 
    |======================================================================| 100% 
| Course installed successfully! 

然後,啓動過程:

> swirl() 

| Welcome to swirl! Please sign in. If you've been here before, use the same 
| name as you did then. If you are new, call yourself something unique. 

What shall I call you? 

如果這些步驟中的任何一個(以及哪些)失敗,請告訴我。