Description Usage Arguments Details Value Examples
View source: R/categorical.freqplot.R
This function takes a data frame, a categorical target variable and a list of ssv and produces a density plot of each ssv and each category of the target variable. The output is written as .png file into the current working directory. Also, summary statistics are provided. The files can be saved into the current working directory. Consider changing the working directory to a new empty folder before running if you want to save a copy of the plots.
1 2 3 |
df |
Data frame to be analysed. |
target |
Categorical target varaible to be analysed. |
ssv |
A vector of suspected sources of variation. These are the variables
in |
outlier_removal_ssv |
Logical. Should outlier removal be performed for each ssv (default: |
savePlots |
Logical. If |
image_directory |
Directory to which plots should be saved. This is only used if |
Frequency plots for each ssv
against each category of the target
are produced and
svaed to current working directory. Also a data frame with summary statistics is produced,
see Value for details.
The density plots of each category of target
against each ssv
are written as
.png file into the current working directory. Also, a data frame with the following
columns is output
Causes | The ssv that were analysed. |
outliers_removed | How many outliers (with respect to this ssv )
have been removed before drawing the plot? |
observations_retained | After outlier removal was performed, how many observations were left and used to fit the model? |
frequency_plot | Logical. Was plotting successful? No plot will be produced if a ssv is constant. |
1 | categorical.freqplot(mtcars, target = "cyl")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.