Description Usage Arguments Value Author(s) See Also Examples
This function generates a quick frequencies or proportions table. Useful for freqbubble function
1 2 |
df |
vector, dataframe or matrix |
group |
A vector same length as df (e.g, df$group) Default (NULL) |
missing |
Logical. TRUE (default) missing displayed |
prop |
Logical. If TRUE proportions are displayed instead of frequencies |
round1 |
Rounds values. default=2 |
bubbleSize |
bubble size range, default = c(2, 30) |
Matrix table
Ariadna Angulo-Brunet (ariadna.angulo@uab.cat), Carme Viladrich
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #generate some random data
x<-1:5
y<-1:2
v1<-sample(x,80,replace=TRUE)
v2<-sample(x,80,replace=TRUE)
v3<-sample(x,80,replace=TRUE)
v4<-sample(x,80,replace=TRUE)
gender<- sample(y, 80, replace=TRUE)
df <- data.frame(v1, v2,v3,v4)
#Execute default function (frequencies with missing data included)
frequencies(df)
#Execute proportions without missings
frequencies(df, missing=FALSE, prop=TRUE)
#Execute frequencies by group
frequencies(df, group=gender)
#Execute proportions by group
frequencies(df, group=gender, prop=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.