Oh, yeah, too simple... Thank you all! 2008/1/14, Richard M. Heiberger <[EMAIL PROTECTED]>: > > a <- 1:10*4 > > ceiling(a/10)*10 > [1] 10 10 20 20 20 30 30 40 40 40 > > > > -----Original Message----- > Lauri Nikkinen > > Is there a function for ceiling to the nearest ten? > > a <- 1:10*4 > a > [1] 4 8 12 16 20 24 28 32 36 40 > > The resulting vector should look like this ("ceiling to the nearest ten") > [1] 10 10 20 20 20 30 30 40 40 40 > > Thanks in advance > Lauri > >
______________________________________________ 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.