creed: creed

Description Usage Arguments Examples

Description

This function reads in CSVs and allows you to specify certain columns to import. It is faster than fread when selecting specific columns.

Usage

1
creed(data, select)

Arguments

data

the path/name of csv you wish to read in (same format as you would use for read.csv)

select

list of column names you wish you bring in (i.e. c("COLUMN1", "COLUMN3")). If you run without a select statement, creed will return a data frame with a data frame of all the column names so you can figure out what columns exist in the csv

Examples

1
2
3
4
5
6
7
8
9
#run without select statement to get column names:
raw.data <- system.file("extdata", "DATA.csv", package = "creed", mustWork = TRUE)
print(creed(raw.data))
#run with select statement to get specific columns:
raw.data <- system.file("extdata", "DATA.csv", package = "creed", mustWork = TRUE)
print(creed(raw.data, select = c("COLUMN1", "COLUMN3")))
#run with select = "ALL" to get all columns:
raw.data <- system.file("extdata", "DATA.csv", package = "creed", mustWork = TRUE)
print(creed(raw.data, select = "ALL"))

carlinstarrs/creed documentation built on May 16, 2019, 3:10 p.m.