read_data {creditmodel}R Documentation

Read data

Description

read_data is for loading data, formats like csv, txt,data and so on.

Usage

read_data(
  path,
  pattern = NULL,
  encoding = "unknown",
  header = TRUE,
  sep = "auto",
  stringsAsFactors = FALSE,
  select = NULL,
  drop = NULL,
  nrows = Inf
)

check_data_format(path)

Arguments

path

Path to file or file name in working directory & path to file.

pattern

An optional regular expression. Only file names which match the regular expression will be returned.

encoding

Default is "unknown". Other possible options are "UTF-8" and "Latin-1".

header

Does the first data line contain column names?

sep

The separator between columns.

stringsAsFactors

Logical. Convert all character columns to factors?

select

A vector of column names or numbers to keep, drop the rest.

drop

A vector of column names or numbers to drop, keep the rest.

nrows

The maximum number of rows to read.


[Package creditmodel version 1.3.1 Index]