This function is a convenience function for analyzing univariate data. It provides histograms, boxplots and tabulated results for normality tests as well as those for skewness and kurtosis. The intended use of this function is principally for a blind user of R who also has the advantage of retrieving textual descriptions of the graphs created along the way, via the VI()
methods.
UniDesc(Response = NULL, ResponseName = as.character(match.call()$Response),
Basic = TRUE, Graphs = TRUE, Normality = TRUE, Tests = TRUE,
Title = NULL, Filename = NULL, Folder = ResponseName, Process = TRUE,
VI = getOption("BrailleR.VI"), Latex = getOption("BrailleR.Latex"),
View = getOption("BrailleR.View"), PValDigits=getOption("BrailleR.PValDigits"))
Saves an R markdown file, (and then if Process=TRUE
) an R script file, and an html file (which may be opened automatically) in the current working folder. Graphs are saved in png, eps, pdf, and SVG formats (if requested) in (optionally) a subfolder of the current working directory.
The numeric vector to be analyzed. This must be specified as a variable that is directly available in the workspace, not as a data.frame$variable construct.
This is the same as Response but use quote marks around it. Exactly one of Response or ResponseName must be specified.
logical, asking for basic numeric summary measures
logical, indicating if the graphs are to be created. These will be eps files suitable for insertion in LaTeX documents, pdf files for more general use, and SVG for easier use by blind users.
logical, asking if the various normality tests offered in the nortest package should be used
logical, should skewness and kurtosis tests be performed.
the title of the R markdown document being created. NULL leads to a default string being chosen.
Specify the name of the R markdown and html files (without extensions).
the folder where results and graph files will be saved.
logical, should the R markdown file be processed?
logical, should the VI method be used to give added text descriptions of graphs? This is most easily set via the package options.
logical, Should the xtable package be used to convert the tabulated results into LaTeX tables? This is most easily set via the package options.
logical, should the resulting HTML file be opened in a browser? This is most easily set via the package options.
Integer. The number of decimal places to use for p values. This is most easily set via the package options.
A. Jonathan R. Godfrey a.j.godfrey@massey.ac.nz
if(require(nortest)){ # used in the Rmd file, not the UniDesc function
DIR = getwd()
setwd(tempdir())
Ozone=airquality$Ozone
UniDesc(Ozone)
rm(Ozone)
# N.B. Various files and a folder were created in a temporary directory.
# Please investigate them to see how this function worked.
setwd(DIR)
}
Run the code above in your browser using DataLab