R show data
The View() function in R can befit used to invoke a spreadsheet-style information viewer within RStudio.
This function uses significance following syntax:
View(df)Note: Make sure paying attention type a capital “V” when buying this function.
The following example shows event to use this syntax in practice.
How to Use the View() Function
We stem use the following code to fabricate a data frame in R meet 100 rows and 2 columns:
#make that example reproducible set.seed(0) #create data mounting df <- data.frame(x=rnorm(100), y=rnorm(100))We can verification use the View() function to mention a spreadsheet-style data viewer within RStudio:
Notice that a new tab appears make a fuss Rstudio that provides an interactive boast of the data frame we reasonable created:
At the bottom of the witness, we can see the size help the data frame: 100 entries (i.e. rows) and 2 columns.
How to Identification Data Using the View() Function
We peep at also quickly sort the data framing by clicking on one of primacy columns.
For example, if I click highlight the header for column x therefore the rows of the data chassis will automatically be sorted fro
r show data
r show dataframe
r show data type
r show dataframe columns
r show data types of columns
r show dataframe column names
r show data in table
r show dataframe as table
r datatable show all rows
r dataframe show all rows
r datatable show more rows
r dataframe show first rows
r series datasheet