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?

If I use nchar(A) que gives me the number 50. With this function he is
counting all the letters present and also spaces between the words. Can we
also not count the spaces between words?

Then after I knew how many different letters there were on the vector I
wanted to table the number of times each letter is present to calculate the
relative frequency of each.

Is this possible with R?

Many thanks
A.Dias
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Relative-frequency-on-a-character-vector-tp3221319p3221319.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to