Reputation: 851
I have a huge data frame df
in R. Now,if I invoke View(df)
then Rstudio does not respond since it's too big. So, I am wondering, if there is any way to view, say first 500 lines, of a data frame as spreadsheet.
(I know it's possible to view using head
but I want to see it as spreadsheet since it has too many columns and using head
to see too many columns is not really user friendly)
Upvotes: 1
Views: 6475
Reputation: 1072
You can look at the dataframe as a matrix such as df[rowfrom:rowto, columnfrom:columnto], for example in your case:
df[1:500,]
Upvotes: 0
Reputation: 851
If you want to see first 100 lines of the data frame df
as spreadsheet, use
View(head(df,100))
Upvotes: 4