read.coord {SyNet}R Documentation

Read a List of Coordinates

Description

Organizes the distributional information about species. Data are provided as set of punctual records with latitude and longitude coordinates.

Usage

read.coord(inputfile = "")

Arguments

inputfile A character string naming the .txt file to read it.

Details

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.

Value

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.

Author(s)

Daniel A. Dos Santos

See Also

Objects of class dnpoint are required by the functions dotinfer, hullinfer, outgis and outgearth.

Examples

#####
# 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


[Package SyNet version 1.0 Index]