开发者

how to not repeat same values when printing data frame?

开发者 https://www.devze.com 2023-03-18 06:39 出处:网络
I see that when Hadley Wickam prints data frame here, the values which dont change row over row dont get printed.

I see that when Hadley Wickam prints data frame here, the values which dont change row over row dont get printed.

that is, instead of having :

name user rating

robuchon nicolas 2

robuchon nicolas 1

robuchon antoine 3

robuchon tartenpion 2

gagnaire nicolas 2

gagnaire christophe 2

it prints as such :

name user rating

robuchon nicolas 2

...........开发者_高级运维.................1

...............antoine 3

...............tartenpion 2

gagnaire nicolas 2

..............christophe 2

where the dots are for spaces...

Does anyone knows how to do that ?


It's from the use of cast(). The variables to the left of ~ are treated that way.

It must be a version of cast() that he is using because when he prints out non-cast data.frames, that behavior does not appear. Sorry, this answer doesn't completely answer your question.

Another reason I think it is another version of cast() is that instead of showing (all), it shows .. This feature also appears in a paper by the author in 2005.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号