Hello together,
i want to round some numbers in my data.frame.
How can i round a number to values like 0.5; 1.0; 1.5; 2.0; etc.
It should look like this one
before
2.2 ; 2.3; 2.26; 1.11
after
2.0; 2.5; 2.5; 1.0
thanks.
Mat
--
View this message in context:
On 07.01.2013 09:59, Mat wrote:
Hello together,
i want to round some numbers in my data.frame.
How can i round a number to values like 0.5; 1.0; 1.5; 2.0; etc.
It should look like this one
before
2.2 ; 2.3; 2.26; 1.11
after
2.0; 2.5; 2.5; 1.0
round(2*x)/2
Uwe Ligges
thanks.
Mat
thx, works perfektly :-)
--
View this message in context:
http://r.789695.n4.nabble.com/round-2-3-to-2-5-and-2-2-to-2-0-tp4654813p4654829.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
3 matches
Mail list logo