[問題] 如何安裝data.table 1.9.7?

作者: girl5566 (5566520)   2016-07-27 22:39:37
文章分類提示:
- 問題: 當你想要問問題時,請使用這個類別
[問題類型]:
程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
[軟體熟悉度]:
新手(沒寫過程式,R 是我的第一次)
[問題敘述]:
想嘗試利用fwrite 把大量的資料集較快速的寫成csv
但於安裝data. table 1.9.7
發生以下錯誤
* installing *source* package 'data.table' ...
** libs
Warning: 執行中命令 'make -f "Makevars" -f
"C:/PROGRA~1/R/R-33~1.1/etc/x64/Makeconf" -f
"C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="data.table.dll" WIN=64
TCLBIN=64 OBJECTS="assign.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o
fmelt.o forder.o frank.o fread.o fsort.o fwrite.o gsumm.o ijoin.o init.o
openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o
transpose.o uniqlist.o vecseq.o wrappers.o"' 已有狀態 127
ERROR: compilation failed for package 'data.table'
* removing 'C:/Users/YuTien/Documents/R/win-library/3.3/data.table'
* restoring previous 'C:/Users/YuTien/Documents/R/win-library/3.3/data.table'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l
"C:\Users\YuTien\Documents\R\win-library\3.3"
C:\Users\YuTien\AppData\Local\Temp\RtmpqgbnwA/downloaded_packages/data.table_1.9.7.tar.gz'
had status 1
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
http://tinyurl.com/huvhnvu
[程式範例]:
require(data.table) # v1.9.7
require(feather) # v0.0.0.9000
require(readr) # v0.2.2
DTn = function(N) data.table(
str1=sample(sprintf(“%010d”,sample(N,1e5,replace=TRUE)), N, replace=TRUE),
str2=sample(sprintf(“%09d”,sample(N,1e5,replace=TRUE)), N, replace=TRUE),
str3=sample(sapply(sample(2:30, 100, TRUE), function(n)
paste0(sample(LETTERS, n, TRUE), collapse=””)), N, TRUE),
str4=sprintf(“%05d”,sample(sample(1e5,50),N,TRUE)),
num1=sample(round(rnorm(1e6,mean=6.5,sd=15),2), N, replace=TRUE),
num2=sample(round(rnorm(1e6,mean=6.5,sd=15),10), N, replace=TRUE),
str5=sample(c(“Y”,”N”),N,TRUE),
str6=sample(c(“M”,”F”),N,TRUE),
int1=sample(ceiling(rexp(1e6)), N, replace=TRUE),
int2=sample(N,N,replace=TRUE)-N/2
)
set.seed(21)
DT = DTn(1e6)
Either ram disk :
setwd(“/dev/shm”)
or HDD/SDD :
setwd(“~”)
system.time(fwrite(DT,”fwrite.csv”))
[環境敘述]:
R3.3.1 Win 7 64bit
[關鍵字]:
選擇性,也許未來有用
作者: Wush978 (拒看低質媒體)   2016-07-28 09:09:00
有裝Rtools了嗎?
作者: f496328mm (為什麼會流淚)   2016-07-28 12:45:00
我當初直接更新就好了install.packages("data.table")看看是不是你要的

Links booklink

Contact Us: admin [ a t ] ucptt.com