我有一份 701 的清单csv
文件。每个列都有相同的列数 (7),但行数不同(25000 到 28000 之间)。
这是第一个文件的摘录:
Date,Week,Week Day,Hour,Price,Volume,Sale/Purchase
18/03/2011,11,5,1,-3000.00,17416,Sell
18/03/2011,11,5,1,-1001.10,17427,Sell
18/03/2011,11,5,1,-1000.00,18055,Sell
18/03/2011,11,5,1,-500.10,18057,Sell
18/03/2011,11,5,1,-500.00,18064,Sell
18/03/2011,11,5,1,-400.10,18066,Sell
18/03/2011,11,5,1,-400.00,18066,Sell
18/03/2011,11,5,1,-300.10,18068,Sell
18/03/2011,11,5,1,-300.00,18118,Sell
现在我正在尝试绘制Volume
and Date
条件是Price
正是200.00
。然后我试图打开一个窗口,在其中我可以看到卷随时间的进展情况。
allenamen <- dir(pattern="*.csv")
alledat <- lapply(allenamen, read.csv, header = TRUE,
sep = ",", stringsAsFactors = FALSE)
verlauf <- function(a) {plot(Volume ~ Date, a,
data=subset(a, (Price=="200.00")),
ylim = c(15000, 45000),
xlim = as.Date(c("2011-12-30", "2013-01-20")), type = "l")}
lapply(alledat, verlauf)
但我收到这个错误:
error in strsplit(log, NULL): non-character argument
我怎样才能避免这个错误?