Thanks Henrique. It works fine. Cheers! -Abhi
On Mon, Apr 5, 2010 at 1:41 PM, Henrique Dallazuanna <www...@gmail.com>wrote: > Try this: > > DF <- transform(DF, V1 = sprintf('number%d', V1)) > > > On Mon, Apr 5, 2010 at 2:38 PM, Abhishek Pratap <abhishek....@gmail.com> > wrote: > > Hi All > > > > I am looking for a way to prefix a constant value to all the rows in > column > > in a data frame. > > > > Eg. > > > > V1 > > 2 > > 3 > > 4 > > 5 > > > > I want to make it like this > > > > V1 > > number2 > > number3 > > number4 > > number5 > > > > Thanks! > > -Abhi > > > > [[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 > > and provide commented, minimal, self-contained, reproducible code. > > > > > > -- > Henrique Dallazuanna > Curitiba-Paraná-Brasil > 25° 25' 40" S 49° 16' 22" O > [[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 and provide commented, minimal, self-contained, reproducible code.