Re: [R] File data to data.frame

2012-03-13 Thread jim holtman
try this: > x <- readLines(textConnection(" + ")) > > closeAllConnections() > > # process & parse the data > for (i in x){ + if (grepl("^username", i)) username <- sub(".*=(.*)", '\\1', i) + if (grepl("^password", i)){ + password <- sub(".*=(.*)", "\\1", i) + cat("found: us

[R] File data to data.frame

2012-03-13 Thread b4d
Hi, I am playing around with some data and I would like to get data that is stored in a file like this: ... to the data.frame structure, how can I do that directly in R, currently I am doing parse with bash, but I would like to centralize the procedure and learn something new. Thanks -- View