stat.desc | R Documentation |
GUI for descriptive statistics.
stat.desc(X = NULL, groupes = NULL, data = NULL, tr = 0.1, type = 3, plot = T, ref = T, save = F, html = T)
X |
character or vector. Variable names for which descriptive must be done |
groupes |
character or vector. Grouping variable. Must be a factor variable |
data |
name of dataframe in which to find variables |
tr |
trim value. The value must be between 0 and 0.5 |
type |
Which estimate for skew and kurtosis. Value between 1 and 3. See ?describe |
plot |
Logical. Should the plot be printed ? |
ref |
Logical. Should references be printed ? |
save |
Logical. Should results be saved ? |
html |
Logical. Should results be knit in html? |
Results from describeBy from psych package or summary function, depending on variable type. Violin plots are created by ggplot2. The red point is the mean and point range one SD. Each value is also plotted If saved is true, an rtf document and compatible R file are created in the working directory. The value 'FALSE' for ref is used in internal easieR function, in order to avoid packages used for this function to be printed. Note : If the groupes argument is not a factor variable, a message box asks whether you want to convert the variable in a factor.
Nicolas Stefaniak
require(psych)
data(sat.act)
stat.desc(X=c("education","age","ACT","SATV","SATQ"), groupes="gender", data=sat.act, tr=.1, type=3, plot=T, ref=T, save=F)
### is the same as
psych::describeBy(sat.act,sat.act$gender) #just one grouping variable
### can also be used as follow
stat.desc() # open GUI
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.