ez.readt: read csv table, wrapper of 'read.csv'

View source: R/io.R

ez.readtR Documentation

read csv table, wrapper of read.csv

Description

read csv table/text, wrapper of read.csv

Usage

ez.readt(file, ..., skip.rows = NULL, tolower = FALSE, makenames = TRUE)

Arguments

...

more useful parameters from read.table read.csv, eg. strip.white, blank.lines.skip, na.strings, stringsAsFactors

skip.rows

rows to skip (1 based) before read in, eg 1:3, if negative,eg, -3:-5, counting from the last line

tolower

whether to convert all column names to lower case

makenames

if F, keep as is. if T, call make.names(unique=TRUE,allow_=TRUE) _ kept, The character "X" is prepended if necessary. All invalid characters are translated to "." .1 .2 etc appended for uniqueness

Value

returns a data frame

Examples

read.table(file, header = FALSE, sep = "",
           dec = ".", numerals = c("allow.loss", "warn.loss", "no.loss"),
           row.names, col.names, as.is = !stringsAsFactors,
           na.strings = "NA", colClasses = NA, nrows = -1,
           skip = 0, check.names = TRUE, fill = !blank.lines.skip,
           strip.white = FALSE, blank.lines.skip = TRUE,
           comment.char = "#",
           allowEscapes = FALSE, flush = FALSE,
           stringsAsFactors = default.stringsAsFactors(),
           fileEncoding = "", encoding = "unknown", text, skipNul = FALSE)

read.csv(file, header = TRUE, sep = ",",
         dec = ".", fill = TRUE, comment.char = "", ...)

jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.