2015-04-24 62 views
1

我已經下載了數據文件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命令提示符上。但它沒有得到正確的粘貼,並且在一條看起來沒有任何問題的特定線路上折斷。dput結構正常

+ "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, 

可能是什麼原因,我該如何解決這個問題?

+1

控制檯緩衝區大小的問題,我猜。 –

+0

我該如何解決它。我嘗試了一些互聯網搜索鏈接,但無法知道如何處理R提示。 – rnso

+1

也許使用'dget(「lookDATA.txt」)''。 –

回答

2

直接粘貼大dput()輸出可能會撞到控制檯緩衝區大小的牆上。一種方法是將dput()保存在文本文件中,然後使用功能dget()

通過上面的例子,這將導致:

dget("lookDATA.txt") 
+0

任何可以增加緩衝區大小以便粘貼更大結構的方法? – rnso

+0

我不確定。我剛剛檢查過,在運行在終端(GNOME終端3.6.2)和RStudio(0.98.1103)中的R(3.2.0)中都粘貼了'dput()'輸出。 –

+0

我運行Linux Debian的穩定與KDE的Konsole版本2.8.4 – rnso