read.ctf {ctf}R Documentation

Read CTF data

Description

Read external CTF data into the corresponding R data frame.

Usage

read.ctf(location, columns, nrows)

Arguments

location

location of the CTF data, either a file path to a CTF metadata JSON file, or a directory containing a single CTF metadata JSON file.

columns

names of the columns to read. If missing, then read in all columns.

nrows

integer, the maximum number of rows to read in. If missing, then read in all rows.

Value

data frame

See Also

write.ctf to write CTF

Examples

# An example CTF metadata file included in this package
d <- system.file("extdata", "vgsales", "vgsales-metadata.json", package = "ctf")

# Read all the rows and columns
vgsales <- read.ctf(d)

# Read 10 rows of two columns, Name and Rank
vgsales2 <- read.ctf(d, columns = c("Name", "Rank"), nrows = 10)

[Package ctf version 0.1.0 Index]