2011-07-20 94 views
39

我在R中使用Graph包進行5461項的maxclique分析。如何增加max.print的限制在R

我得到

最終輸出產品很長,所以我得到以下警告:

達到getOption("max.print") - 省略475569行

可有人請我提供的指針如何爲max.print增加限制 。

+3

你可能想找到一個合適的輸出格式和輸出的方式。一旦你的數據變得足夠大,打印到R控制檯的速度就會變得更加痛苦,而不是它的價值。 –

回答

53

使用options命令,例如options(max.print=1000000)

?options

‘max.print’: integer, defaulting to ‘99999’. ‘print’ or ‘show’ 
     methods can make use of this option, to limit the amount of 
     information that is printed, to something in the order of 
     (and typically slightly less than) ‘max.print’ _entries_. 
+0

hello aix:查看結果輸出:$ maxCliques [[179798]] [1]「n4301」「n4630」「 n4480" 「n4977」 「n4427」 $ maxCliques [[179799]] [1] 「n4301」 「n4630」 「n4480」 「n4592」 $ maxCliques [[179800]] [1] 「n4301」「 n4630「」n4480「」n4328「」n4595「 ...爲什麼它以」$ maxCliques [[179798]]「而不是」$ maxCliques [[1]]「開頭,太奇怪了! – Jay

+0

@Jeol:R打印整個事物,但默認情況下控制檯只存儲最後8000行輸出。進入'Edit' - >'GUI preferences ...' - >'lines',並增加值。然後「保存...」和「確定」。 –

19

參見?options

options(max.print=999999) 
+4

'options(max.print = .Machine $ integer.max)'是這個最極端的版本 – MichaelChirico