How do I force dplyr to show all columns and rows of a rather small data.frame. The ddf object below, for example:
df = data.frame(a=rnorm(100), b=c(rep('x', 50), rep('y', 50)), c=sample(1:20, 100, replace=T), d=sample(letters,100, replace=T), e=sample(LETTERS,100,replace=T), f=sample("asdasdasdasdfasdfasdfasdfasdfasdfasdfasd asdfasdfsdfsd", 100, replace=T)) ddf= tbl_df(df)
if you want to still use dplyr and print your dataframe just run
print.data.frame(ddf) ddf
Ah, I was getting angry with dplyr therefore I could not see. the solution is simple: as.data.frame(ddf). That is to convert dplyr-backed data.frame to generic data.frame.
You can use the function print and adjust the n parameter to adjust the number of rows to show.
For example, the following commdands will show 20 rows.
print(ddf, n = 20)
You can also use the typical dplyr pipe syntax.
ddf %>% print(n = 20)
If you want to show all rows, you can use n = Inf (infinity).
print(ddf, n = Inf) ddf %>% print(n = Inf)