Hello,

I open some files in a directory and get a list.


open.list <- sapply (namen, function (x) {file <- list.files (ddir,
pattern=x, full.names=TRUE) # namen is vector and each element detects a
special file to open
                               file <- read.table (file)
                                        }
)



This list has no names. I would like to get a list with key/value pairs and
namen is the vector delivering the names. So how does sapply or lapply get
the information to generate key/value pairs?

Thanks
Hermann

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to