You could do this:
DF <- read.csv.sql("myfile.csv", skip = 1, header = FALSE)
names(DF) <- vector of desired names
If you want to use the first line as the basis of creating the heading
vector you could do this to read it in:
hdg <- readLines("myfile.csv", n = 1)
names(DF) <- ... some transforma
I have a file that I'm planning on manipulating with sqldf(). The header
for this file is malformed, and I was wondering if there's a way to specify
the values of the header ahead of time. I can see there are T/F options for
header in sqldf(... list(header=T, ...), but was wondering if there's a
2 matches
Mail list logo