Hi all,

I'm trying to find out what is the equivalent in R for the following Stata
code:

Let's say I have the variables: a1, a2, a3, a4, a5

forvalues i = 1(1)5 {
    summary a`i'
}

That is, I want to know how to loop through variables in R.

Thank you in advance,

Luana

        [[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