我有一些看起来如下的R代码:
missingDataJson <- toJSON(head(diff))
df <- data.frame(ValidationDate = startTime, DataType = "Panel", MissingData = missingDataJson, stringsAsFactors = F)
sqlSave(odsHandle, df, tablename = "Utility.DailyDataValidation", append=T)
数据框“df”如下所示:
df
ValidationDate DataType
1 2016-08-22 13:40:37 Panel
MissingData
1 {"SubId":[160822032032,160822032033,160822032034,160822032035,160822032036,160822032037],"ReadTime":[1471887657.787,1471887681.357,1471887705.023,1471887728.483,1471887752.273,1471887776.423]}
当我执行sqlSave时,收到以下错误消息:
Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, :
'Calloc' could not allocate memory (18446744071562067968 of 1 bytes)
In addition: Warning messages:
1: In odbcUpdate(channel, query, mydata, coldata[m, ], test = test, :
Reached total allocation of 16287Mb: see help(memory.size)
2: In odbcUpdate(channel, query, mydata, coldata[m, ], test = test, :
Reached total allocation of 16287Mb: see help(memory.size)
为什么要请求这么多内存?数据框的大小非常小。