Description Usage Arguments Value Author(s) Examples
dummify
creates a matrix with columns signifying separate dummy variables for each level of a factor. The column names are the former levels of the factor.
1 |
x |
|
show.na |
If |
keep.na |
If |
dummify
returns a matrix with a number of rows equal to the length of x
and a number of columns equal to the number of levels of x
.
Josh Pasek, Assistant Professor of Communication Studies at the University of Michigan (www.joshpasek.com).
1 2 3 4 5 6 7 8 9 |
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:base':
format.pval, units
Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
nobs
The following object is masked from 'package:utils':
object.size
The following object is masked from 'package:base':
startsWith
Loading required package: mice
Attaching package: 'mice'
The following objects are masked from 'package:base':
cbind, rbind
age1824 age2534 age3544 age4554 age5564 age6599
150 205 217 237 216 187
age1824 age2534 age3544 age4554
Min. :0.0000 Min. :0.0000 Min. :0.000 Min. :0.0000
1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.000 1st Qu.:0.0000
Median :0.0000 Median :0.0000 Median :0.000 Median :0.0000
Mean :0.1238 Mean :0.1691 Mean :0.179 Mean :0.1955
3rd Qu.:0.0000 3rd Qu.:0.0000 3rd Qu.:0.000 3rd Qu.:0.0000
Max. :1.0000 Max. :1.0000 Max. :1.000 Max. :1.0000
age5564 age6599
Min. :0.0000 Min. :0.0000
1st Qu.:0.0000 1st Qu.:0.0000
Median :0.0000 Median :0.0000
Mean :0.1782 Mean :0.1543
3rd Qu.:0.0000 3rd Qu.:0.0000
Max. :1.0000 Max. :1.0000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.