oppsumtabell | R Documentation |
This function allows you to create a simple univariate summary table for one or more variables in a dataset. The table will show the following summary statistics: the number of non-missing observations, the average (mean), the median, the 25th and 75th percentiles, the standard deviation, the minimum, the maximum, and the number of missing observations.
oppsumtabell(
dataset,
variables = NULL,
variable = NULL,
export = NULL,
norsk = NULL
)
dataset |
Your dataset (a data.frame-type object). |
variables |
The variables from your dataset for which you want summary statistics. Specify them as a string or a string vector. |
variable |
Alias for |
export |
Should the table be made export-ready (TRUE/FALSE)? |
norsk |
Results in Norwegian (NB)? |
The result can be printed in an "export-ready" fashion, meaning it can be copied and pasted into a Word document and there transformed into a publication-quality table. The function will provide warnings in some cases where user selections might be problematic.
A data.frame or, if export function is switched on (export=TRUE), a printed out table formatted for easy export to MS Word.
## Not run:
# Loading mtcars dataset
data(mtcars)
# For a single variable
oppsumtabell(dataset = mtcars, variables = c("cyl"))
# Alternative
oppsumtabell(dataset = mtcars, variables = "cyl")
# For more variables
oppsumtabell(dataset = mtcars,
variables = c("cyl","mpg","disp"))
# Using export function
oppsumtabell(dataset = mtcars,
variables = "mpg", export = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.