View source: R/predict_values.R
preprocess | R Documentation |
Pre-process Coh-Metrix and ReaderBench data files before applying predictive models
preprocess(model, data)
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
|
returns a list of pre-processed data files, one per sub-model
Sterett H. Mercer <sterett.mercer@ubc.ca>
import_rb
import_coh
import_gamet
predict_quality
###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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.