5
我有一個非常長的「評論」欄的數據框。當我將它們顯示出來時,它們被分解成不同的塊,使得很難跨行讀取。是否可以更改R中的設置或修改對data.frame的調用以截斷特定長度的字符串?在查看數據框的內容時是否可以截斷輸出?
實例:3列數據幀我的屏幕上看到
data.frame(cbind(rep(1,5),rep(c("very very long obnoxious character string here" ,"dog","cat","dog",5)),rep(c("very very long obnoxious character string here" ,"dog","cat","dog",5))))
得到的數據幀:
X1 X2
1 1 very very long obnoxious character string here
2 1 dog
3 1 cat
4 1 dog
5 1 5
X3
1 very very long obnoxious character string here
2 dog
3 cat
4 dog
5 5
[與R中長串印刷dataframes]的可能重複( http://stackoverflow.com/questions/8343682/printing-dataframes-with-long-strings-in-r) – Andrie