| view {NCStats} | R Documentation |
Shows, either to the console or to a pager, a random selection of rows from a data frame.
view(x,which=NULL,n=NULL,win=FALSE,title=NULL,row.names=TRUE)
x |
A data frame. |
which |
A numeric or string vector containing the column numbers or names to display. Defaults to showing all columns. |
n |
A numeric indicating the number of rows to display. Defaults to 6 when win=FALSE and dim(x)[1] when win=TRUE. |
win |
A logical indicating whether x should be displayed in a new window or not. |
title |
A string for labeling the new window if win=TRUE. Defaults to the name of the x object. |
row.names |
A logical indicating whether row names should be printed or not. |
No value is returned but a random (but sorted) selection of rows from the data frame is displayed.
If n is larger than the number of rows in x or is non-numeric then x is displayed without randomizing the rows.
Derek H. Ogle, dogle@northland.edu. Code for viewing the data frame in a window was modified from a post to R-help by D.L. McArthur on 4Aug08.
view
data(iris)
view(iris)
view(iris,which=c("Sepal.Length","Sepal.Width","Species"))
view(iris,which=grep("Sepal",names(iris)))
view(iris,row.names=FALSE)
## not run because it produces a new window
## Not run: view(iris,win=TRUE)