Hi, You could do this: Lines<-"qwer$$12$$qwre ewrtr$7789$ewwe " res<-unlist(strsplit(Lines,split="\\$|\n")) as.data.frame(matrix(res[res!=""],nrow=2,byrow=TRUE),stringsAsFactors=FALSE) V1 V2 V3 #1 qwer 12 qwre #2 ewrtr 7789 ewwe
A.K. ----- Original Message ----- From: arunkumar1111 <akpbond...@gmail.com> To: r-help@r-project.org Cc: Sent: Monday, November 26, 2012 5:51 AM Subject: [R] Help in splitting the records Hi I have set of records seperated by a separator say "$$$" i want to get the values in a dataframe. eq qwer$$12$$qwre ewrtr$7789$ewwe I want the output as\ V1 V2 V3 qwer 12 qwre ewrtr 7789 ewwwe Please help me ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-in-splitting-the-records-tp4650827.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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. ______________________________________________ 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.