fread_basedict: Read Dataset Based on Data-dictionary

Description Usage Arguments Details Value

Description

fread_basedict is a wrapper of fread, which allows you read dataset based on your data-dictionary(see details).

Usage

1
2
fread_basedict(myfile, mydict, na = c("", ".", "NA", "N/A", "NULL"),
  excludevar = NULL)

Arguments

myfile

File name character of data set, must be a csv file.

mydict

File name character of variable dictionary, must be a csv file.

na

A character vector which to be interpreted as NA values, default c("",".","NA","N/A","NULL").

excludevar

A vector consisting of the variable names want to be excluded in 'mydict' file, default NULL.

Details

the format of data-dictionary is required: 1.the first column must be names of variables; 2.the second column must be labels of variables; 3.the third column must be flags which indicate whether it is a variable; 4.the fourth column must be types of variables, and the value in this column should be 'VARCHAR', 'NUMBER' or NULL.

Value

A dataframe


xxzcool/scoremodel documentation built on May 4, 2019, 10:56 a.m.