Selecting a range of longitude and latitudes
It appears that you might have mistakenly typed cbind(103:110, 3:16) instead of cbind(103:116, 3:16). Regardless, the warning is telling you that the vectors were of unequal lengths and there was some recycling. You can learn about recycling rule from searching "recycling rule in R" and also from R's Introduction manual at https://cran.r-project.org/doc/manuals/r-release/R-intro.html#The-recycling-rule . HTH, Vijay On Thu, Apr 18, 2019 at 8:38 PM rain1290--- via R-sig-Geo <
r-sig-geo at r-project.org> wrote:
Hi there,
I am trying to specify a range of longitudes and latitudes. I tried this
using the following:
lonlat <- cbind(103:116, 3:16) #This would specify a range of longitudes
and latitudes
However, I receive the following warning message:
Warning message:
In cbind(103:110, 3:16) :
number of rows of result is not a multiple of vector length (arg 1)
When I specify the longitude and latitude of a specific location, though,
it works just fine, like this:
lonlat <- cbind(103, 3)
Am I specifying the ranges of coordinates incorrectly? The warning message
would suggest yes, but I do not understand why.
Thanks, and any help with this would be greatly appreciated!
~Trav.~
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo