[R] Substring of a character column

2010-08-04 Thread LogLord
Hi, I have a dataframe with a rather complicated descriptive column (V9): > test3[(1:3), ] V1 V4 V5 10 1 4559 7173 17 1 58954 59871 19 1 357522 358458 V9 10 ID=NM_182905.1;Name=NM_182905;Alias=FLJ00038;Note=hypothetical protein LOC375690 17 ID=NM_001005484;Alias=OR4F5;Note=ol

Re: [R] Import of specific column of many space-delimited text files

2010-07-18 Thread LogLord
That worked perfectly well. Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Import-of-specific-column-of-many-space-delimited-text-files-tp2293273p2293342.html Sent from the R help mailing list archive at Nabble.com. __ R

[R] Import of specific column of many space-delimited text files

2010-07-18 Thread LogLord
Hi, I have about 300 space-delimited text files and from each file I want to import one specific column into R to create a data frame where all imported columns are included. Is there a smart way to do so? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Import-of-specifi

[R] Function on columns of a dataframe

2010-07-09 Thread LogLord
Hi, I would like to assign the largest value of a column to a specific category and repeat this for each column (v1 - v4). > x=c(1:12) > cat=c("cat1","cat5","cat2","cat2","cat1","cat5","cat3","cat4","cat5","cat2","cat3","cat6") > v1=rnorm(12,0.5,0.1) > v2=rnorm(12,0.3,0.2) > v3=rnorm(12,0.4,0.1)

Re: [R] Assigning entries to categories

2010-07-05 Thread LogLord
Gabor Grothendieck wrote: > > On Mon, Jul 5, 2010 at 8:54 AM, LogLord wrote: >> >> OK, thanks for the help! >> >> Here a more complex example: >> >> a=c("x","y","z") >> b=c(8,14,19) >> c=c(200010,535388,19929)

Re: [R] Assigning entries to categories

2010-07-05 Thread LogLord
OK, thanks for the help! Here a more complex example: a=c("x","y","z") b=c(8,14,19) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c("cat1","cat2","cat3","cat4","cat5","cat6") b1=c(14,5,8,20,19,1) c_start=c(50,50,20,20,18000,60) c_stop=c(55,55,201000,201000,2,

Re: [R] Assigning entries to categories

2010-07-03 Thread LogLord
Thanks for your help! You are right it is not one-to-one assigned that would be indeed very easy... its more like assigning 1000 entries to 60 categories... Unfortunately, the ?match and ?merge did not help me a lot... I am a newbie to such programming stuff in R. It would be great if you could

Re: [R] Assigning entries to categories

2010-07-01 Thread LogLord
As requested, here is some example data: a=c("x","y","z") b=c(1,5,8) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c("cat1","cat2","cat3") b1=c(1,5,8) c_start=c(20,50,60) c_stop=c(201000,55,70) category=data.frame(d,b1,c_start,c_stop) I want to add a variable into data, w

[R] Assigning entries to category

2010-06-30 Thread LogLord
Hi, I have the following problem: I have a large dataframe where each row is specified by two numerical value (one 1:25 and the other one large specific number (e.g. 203043)). I have a list of 60 categories which are also assigned to one of the first numerical value (1:25) but have a range for th

[R] Assigning entries to categories

2010-06-30 Thread LogLord
Hi, I have the following problem: I have a large dataframe where each row is specified by two numerical value (one 1:25 and the other one large specific number (e.g. 203043)). I have a list of 60 categories which are also assigned to one of the first numerical value (1:25) but have a range for th