krysstabell | R Documentation |
This function allows you to cross-tabulate two variables in your dataset. The table will show column percentages. 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 functions will provide warnings in some cases where user selections might be problematic.
krysstabell(dataset, rowvar, colvar, export = NULL)
dataset |
Your dataset (a data.frame-type object). |
rowvar |
The row-variable. |
colvar |
The column-variable. |
export |
Should the result be made export-ready (TRUE/FALSE)? |
A matrix or, if export function is switched on (export=TRUE), a printed out table formatted for easy export to MS Word.
## Not run:
# Load mtcars dataset
data(mtcars)
# Simple example
krysstabell(dataset = mtcars,
rowvar = "carb",
colvar = "gear")
# For export
krysstabell(dataset = mtcars,
rowvar = "carb",
colvar = "gear",
export = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.