tspreg_report: Generate a knitr report for model-building using tspreg

Description Usage Arguments Details Value

View source: R/tspreg_report.R

Description

Generate a knitr report for model-building using tspreg

Usage

1
2
3
tspreg_report(path = NULL, train, outcome, covar = NULL, val = NULL,
  val_outcome = NULL, val_covar = NULL, filename = NULL,
  title = "Example", seed = 47209)

Arguments

path

Path to an alternative report (via dup_report + edits). Default NULL runs the standard report.

train

A matrix of continuous data with features in rows and samples in columns

outcome

A binary outcome vector with length = ncol(data)

covar

(optional) A data frame of additional covariates to adjust for with samples in rows and covariates in columns

val

(optional) A validation dataset, where feature rownames are contained in the feature rownames of the training data

val_outcome

(optional) Outcome vector for validation data. Required if val is provided.

val_covar

(optional) A data frame matrix of additional covariates. Required if covar and val are provided.

title

A character string setting the rport title. Default "Example".

seed

A random seed set at the beginning of the report. Default 47209

filepath

A character string specifying the name of the file. Default NULL, which generates a file called "[curtime]_output.html" in the working directory.

Details

This is a wrapper to the TSP model-building procedure. Minimal input is a matrix of continous data from which to build features (i.e. a gene expression matrix) and a binary outcome vector. This function will supply the provided information to an R markdown template that runs a standardized model-building procedure. The output will appear in the working directory as an HTML report.

If the user as created their own version of the standard report with custom edits, they may supply the full path to this file in the "path" variable. The function will use the alternative markdown file to build the report instead.

Value

The final decision tree model fit in the procedure.


leekgroup/sig2trial documentation built on May 20, 2019, 11:31 p.m.