versaread: Load RDS, RData, or CSV Files

Description Usage Arguments Value Examples

Description

versaread() is mainly for loading saved lists of gene names. For .RData files containing one object or an .RDS file, versaread() loads and returns the object for you to assign. For CSV files, it expects something containing 1 column and with a header, and will ignore everything after the first column.

Usage

1

Arguments

file

a character string indicating the path of the desired file

type

a character string indicating the type of file being loaded (Options: rds, rdata, or csv)

Value

a character vector or an R object (if it's an RData or RDS file)

Examples

1
2
3
4
5
6
temprds <- tempfile(fileext = ".rds")
saveRDS(iris, file = temprds)
iris_reload <- versaread(temprds, type = "rds")
tempcsv<- tempfile(fileext = ".csv")
write.csv(iris$Species, file = tempcsv)
iris_species <- versaread(tempcsv, type = "csv")

chenyenchung/genofeatutil documentation built on May 15, 2019, 10:38 p.m.