看板 R_Language 關於我們 聯絡資訊
ctrl + y 可以刪除一整行,請將不需要的內容刪除 文章分類提示: - 問題: 當你想要問問題時,請使用這個類別。 建議先到 http://tinyurl.com/mnerchs 搜尋本板舊文。 - 討論: 當你自己已經有答案,但是也想聽聽版友意見時。 [問題類型]: 請把以下不需要的部份刪除 經驗諮詢(我想用R 連接某些資料庫,請問大家的經驗) [軟體熟悉度]: 請把以下不需要的部份刪除 使用者(已經有用R 做過不少作品) [問題敘述]: 請簡略描述你所要做的事情,或是這個程式的目的 各位前輩好, 小弟最近進行的計畫需要從R呼喚Fortran程式, 但是往往呼喚第一次時成功(因此Fortran程式本身應該沒問題), 再練續呼喚時Rstudio就會掛點直接要重開(R aborted), 請問這是否有可能是Rstudio容量或記憶體方面的問題, 要怎麼改善呢? 在使用比較簡易的程fortran式是可以呼喚很多次都沒問題, 放進Loop裡重複call也沒問題; 但換成較大的fortran subroutine時往往就只能成功一次。 謝謝! [程式範例]: 請把以下不需要的部份刪除 dyn.load("subroutine_1.dll") foo<-.Fortran("subroutine",x=as.double(x),y=as.double(y),......) 出現訊息: R enxounter a fatal error. The Session was terminated. [環境敘述]: R version 3.4.3 (2017-11-30) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default 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 [6] methods base other attached packages: [1] maxLik_1.3-4 miscTools_0.6-22 loaded via a namespace (and not attached): [1] zoo_1.8-0 minqa_1.2.4 MASS_7.3-47 [4] compiler_3.4.3 Matrix_1.2-12 sandwich_2.4-0 [7] tools_3.4.3 yaml_2.1.16 Rcpp_0.12.14 [10] splines_3.4.3 nlme_3.1-131 grid_3.4.3 [13] nloptr_1.0.4 lme4_1.1-15 lattice_0.20-35 [關鍵字]: Fortran -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.178.246 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1516701564.A.6A7.html
celestialgod: 除非你能把Fortran code也寫出來... 01/23 20:17
celestialgod: 不然板友也抓不了問題 01/23 20:17