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
[1] "if"                    "C325=."                "then"
[4] "C743=(C152/C103)*100|" "else"                  "C743=(C152/C325)*100"


On 5/14/07, elyakhlifi mustapha <[EMAIL PROTECTED]> wrote:
> hello,
> 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
> thanks
>
>
>      
> _____________________________________________________________________________
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
>

______________________________________________
[email protected] 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