[R] i'm so stuck with text file and contour plot
dwinsemius at comcast.net
Sun Aug 2 20:28:13 CEST 2009
I think he may also need to add the header=TRUE argument:
tdat <- read.csv("http://www.nabble.com/file/p24777697/small.txt",
Note: read.table with those arguments should have worked as well.
And then use names(tdat) <- c(<less bloated list of variable names>)
Perhaps along these lines:
tdnames <- names(tdat)
names(tdat)[4:7] <- c("Strk.dens.2006", "Strk.dens.2007", "Strk.dens.
# cannot use variable names that begin with numbers
without special efforts
tdat # now can be displayed more economically
On Aug 2, 2009, at 2:10 PM, Mark Difford wrote:
>>> been trying to read a text file that contains heading in the first
>>> in to R but cant.
> You want the following:
> TDat <- read.csv("small.txt", sep="\t")
> See ?read.csv
> Regards, Mark.
> hannesPretorius wrote:
>> Ok i feel pretty stupid.. been trying to read a text file that
>> heading in the first line in to R but cant. all i need to do is
>> make a
>> contour plot for a friend but after weeks i feel like giving up.. i
>> included the first few lines of the file.. any help will be great
>> Hannes http://www.nabble.com/file/p24777697/small.txt small.txt
> View this message in context: http://www.nabble.com/i%27m-so-stuck-with-text-file-and-contour-plot-tp24777697p24780416.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help