read.coord {SyNet} | R Documentation |
Organizes the distributional information about species. Data are provided as set of punctual records with latitude and longitude coordinates.
read.coord(inputfile = "")
inputfile |
A character string naming the .txt file to read it. |
The input file must contain three fields separated by comma. A header is necessary to identify latitude from longitude. The first field must correspond to the ID of species. The second and third fields corresponds to longitude and latitude wihtout distinction of order priority. The rest of file corresponds to records.
An object of class dnpoint
, which is a list with elements:
Numpoints |
Number of read points. |
Points |
Data frame with columns (1) index of species, (2) Longitude and (3) Latitude. Coordinates are in decimal format. |
Label |
Character vector of species labels. |
Daniel A. Dos Santos
Objects of class dnpoint
are required by the functions dotinfer
,
hullinfer
, outgis
and outgearth
.
##### # 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 path where # the file 'proof.txt' was located ##### unlink("proof.txt") # Delete