Skip to content
Wen-Tien Chang edited this page Aug 27, 2015 · 5 revisions

安裝失敗

http 404

Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
  1. 重開R session
  2. 檢查路徑是否正確(建議從說明網站複製貼上)
  3. 重跑
  4. 檢查網路
  5. 使用分流網站

下載錯誤

Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : 
  無法開啟連結
此外: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 14311899 != reported length 28526690
2: In unzip(zipname, exdir = dest) : 從 zip 檔案中解開 1 時發生錯誤
3: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
  無法開啟壓縮過的檔案 'DSC2015R/DESCRIPTION',可能的原因是 'No such file or directory'
  1. 重新執行source("http://140.112.170.196/R/init.R")

Error in install.packages : object 'pkgs.outdated' not found

  1. 重開rsession
  2. 依照安裝課程所需套件安裝套件

unable to move temporary installation

Warning in install.packages :
  unable to move temporary installation ‘C:\Program Files\R\R-3.2.0\library\file1c9813fd1157\DSC2015R’ to ‘C:\Program Files\R\R-3.2.0\library\DSC2015R’
The downloaded binary packages are in
	C:\Users\admin\AppData\Local\Temp\RtmpElKump\downloaded_packages
  1. 手動安裝
    1. 手動移除C:\Program Files\R\R-3.2.0\library\DSC2015R
    2. 手動解壓縮至C:\Program Files\R\R-3.2.0\library\DSC2015R

swirl 課程安裝失敗

Installing swirl course for R basic...

| Course installation failed.

Installing swirl course for R ETL

| Course installation failed.

Installing swirl course for R Visualization

| Course installation failed.

There were 27 warnings (use warnings() to see them)
  1. 請檢查warnings()

  2. 如果警告訊息為:

    1: In file.copy(path, get_swirl_option("courses_dir"), recursive = TRUE) :
      problem creating directory /usr/local/lib/R/site-library/DSC2015R/basic/swirl/DSC2015/R_Basic_Part_5-For: Permission denied
    

重新安裝swirl

  1. install.packages('swirl', repos = 'http://taiwanrusergroup.github.io/R')
  2. DSC2015R::install_course()

更改課程安裝目錄

也可以透過更改swirl的courses_dir來解決。例如:

swirl::set_swirl_options(courses_dir = getwd())
DSC2015R::install_course()

套件載入錯誤

library(DSC2015R)
Loading required package: dplyr
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
無法載入共享物件 '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/dplyr/libs/dplyr.so' :
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/dplyr/libs/dplyr.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/dplyr/libs/dplyr.so
Reason: image not found
錯誤: package ‘dplyr’ could not be loaded
  1. 可使用install.packages('dplyr', repos = 'http://taiwanrusergroup.github.io/R', type = 'source')自行編譯

課程名稱過多或過少

請執行:

packageVersion("DSC2015R") # 確認版本是 1.0 或以上
swirl::uninstall_all_courses()
DSC2015R::install_course()

Crash

  1. 如果是mac,可以先執行install.packages('dplyr', repos = 'http://taiwanrusergroup.github.io/R', type = 'source')後再嘗試載入DSC2015R

RStudio (Mac) 無法顯示中文

在 Terminal 裡面輸入defaults write org.R-project.R force.LANG en_US.UTF-8,然後重開 RStudio

出處: Internationalization of the R.app