我在R中有一列看起来像 值 10.01% 20.02% 。 。 。
我希望它看起来像 值 10.01 20.02 ....
因为以前的版本默认情况下将其作为因素,所以我希望将该行视为小数。
答案 0 :(得分:1)
您可以使用var bullets = {
speed: 8,
array: []
}
var zombie = {
speed: 1,
array: []
}
// when bullet touches the zombie
if(zomb.x > bullets.array.x && zomb.x < bullets.array.x && zomb.y > bullets.array.y && zomb.y < bullets.array.y) {
alert()
}
(并且可能希望将其包装在gsub()
中以将其转换为“双精度”数据类型)
as.numeric()