correctType: A correctType Function

Description Usage Arguments Value Author(s) Examples

View source: R/correctType.R

Description

'correctType' reads data from .csv file into the correct data type. This function processes the raw data into the correct data type.

Usage

1
correctType(raw, datatype, cols = NULL)

Arguments

raw

Data in data frame format.

datatype

The data type for each raw data column. Accepted data types are factor, numeric, integer, date, ordered, and character.

cols

If not all columns need correction, specify the column number that need correction.

Value

Returns the data set with the corrected data type.

Author(s)

Henry Nanji, Saisakul Chernbumroong

Examples

1
2
3
library(FactoMineR)
data(wine)
correctType(wine, "factor", 1)

mdapack documentation built on July 1, 2020, 10:30 p.m.