| read.mask {secr} | R Documentation |
Read coordinates of points on a habitat mask from a text file.
read.mask(file, spacing = NULL, ...)
file |
character string with name of text file |
spacing |
spacing of grid points in metres |
... |
other arguments to pass to read.table |
Usually, the x and y coordinates are the first two values on each line, separated by white space. If the file starts with a line of column headers and 'header = TRUE' is passed to read.table in the ... argument then 'x' and 'y' need not be the first two fields.
If the grid cell size spacing is not provided then an attempt is made to infer it from the minimum spacing of points. This can be slow and may demand more memory than is available. In rare cases (highly fragmented masks) it may also yield the wrong answer.
object of class mask with type 'user'
Murray Efford murray.efford@otago.ac.nz
## Replace file name with a valid local name and remove '#' # read.mask (file = 'c:\\myfolder\\mask.txt', spacing = 3, header = TRUE) ## 'mask.txt' should have lines like this # x y # 265 265 # 268 265 # ...