Re: [R] naming list entries dynamically

2008-10-24 Thread Torsten Lange
Hello, Thank you for all answers! The function works! Torsten fload.from.folder <- function(pattern) { fname <- list.files(pattern=pattern) flist <- sapply(fname, read.table, header=FALSE) for(i in seq_along(fname)) { flist[[i]] <- t(read.table(fname[i], header=FALSE)) } invisible

Re: [R] naming list entries dynamically

2008-10-23 Thread Gábor Csárdi
On Thu, Oct 23, 2008 at 10:35 PM, Gábor Csárdi <[EMAIL PROTECTED]> wrote: > On Thu, Oct 23, 2008 at 10:29 PM, <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I'm new to R and I'd like to dynamically assign names to the entries of a >> list. >> The situation is: I load several ascii-files from a folder.

Re: [R] naming list entries dynamically

2008-10-23 Thread Gábor Csárdi
On Thu, Oct 23, 2008 at 10:29 PM, <[EMAIL PROTECTED]> wrote: > Hello, > > I'm new to R and I'd like to dynamically assign names to the entries of a > list. > The situation is: I load several ascii-files from a folder. The data shall > be stored within the list structure, where the file names are a

[R] naming list entries dynamically

2008-10-23 Thread tlange
Hello, I'm new to R and I'd like to dynamically assign names to the entries of a list. The situation is: I load several ascii-files from a folder. The data shall be stored within the list structure, where the file names are assigned to the list entries. > flist $file1.txt [1] 1.0 1.2 1.4 1.6