import_pvals {ezECM} | R Documentation |
Import p-values
Description
Imports and organizes observed p-values located in a *.csv
file for training or categorization using an existing model.
Usage
import_pvals(file = NULL, header = TRUE, sep = ",", training = TRUE)
Arguments
file |
Character string providing name of |
header |
Logical indicating if first row of supplied |
sep |
Character string indicating the field separator character for the supplied |
training |
Logical indicating if the supplied |
Details
The purpose of this function is to give the user a way to import p-value data in which the data will be organized for use with the cECM()
and BayesECM()
functions. Warnings are printed when potential issues may arise with the supplied file, and the function attempts to detect and correct simple formatting issues.
Ideally, the user supplies a *.csv
file which contains a header row labeling the columns. Each column contains the p-values of a particular discriminant, and each row must correspond to a single event. If training data is to be imported, the column containing known event categories is labeled "event"
. If new data is imported to be used with an existing model fit, the order of the columns in the new.data
file must be the same as the *.csv
file containing training data.
Value
A base::data.frame()
of p-values with each row corresponding to a single event and each column corresponding to a particular discriminant. If data labels are correctly provided in the supplied *.csv
file, an additional column labeled event
will hold these values.
Examples
file_path <- system.file("extdata", "good_training.csv", package = "ezECM")
training_data <- import_pvals(file = file_path, header = TRUE, sep = ",", training = TRUE)