[問題] 跑模擬疑惑

看板R_Language作者 (sop)時間5年前 (2018/09/12 14:13), 5年前編輯推噓1(1015)
留言16則, 3人參與, 5年前最新討論串1/1
各位大大好, 近期survey一篇論文剛好有附完整Rcode 其有關衰退模型預測 https://www.tandfonline.com/doi/suppl/10.1080/00401706.2013.805661?scroll=top 備有多個子檔案, 請問該如何執行主程式並且跑模擬? 感謝 檢附 platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 5.1 year 2018 month 07 day 02 svn rev 74947 language R version.string R version 3.5.1 (2018-07-02) nickname Feather Spray ------------------------------------ R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese (Traditional)_Taiwan.950 [3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C [5] LC_TIME=Chinese (Traditional)_Taiwan.950 attached base packages: [1] splines stats graphics grDevices utils datasets methods base other attached packages: [1] fda_2.4.8 Matrix_1.2-14 loaded via a namespace (and not attached): [1] compiler_3.5.1 tools_3.5.1 grid_3.5.1 lattice_0.20-35 --------------- > version _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 4.3 year 2017 month 11 day 30 svn rev 73796 language R version.string R version 3.4.3 (2017-11-30) nickname Kite-Eating Tree > sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese (Traditional)_Taiwan.950 LC_MONETARY=Chinese (Traditional)_Taiwan.950 [4] LC_NUMERIC=C LC_TIME=Chinese (Traditional)_Taiwan.950 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.3 tools_3.4.3 照 HumuHumu大大說法 應該是先手動完套件再 install.packages("MSBVAR" ,repos = "https://cran.r-project.org/src/contrib/Archive/MSBVAR/MSBVAR_0.9-3.tar.gz") 應該就可以了? 為什麼還是有以下錯誤訊息 ?? Warning in install.packages : unable to access index for repository https://cran.r-project.org/src/contrib/Archive/MSBVAR/MSBVAR_0.9-3.tar.gz/src/contrib: cannot open URL 'https://cran.r-project.org/src/contrib/Archive/MSBVAR/MSBVAR_0.9-3.tar.gz/src/contrib/PACKAGES' Warning in install.packages : package ‘MSBVAR’ is not available (for R version 3.4.3) Warning in install.packages : unable to access index for repository https://cran.r-project.org/src/contrib/Archive/MSBVAR/MSBVAR_0.9-3.tar.gz/bin/windows/contrib/3.4: cannot open URL 'https://cran.r-project.org/src/contrib/Archive/MSBVAR/MSBVAR_0.9-3.tar.gz/bin/windows/contrib/3.4/PACKAGES' -----還好另外從GITHUB CLONE就搞定了 https://github.com/cran/MSBVAR -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.14.72 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1536732792.A.B68.html

09/12 14:51, 5年前 , 1F
ReadMe.txt寫得這麼清楚.. 檔名也很明顯啊...
09/12 14:51, 1F

09/12 17:49, 5年前 , 2F
1.下載R和Rstudio 2.安裝套件 3.打開.R檔 4.Ctrl+Alt+R
09/12 17:49, 2F

09/12 17:50, 5年前 , 3F
樓主可能是完全沒有用過R吧
09/12 17:50, 3F

09/13 01:16, 5年前 , 4F
不好意思 看過說明試過了
09/13 01:16, 4F

09/13 01:18, 5年前 , 5F
MSBVAR套件 不相容 3.5.1版本雖然找到之前版本 但仍裝不上
09/13 01:18, 5F

09/13 01:18, 5年前 , 6F
※ 編輯: sop317 (111.71.54.243), 09/13/2018 01:22:27

09/13 01:22, 5年前 , 7F
感謝大大
09/13 01:22, 7F
※ 編輯: sop317 (111.71.54.243), 09/13/2018 01:54:18

09/13 09:46, 5年前 , 8F
我R版本3.4.3手動安裝MSBVAR_0.9-3.tar.gz是可以的喔
09/13 09:46, 8F

09/13 09:46, 5年前 , 9F
只是要先自己安裝coda 和 mvtnorm兩個套件
09/13 09:46, 9F
※ 編輯: sop317 (140.112.14.72), 09/16/2018 11:28:51

09/16 11:32, 5年前 , 10F
再3.4.3版本下再裝fda,xtable,bit,coda,mvtnorm還是沒有用
09/16 11:32, 10F
※ 編輯: sop317 (140.112.14.72), 09/16/2018 11:35:39

09/16 14:58, 5年前 , 11F

09/16 14:59, 5年前 , 12F
d-i-deal-with-package-xxx-is-not-available-for-r-versi
09/16 14:59, 12F

09/16 14:59, 5年前 , 13F
on-x-y-z-wa
09/16 14:59, 13F

09/16 15:00, 5年前 , 14F
這篇方法試過 也是一樣
09/16 15:00, 14F
※ 編輯: sop317 (140.112.14.72), 09/17/2018 13:40:27

09/17 13:40, 5年前 , 15F
還好暫時解決了 感謝大大
09/17 13:40, 15F

09/18 16:15, 5年前 , 16F
有多裝Rtools是解決問題的關鍵
09/18 16:15, 16F
文章代碼(AID): #1RcAvuje (R_Language)