I am just testing the possibility of using grep under for loop:

>for(i in 1:10){grep("a",letters)}


nothing came out;

when I ran: 


>grep("a",letters), 


I got "1"

so in my for loop, I expected to see ten "1"s, but I did not.

Could anybody help me to figure out why? Thanks a lot for your help.

Capricy
        [[alternative HTML version deleted]]

______________________________________________
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