![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Illumina iScan example data sets | c_ro87 | Bioinformatics | 0 | 09-14-2012 09:12 AM |
Rename fastq seq ID with unique identifier | 454rocks | Bioinformatics | 2 | 03-28-2012 12:29 PM |
batch rename multiple fasta | Pedro | Bioinformatics | 3 | 03-19-2012 12:35 PM |
public data sets | muchomaas | Bioinformatics | 2 | 06-08-2010 01:48 AM |
sff_extract: combining data from 454 Flx and Titanium data sets | agroster | Bioinformatics | 7 | 01-14-2010 10:19 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: Spain Join Date: Nov 2013
Posts: 28
|
![]()
Hello! Sorry if my question seems a bit stupid, cause I think it has to be easy, but I don't have enough knowhow...
I want to rename a character string in R which contains numbers. It's something like this: "3435" "4364" a.s.o. I want to change that so there are words before the numbers. There must be the same words for the whole length of the object, like this: "mygenes_3435" "mygenes_4364"... is there a command to do this? Would it be similar if I wanted to rename a data.frame for example? I really need help, it's very urgent! =( Last edited by IsBeth; 05-22-2014 at 06:54 AM. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: Pathum Thani, Thailand Join Date: Nov 2009
Posts: 190
|
![]()
call that string MyString
NewString <- paste("mygenes_", MyString, sep="") If that is a column of a data frame called DF DF$MyString <- paste("mygenes_", DF$MyString, sep="") |
![]() |
![]() |
![]() |
#3 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
Another option is sprintf:
Code:
NewString <- sprintf("mygenes_%s", MyString) |
![]() |
![]() |
![]() |
Thread Tools | |
|
|