Try this: sapply(ls(patt="^dat[0-9]"), function(x)sd(get(x)))
On Wed, Sep 17, 2008 at 8:50 AM, Megh Dal <[EMAIL PROTECTED]> wrote: > [My previous message rejected, therefore I am sending same one with some > modification] > > I have 3 vectors with object name : dat1, dat2, dat3 > > Now I want to create a loop, like : > > for (i in 1:3) > { > cat(sd(dati)) > } > > How I can do this in R? > > Regards, > > ______________________________________________ > 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[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.