[R] deleting the first two characters in each row of a factorized column

From: Bodnar Laszlo EB_HU <Laszlo.Bodnar_at_erstebank.hu>
Date: Mon, 28 Mar 2011 16:40:55 +0200


Hello,

I'd like to ask you something again.
I have a database and it has a column which looks like this one here:

small_factor <- factor(c("d_variable1","d_variable2","d_variable3")) small_factor

Now the thing is that I would like to convert each element of this factorized column. Basically I want to rewrite the words in it without the first two characters: "d" and "_" and I would like to get the followings as a result: "variable1", "variable2", "variable3".

Is there an easy way to do this?

Thank you,
Laszlo



Ez az e-mail √©s az √∂sszes hozz√° tartoz√≥ csatolt mell√©klet titkos √©s/vagy jogilag, szakmailag vagy m√°s m√≥don v√©dett inform√°ci√≥t tartalmazhat. Amennyiben nem √Ėn a lev√©l c√≠mzettje akkor a lev√©l tartalm√°nak k√∂zl√©se, reproduk√°l√°sa, m√°sol√°sa, vagy egy√©b m√°s √ļton t√∂rt√©nŇĎ terjeszt√©se, felhaszn√°l√°sa szigor√ļan tilos. Amennyiben t√©ved√©sbŇĎl kapta meg ezt az √ľzenetet k√©rj√ľk azonnal √©rtes√≠tse az √ľzenet k√ľldŇĎj√©t. Az Erste Bank Hungary Zrt. (EBH) nem v√°llal felelŇĎss√©get az inform√°ci√≥ teljes √©s pontos - c√≠mzett(ek)hez t√∂rt√©nŇĎ - eljuttat√°s√°√©rt, valamint semmilyen k√©s√©s√©rt, kapcsolat megszakad√°sb√≥l eredŇĎ hib√°√©rt, vagy az inform√°ci√≥ felhaszn√°l√°s√°b√≥l vagy annak megb√≠zhatatlans√°g√°b√≥l eredŇĎ k√°r√©rt.

Az √ľzenetek EBH-n k√≠v√ľli k√ľldŇĎje vagy c√≠mzettje tudom√°sul veszi √©s hozz√°j√°rul, hogy az √ľzenetekhez m√°s banki alkalmazott is hozz√°f√©rhet az EBH folytonos munkamenet√©nek biztos√≠t√°sa √©rdek√©ben.

This e-mail and any attached files are confidential and/...{{dropped:19}}



R-help_at_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. Received on Mon 28 Mar 2011 - 14:43:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Mar 2011 - 15:20:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive