Re: [R] How to read plain text documents into a vector?

2009-10-14 Thread kenhorvath
Richard Liu wrote: I tried the other two suggestions, but paste seemed not to glue the separate lines together into one character string. Perhaps I missed something (collapse?). Perhaps I'll have another look. Yes, that is what 'collapse' should do! If you read text using

Re: [R] How to read plain text documents into a vector?

2009-10-14 Thread kenhorvath
Dieter Menne wrote: While I agree that the appending could be more efficiently be done by a list as an intermediate, the docs = c(doc, ljljljl) construct is not recursive, even if not efficient. Yes, of course, that was hastily written, sorry ... but from my experience list

Re: [R] How to read plain text documents into a vector?

2009-10-13 Thread kenhorvath
Paul Hiemstra wrote: file_list = list.files(/where/are/the/files) obj_list = lapply(file_list, FUN = yourfunction) yourfunction is probably either read.table or some read function from the tm package. So obj_list will become a list of either data.frame's or tm objects. The