I have a text file containing data: Som text :: asdf @ 1 ds $ 5. /*Edmp */ @ 8 asu $ 3. /*daf*/ @ 8 asdala $ 2. /*asdfa*/ @ 13 astun $ 11. /*daf */ @ 26 dft $ 3. /*asdf */ @ 31 dsfp $ 2. /*asdf */ asjk asdfö
My intention is to create a dataframe from this data (only rows starting @ and not containng string "asdf"). I tried to read this data using this code: g <- readLines("temp.txt") g <- grep("^@", g, value=T) g <- gsub("[@|$|\\.|/*]", "", g) How to put this data into a data.frame? -J ______________________________________________ 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.