report: Generates report about a conducted igate.

Description Usage Arguments Value Examples

View source: R/report.R

Description

Takes results from a previous igate and automatically generates a html report for it. Be aware that running this function will create an html document in your current working directory.

Usage

1
2
3
4
5
6
report(df, versus = 8, target, type = "continuous", test = "w",
  ssv = NULL, outlier_removal_target = TRUE,
  outlier_removal_ssv = TRUE, good_outcome = "low", results_path,
  validation = FALSE, validation_path = NULL,
  validation_counts = NULL, validation_summary = NULL,
  image_directory = tempdir(), output_name = NULL, output_directory)

Arguments

df

The data frame that was analysed with igate or categorical.igate.

versus

What value of versus was used?

target

What target was used?

type

Was igate (use type = "continuous") or categorical.igate (use type = "categorical") conducted?

test

Which hypothesis test was used alongside the counting method?

ssv

Which ssv have been used in the analysis? If NULL, it will be assumed that ssv = NULL was passed to igate or categorical.igate and all numeric variables in df will be used.

outlier_removal_target

Was outlier removal conducted for target? If type == "categorical" this is set to FALSE automatically.

outlier_removal_ssv

Was outlier removal conducted for each ssv?

good_outcome

Are "low" or "high" values of target good? Or, in case of a categorical target the name of the best category as a string.

results_path

Name of R object (as string) containing the results of igate or categorical.igate.

validation

Logical. Has validation of the results been performed?

validation_path

Name R object (as string) containing the validated observations, i.e. first data frame returned by validate.

validation_counts

Name of R object (as string) containing the counts from validation, i.e. the second data frame returned by validate.

validation_summary

Name of R object (as string) containing the summary of validation_path, i.e. the third data frame returned by validate.

image_directory

Directory which contains the plots from igate, igate.regressions etc.

output_name

Desired name of the output file. File extension .html will be added automatically if not supplied. If NULL will be *iGATE_Report.html*.

output_directory

Directory into which the report should be saved. To save to the current working directory, use output_directory = getwd().

Value

An html file named "iGATE_Report.html" will be output to the current working directory, containing details about the conducted analysis. This includes a list of the analysed SSV, as well as tables with the results from igate/ categorical.igate and plots from igate.regressions/ categorical.freqplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Example for categorical target variable
# If you want to conduct an igate analysis from scratch, running report
# is the last step and relies on executing the other functions in this package first.
# Run categorical.igate
df <- mtcars
df$cyl <- as.factor(df$cyl)
results <- categorical.igate(df, target = "cyl", best.cat = "8", worst.cat = "4")
# Produce density plots
# Suppose you only want to analyse further the first three identified ssv
results <- results[1:3,]
categorical.freqplot(mtcars, target = "cyl", ssv = results$Causes , savePlots = TRUE)

report(df = df, target = "cyl", type = "categorical", good_outcome = "8",
results_path = "results",
output_name = "testing_igate", output_directory = tempdir())

igate documentation built on Sept. 11, 2019, 1:04 a.m.