Hi everyone, Hi want to separate the string(column1) for example column1 column2 column3 column4 column5 column6 bear b e a r cat c a t tiger t i g e r I know how to do this in excel where using MID function. Now I want to solve it using R. The list of strings is in text file. I looked up the help but did not find it. Can someone help me here? Thank you very much. Regards, Hema [[alternative HTML version deleted]]
hi hema may be strsplit can help on the job. bests. milton On Tue, Jul 7, 2009 at 3:54 AM, Hemavathi Ramulu <hema.ramulu@gmail.com>wrote:> Hi everyone, > Hi want to separate the string(column1) for example > > column1 column2 column3 column4 column5 column6 > bear b e a r > cat c a t > tiger t i g e r > > I know how to do this in excel where using MID function. > Now I want to solve it using R. The list of strings is in text file. I > looked up the help but did not find it. > Can someone help me here?H > > Thank you very much. > > Regards, > Hema > > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Hi r-help-bounces at r-project.org napsal dne 07.07.2009 09:54:30:> Hi everyone, > Hi want to separate the string(column1) for exampleWell, how did you get the data in R? Are they in separated columns of data.frame? What do you mean by "separate"?> > column1 column2 column3 column4 column5 column6 > bear b e a r > cat c a t > tiger t i g e r > > I know how to do this in excel where using MID function.As Microsoft is more user friendly and uses translated functions in language specific versions of Excel I do not have function MID. I suspect it takes values from middle of string set by some identifiers. If it is the case see ?substr However I would start with ?read.table and related read.* functions to get the data into R in appropriate shape. Regards Petr> Now I want to solve it using R. The list of strings is in text file. I > looked up the help but did not find it. > Can someone help me here? > > Thank you very much. > > Regards, > Hema > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Seemingly Similar Threads
- Some SQL Challenges
- Displaying median value over the horizontal(median)line in the boxplot
- Function to read a string as the variables as opposed to taking the string name as the variable
- R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis
- (no subject)