Re: [R] Automated generation of combinations

2011-09-12 Thread Andrej Blejec
Try this > ltr<-LETTERS[1:3] > unique(apply(expand.grid(ltr,ltr,ltr),1,function(x) > paste("Var",unique(sort(x)),collapse="+",sep=""))) [1] "VarA" "VarA+VarB" "VarA+VarC" "VarA+VarB+VarC" "

[R] FW: How to parse a string (by a "new" markup) with R ?

2010-03-16 Thread Andrej Blejec
g=closing[1], after=after[1])) } # # main part # # split sequence into stems # (stem0 <- getStem("^[.]*>{7}[.]*",Seq,Str)) (stem4 <-getStem("[.]*<{7}[.]*$",Seq,Str)) (str <- substring(Str,nchar(stem0[1])+1,nchar(Str)-nchar(stem4[1]))) (seq <- substring(Seq,nchar(stem0[1])+1,nchar(Seq)

Re: [R] Duplicates and duplicated

2009-05-14 Thread Andrej Blejec
gt; x[which(y)] [1] 4 > x%in%x[which(y)] [1] FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE Andrej -- Andrej Blejec National Institute of Biology Vecna pot 111 POB 141 SI-1000 Ljubljana SLOVENIA e-mail: andrej.ble...@nib.si URL: http://ablejec.nib.si tel: + 386 (0)59 232 789 f

Re: [R] reading Excel file

2008-03-25 Thread Andrej Blejec
(dateXls, "%x") datum 1 1.1.1901 2 1.1.1970 3 24.7.1953 Hope this helps, some more examples are in the file http://ablejec.nib.si/r/Date.pdf (with comments in Slovenian, sorry for that) Andrej -- Andrej Blejec National Institue of Biology Ljubljana, Slovenia > -Original Message-

Re: [R] Grouping by interval

2007-12-07 Thread Andrej Blejec
sLength),FUN=mean) LengthClass VarA VarB 1 [10,15] 1025 525 2 (15,20] 1080 580 3 (20,25] 1130 630 4 (25,30] 1180 680 -- Andrej Blejec National Institute of Biology Vecna pot 111 POB 141 SI-1000 Ljubljana SLOVENIA e-mail: [EMAIL PROTECTED] URL: http://ablejec.nib.si tel: + 386 1 423 33 88 fax: +