Description Usage Arguments Details Value Author(s) Examples
Marked set of points are read from a given input file. Both geographical and Cartesian coordinates are accepted.
1 | read.coord(inputfile = "", type = "geographical")
|
inputfile |
Filename with complete path. By default, a Windows file dialog is open to choose the input file. |
type |
A character string naming the coordinate system in which points have been referenced. A partial matching is performed against these arguments: "geographical" and "cartesian". |
The input file should have three fields separated by commas. A header (i.e. first line) is required to differentiate latitude from longitude accurately. The first field must hold the species IDs. The second and third fields corresponds to the longitude and latitude indistinctly. If points are derived from a Cartesian system of coordinates, longitude and latitude fields will be interpreted as the abscissa and ordinate respectively.
An object of class dnpoint
, which is a list with elements:
Numpoints |
Number of read points. |
Points |
Data frame with columns (1) indices for species, (2) Longitude and (3) Latitude. Coordinates are in decimal format. |
Label |
Character vector of species labels. |
Type |
String specifying the type of coordinate system passed as argument. |
Daniel A. Dos Santos <dadossantos@csnat.unt.edu.ar>
1 2 3 4 5 6 7 8 9 10 11 | #####
# You can recognize the format of a typical input file
# in the following created .txt:
write(c("sp", "latitude", "longitude"), file= "proof.txt", 3, TRUE, sep = ",")
for (i in 1:10)
write(c(LETTERS[i], i*1.5, i*-8.6),file= "proof.txt", 3, TRUE, sep = ",")
proof <- read.coord("proof.txt") # Put getwd() to identify the path where
# the file 'proof.txt' has been located
#####
unlink("proof.txt") # Delete
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.