Description Usage Arguments Details Value See Also Examples
Show variable information in data.frame.
1 2 |
data |
a data.frame whose contents to be shown |
functions |
a vector of functions to be applied to each variable in data.frame. Default added function is |
na.action |
a character which specifies missing-data filter function. This is applied to data.frame supplied by data argument. Default is ‘na.pass’. |
na.omit.for.variable |
a logical value specifying whether to apply na.omit for each variable. This option is useful to supply NA free data to each function. When set to TRUE (default), the number of observation may differ for each variable, and it is recommended to check the number of obsevations by show.nobs option. |
show.nobs |
a logical valye specifying whether to add the number of observations for each function as nobs column in result object. |
This function shows contents in data.frame object, and typical use is to list modes of variables in data.frame. In addition to variable mode, a variety of functions can be used such as min
, max
and mean
for summarizing variable information in data.frame.
a data.frame which contains the results of each function.
1 2 3 4 5 | dat <- data.frame(a = rnorm(100))
dat <- transform(dat, b = ifelse(a > -2, a, NA))
dat <- transform(dat, c = ifelse(a > 0, "positive", "negative"))
showContents(dat)
showContents(dat, functions=c(modes, storage.mode, min, max, median))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.