[R-sig-Geo] Selecting a range of longitude and latitudes

Vijay Lulla v|j@y|u||@ @end|ng |rom gm@||@com
Fri Apr 19 03:24:54 CEST 2019


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 using 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 using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list