Learn R Programming

eatTools (version 0.7.8)

readMultisep: Read in data.frames with separator characters >=1Byte

Description

Read in character separated data.frames with separator characters >=1Byte.

Usage

readMultisep(file, sep, colnames=TRUE)

Value

A data frame containing a representation of the data in the file.

Arguments

file

the name of the file which the data are to be read from.

sep

the field separator character(s).

colnames

logical. Whether first line in file contains colnames.

Examples

Run this code
filePath <- tempfile(fileext = ".txt")
dat <- data.frame(v1 = c("0","300","e",NA),
                  v2=c("0","90","10000",NA),
                  v3=c("k","kk","kkk",NA),
                  v4=NA,
                  v5=c("0","90","100","1"))
write.table(dat, file = filePath, row.names = FALSE, col.names = FALSE, sep = "]&;")
readMultisep(filePath, sep="]&;")

Run the code above in your browser using DataLab