[問題] 安裝RcppBDT遇到error

看板R_Language作者 (cywhale)時間10年前 (2015/12/29 15:00), 編輯推噓1(1010)
留言11則, 3人參與, 最新討論串1/1
文章分類提示: - 問題: 當你想要問問題時,請使用這個類別 安裝RcppBDT 直接用install.packages("RcppBDT") Version: 0.2.3 若用install_github("eddelbuettel/rcppbdt") Version: 0.2.3.2 但後者install_github 我在linux(centos)下有裝成功, 但在win7下安裝則會出現錯誤訊息: toPOSIXct.cpp: In function 'Rcpp::DatetimeVector cToPOSIXct(Rcpp::CharacterVector)': toPOSIXct.cpp:229:45: error: 'strptime' was not declared in this scope make: *** [toPOSIXct.o] Error 1 查不太到相關錯誤訊息,不知道有沒有辦法可以解此安裝上的問題,謝謝~~~ [環境敘述]: 請提供 sessionInfo() 的輸出結果, R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 [2] LC_CTYPE=Chinese (Traditional)_Taiwan.950 [3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Traditional)_Taiwan.950 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] RcppBDT_0.2.3 BH_1.60.0-1 devtools_1.9.1 loaded via a namespace (and not attached): [1] httr_1.0.0 R6_2.1.1 magrittr_1.5 tools_3.2.2 [5] curl_0.9.4 Rcpp_0.12.2 memoise_0.2.1 codetools_0.2-14 [9] stringi_1.0-1 stringr_1.0.0 digest_0.6.8 [關鍵字]: -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.65.48 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1451372409.A.D93.html

12/29 15:34, , 1F
windwos的Rtools裡面的library沒有strptime...
12/29 15:34, 1F

12/29 15:34, , 2F
似乎要有額外的函式庫
12/29 15:34, 2F

12/29 15:54, , 3F
稍微找了一下,cygwin可能有
12/29 15:54, 3F

12/29 15:54, , 4F
感謝C大,剛在原始碼的註解(最後一段)也看到這樣的說明
12/29 15:54, 4F

12/29 15:55, , 5F
https://goo.gl/R3OAYB TODO: make the R-internal
12/29 15:55, 5F

12/29 15:55, , 6F
TODO: make the R-internal strptime accessible...
12/29 15:55, 6F

12/29 16:13, , 7F
他可能會用Rcpp::Function strptime("strptime")...
12/29 16:13, 7F

12/29 16:14, , 8F
在windows編譯source code就有這種麻煩事情(嘆氣
12/29 16:14, 8F

12/29 20:17, , 9F
自己改一改後發個issue or PR 給Dirk 吧!
12/29 20:17, 9F

12/29 20:17, , 10F
Dirk 人很nice
12/29 20:17, 10F

12/29 21:44, , 11F
XDD ya.. it's also one solution..
12/29 21:44, 11F
文章代碼(AID): #1MWYzvsJ (R_Language)
文章代碼(AID): #1MWYzvsJ (R_Language)