On 9/4/06, Mike Nielsen <[EMAIL PROTECTED]> wrote:
> R won't do variable interpolation inside quotation marks as perl does.
Just as an aside, gsubfn in package gsubfn will do perl-style
(well, sort of) string interpolation:
> library(gsubfn)
> i <- 1
> gsubfn(x = "data_files/file$i")
[1] "data_fi
R won't do variable interpolation inside quotation marks as perl does.
You could try amending your code with, for e.g.
file.name<-paste(sep="/","data_files",files[[i]])
x<-read.table(file.name)
Regards,
Mike
On 9/4/06, Ffenics <[EMAIL PROTECTED]> wrote:
> Hi there
> I want to be able to take a
Yes, already looked at the FAQ. Thats how I have got where I am.
I didnt see a solution to this particular problem on there though
Thanks anyway.
Uwe Ligges <[EMAIL PROTECTED]> wrote: FAQ ...
Uwe Ligges
Ffenics wrote:
> Hi there
> I want to be able to take all the files in a given directory,
FAQ ...
Uwe Ligges
Ffenics wrote:
> Hi there
> I want to be able to take all the files in a given directory, read them in
> one at a time, calculate a distance matrix for them (the files are data
> matrices) and then print them out to separate files. This is the code I
> thought I would be a