You can issue a read for just the headers and then skip first 3 lines so
as to issue a read for just the body.
fn <- "myfile.dat"
DF <- read.table(fn, skip = 3, na.strings = "--",
col.names = read.table(fn, nrows = 1, as.is = TRUE))
On Wed, Apr 23, 2008 at 9:29 AM, Ole Roessler
<[EMAIL PROTE
One way is to first read in the data with readLines. This will create
a character vector of the input lines. You can then remove the lines
you want and then use textConnect to read in the modified data:
x <- readLines(file)
x <- x[-c(2,3)] # delete lines two and three
input <- read.table(textCo
Hello,
I want to do some analyses with data originating from a hydrological model
that are saved in multiple output files.
I want to import the output-files in R without a treatment like
preproceesing every output file.
The output file is more or less a matrix, but with ad
3 matches
Mail list logo