The input can be a list of two or more vectors (if the list contains
more than two entries, only first two entries are used and a warning
is issued), a two-dimensional matrix or array (the number of columns
or rows must be exactly two) or a vector of the length 2. For a 2x2
input the columns are taken as x
and y
. If the input
is a list then the result will be a list with the entries named
x
and y
, otherwise the result is a matrix with two
columns.
When the list form is used, inputs are recycled with a warning when
necessary.
proj
specifies the target (or source if inverse)
projection. The format can be either a single (unnamed) string which
contains all parameters:
"+proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96"
or an unnamed vector of complete individual parameters:
c("+proj=lcc","+lat_1=33","+lat_2=45","+lat_0=39","+lon_0=-96")
or a named vector or list that will be composed into parameters:
list(proj="lcc", lat_1=33, lat_2=45, lat_0=39, lon_0=-96)
if degrees
is TRUE
then the latitude and longitude are
expected to be in degrees, if FALSE
then in radians.