Hi R User,
I was trying to convert a decimal value into integral (whole number). I used
round function but some of the cells have the value less than 0.5 and it
converted into 0. But I wanted these cell to have 1 instead of 0. Another way,
I could multiply by 10. But l did not want it because
What about:
ceiling(data[,2:3])
A B
1 0 1
2 3 1
3 3 3
4 2 3
Note that ceiling is referenced in ?round
Thanks for the clear reproducible example.
Sarah
On Thu, Mar 20, 2014 at 3:42 PM, Kristi Glover
kristi.glo...@hotmail.com wrote:
Hi R User,
I was trying to convert a decimal value into
On 20-Mar-2014 19:42:35 Kristi Glover wrote:
Hi R User,
I was trying to convert a decimal value into integral (whole number). I used
round function but some of the cells have the value less than 0.5 and it
converted into 0. But I wanted these cell to have 1 instead of 0. Another
way, I could
Try ?ceiling
ceiling(0.4)
[1] 1
B.
On 2014-03-20, at 3:42 PM, Kristi Glover wrote:
Hi R User,
I was trying to convert a decimal value into integral (whole number). I used
round function but some of the cells have the value less than 0.5 and it
converted into 0. But I wanted these
4 matches
Mail list logo