preprocess: Pre-process data

View source: R/predict_values.R

preprocessR Documentation

Pre-process data

Description

Pre-process Coh-Metrix and ReaderBench data files before applying predictive models

Usage

preprocess(model, data)

Arguments

model

A string telling which scoring model to use. Options are: 'rb_mod1', 'rb_mod2', 'rb_mod3narr', 'rb_mod3exp', 'rb_mod3per', 'rb_mod3all', 'rb_mod3narr_v2', 'rb_mod3exp_v2', 'rb_mod3per_v2', or 'rb_mod3all_v2' for ReaderBench files, 'coh_mod1', 'coh_mod2', 'coh_mod3narr', 'coh_mod3exp', 'coh_mod3per' or 'coh_mod3all' for Coh-Metrix files, or 'gamet_cws1' for GAMET files

data

The name of the R object corresponding to the data file. The import_gametimport_gamet(), import_cohimport_coh(), or import_rbimport_rb() functions should be used before this function to generate these data objects.

Value

returns a list of pre-processed data files, one per sub-model

Author(s)

Sterett H. Mercer <sterett.mercer@ubc.ca>

See Also

import_rb import_coh import_gamet predict_quality

Examples

###Example using sample data included in writeAlizer package

##Example 1: ReaderBench output file
#load package
library(writeAlizer)

#get path of sample ReaderBench output file
file_path1 <- system.file("extdata", "sample_rb.csv", package = "writeAlizer")

#see path to sample file
file_path1

#import file and store as "rb_file"
rb_file <- import_rb(file_path1)

#Pre-process RB data for model 2
preprocess('rb_mod2', rb_file)

shmercer/writeAlizer documentation built on Feb. 13, 2024, 8:58 a.m.