Learn R Programming

DECIDE (version 1.3)

prepare.data: Prepare dataset to be used in relative.importance

Description

Prepares datasets to be in the format required by the function relative.importance. It is automatically called by relative.importance.

Usage

prepare.data(dataset)

Arguments

dataset

A data frame with 4 columns only, in the following order: 1: student's ID, 2: class, 3: transition (0 if not, 1 if yes) and 4: performance score.

Value

dataset

The data frame given as the argument, with column names changed and missing values removed.

% ~Describe the value returned % If it is a LIST, use % \item{comp1 }{Description of 'comp1'} % \item{comp2 }{Description of 'comp2'} % ...

Examples

Run this code
# NOT RUN {
# generate a dataset
data <- data.frame(seq(1:10), rep(c(1, 2, 3), length.out = 10), 
	rbinom(1, n = 10, p = 0.7), c(rnorm(8, 0, 1), NA, NA))

# run function
data_clean <- prepare.data(data)
# }

Run the code above in your browser using DataLab