Search code examples
rviewdataframerstudio

View( ) function in R: How to view part of huge data frame as spreadsheet in R


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)


Solution

  • If you want to see first 100 lines of the data frame df as spreadsheet, use

    View(head(df,100))