0

I have never used R before and haven't found good docs on is.numeric() or double() online.

Very simply, I am trying to take two integers and put them in a double, which I want to put in a vector, which will enter as a column. I'm trying to solve the former part.

endlat <- df[i, "end.station.latitude"]
endlong <- df[i, "end.station.longitude"]
end <- as.double(endlat, endlong)

This only stores one of the values in the variable. How does this function work?

4

1 回答 1

1

你想要

as.double(c(endlat, endlong))

这会将包含和的整数长度为 2 的向量传递给,它只接受一个参数。endlatendlongas.double

于 2014-05-25T19:47:27.267 回答