Hi Raphael, mat <- matrix(rnorm(100), ncol = 2) round(mat, 2)
for documentation see ?round Cheers, Josh On Mon, Sep 20, 2010 at 9:21 AM, Raphael Fraser <raphael.fra...@gmail.com> wrote: > I have a 2x50 matrix and would like to round all the elements to 2 > decimal places. Can any one help? > > Thanks, > Raphael > > ______________________________________________ > 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. > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ ______________________________________________ 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.