Re: [R] Odp: Relative frequency on a character vector

2011-01-20 Thread Ista Zahn
Hi, On Tue, Jan 18, 2011 at 3:48 PM, ADias wrote: > > I have done like this to get the result I need more directly > > A<-c("Tell me how many different letter this vector has?") > prop.table(table(strsplit(A,""))) > >        ?    a    c    d    e    f    h    i    l    m    n    o    r    s > t >

Re: [R] Odp: Relative frequency on a character vector

2011-01-18 Thread ADias
I have done like this to get the result I need more directly A<-c("Tell me how many different letter this vector has?") prop.table(table(strsplit(A,""))) ?acdefhilmnors t 0.16 0.02 0.04 0.02 0.02 0.14 0.04 0.06 0.04 0.06 0.04 0.04 0

Re: [R] Odp: Relative frequency on a character vector

2011-01-18 Thread ADias
> BTW. There are help pages coming with R installation. Do you have them > corrupted? There is strsplit in see also section of nchar help page. > yes I do. But I have many dificulties in finding what I need. And on top of that R has a very specific way of working that is quite diferent from w

[R] Odp: Relative frequency on a character vector

2011-01-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.01.2011 13:51:05: > > Hi, > > I have this character vector: > > A<-c("Tell me how many different letter this vector has?") > > Is there a way with R that it can let me know how many different letters I > have on this vector? A<-c("Tell me how ma