我正在使用R中的库bigchess
来读取3GB PGN文件,请参见此处的源代码:https://github.com/rosawojciech/bigchess
像这样阅读它:
df <- read.pgn(paste0(path, file), add.tags = c("UTCDate", "UTCTime", "WhiteElo", "BlackElo", "WhiteRatingDiff", "BlackRatingDiff", "WhiteTitle", "BlackTitle","TimeControl", "Termination"), n.moves = T, extract.moves = -1, stat.moves = T, big.mode = F, quiet = F, ignore.other.games = F)
我收到以下错误-
“粘贴错误(subset(r2,tmp1 ==“ Movetext”,select = c(tmp2))[,1], :结果将超过2 ^ 31-1字节”
存在基于Internet的搜索,因为R无法在内存中存储大于2Gb的字符向量。有没有办法超越此限制,或者以其他方式解决问题?