describe | R Documentation |
This function describes the variables of a vector or a dataset that might include labels imported with haven packages.
describe(x, ...) ## S3 method for class 'factor' describe(x, n = 10, show.length = TRUE, freq.n.max = 10, ...) ## S3 method for class 'numeric' describe(x, n = 10, show.length = TRUE, freq.n.max = 10, ...) ## S3 method for class 'character' describe(x, n = 10, show.length = TRUE, freq.n.max = 10, ...) ## Default S3 method: describe(x, n = 10, show.length = TRUE, freq.n.max = 10, ...) ## S3 method for class 'haven_labelled' describe(x, n = 10, show.length = TRUE, freq.n.max = 10, ...) ## S3 method for class 'data.frame' describe(x, ..., n = 10, freq.n.max = 0) ## S3 method for class 'description' print(x, ...)
x |
object to describe |
... |
further arguments passed to or from other methods, see details |
n |
number of first values to display |
show.length |
display length of the vector? |
freq.n.max |
display a frequency table if the number of unique values is less than this value, 0 to hide |
When describing a data.frame, you can provide variable names as character strings. Using the "*" or "|" wildcards in a variable name will search for it using a regex match. The search will also take into account variable labels, if any. See examples.
an object of class description
.
Joseph Larmarange <joseph@larmarange.net>
lookfor
data(hdv2003) describe(hdv2003$sexe) describe(hdv2003$age) describe(hdv2003) describe(hdv2003, "cuisine", "heures.tv") describe(hdv2003, "trav*") describe(hdv2003, "trav|lecture") describe(hdv2003, "trav", "lecture") data(fertility) describe(women$residency) describe(women) describe(women, "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.