[R] program to recognize words
ggrothendieck at gmail.com
Mon May 14 18:09:33 CEST 2007
Do you mean you want to separate out each sequence of characters that does
not contain whitespace? scan can do that:
> Line <- "if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100"
> scan(textConnection(Line), what = "")
Read 6 items
 "if" "C325=." "then"
 "C743=(C152/C103)*100|" "else" "C743=(C152/C325)*100"
On 5/14/07, elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:
> I need help because for my training I need to write a lil program which is able to read a line of character and it would recognize words
> for example for this line of character
> if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100
> the program will be able to recognize the IF ELSE syntaxe and the equations
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help