anelson
anelson

Reputation: 55

View a data frame with many columns

I have a data set with 85 columns. I cannot view the later columns with the View() function.

Is there a command to view all columns in the data frame?

Upvotes: 1

Views: 1237

Answers (2)

Ian
Ian

Reputation: 1707

rstudioapi::writeRStudioPreference("data_viewer_max_columns", 1000L)

will change the number of columns visble and make this change permanent.

Upvotes: 1

hplieninger
hplieninger

Reputation: 3494

You should be able to scroll to the right in the window opened by View(). In RStudio, there is an option above the column names to scroll to the right or to the left; columns 1-50 are displayed by default.

Furthermore, you might use the following functions to take a look at your data:

names(data)
str(data)
View(data[, 51:100])

Upvotes: 1

Related Questions