Re: [R] Odp: character count

2008-12-12 Thread Petr PIKAL
Ok, I knew somebody come with regex solution. My regex skills are limited so I do not use it very often. Regards Petr r-help-boun...@r-project.org napsal dne 12.12.2008 17:03:38: > On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote: > > Hi > > > > > > r-help-boun...@r-project.org napsal dne 1

Re: [R] Odp: character count

2008-12-12 Thread Henrique Dallazuanna
Or : nchar(gsub("[[:space:]]", "", x)) On Fri, Dec 12, 2008 at 2:00 PM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > > > Dear list, > > I have a variable that consists of typed responses. I wish to compute > > a variable equal to the number of cha

Re: [R] Odp: character count

2008-12-12 Thread Gabor Grothendieck
On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > >> Dear list, >> I have a variable that consists of typed responses. I wish to compute >> a variable equal to the number of characters in the original variable. >> For exam

[R] Odp: character count

2008-12-12 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > Dear list, > I have a variable that consists of typed responses. I wish to compute > a variable equal to the number of characters in the original variable. > For example: > > > x <- c("convert this to 32 because it has 32 charact