我已下载此数据文件https://www.sugarsync.com/pf/D315881_05804680_037112(来自此问题:https://stats.stackexchange.com/questions/148065/what-do-the-the-lsmeans-from-lsmeans-package-in-r-represent-when-calculated-ov),其中包含dput输出并在geany文本编辑器中打开。从这里我复制了整个结构并尝试将其粘贴到R命令提示符下。但是它没有被正确地粘贴并在一条特定的线上打破,否则它似乎没有任何问题。
+ "120", "121", "122", "123", "124", "125", "126", "127", "128",
+ "129", "130", "131", "132", "133", "134", "136", "137", "139",
+ "201", "202", "203", "204", "205", "206", "207", "208", "209",
+ "211", "212", "213", "214", "215", "216", "217", "218", "219",
+ "220", "221", "222", "224", "225", "226", "227", "228", "229",
+ "230", "231", "232
+ "239", "240", "241"), class = "factor"), fixationImage = structu
Error: unexpected numeric constant in:
""230", "231", "232
"239"
> 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 5L, 6L, 7L,
Error: unexpected ',' in "2L,"
> 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L,
Error: unexpected ',' in "1L,"
> 6L, 7L, 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L,
Error: unexpected ',' in "6L,"
>
> 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L, 6L, 7L, 1L, 2L, 4L, 5L,
可能是什么原因以及如何解决这个问题?
答案 0 :(得分:2)
直接粘贴大dput()
输出可能会触及控制台缓冲区大小的墙。一种方法是将dput()
保存在文本文件中,然后使用函数dget()
。
通过上面的例子,这导致:
dget("lookDATA.txt")