What is the required format of the data for a space usage analysis in the adehabitatHR package in R?

2

I'm working with location data (latitude and longitude coordinates obtained in GPS) to delimit areas of life with kernel and MCP in the AdehabitatHR package. I have already prepared the excel file containing individuals' names, information such as gender and reproductive condition, and the X and Y coordinates.

What I have is something similar to the one below, but including at least 50 individuals and several locations of each:

Ind Sex  X        Y
A    1   19.10991 -48.23536
B     2  19.11009 -48.23545

I follow the package commands and ask to convert the file to sp:

coordinates(track) <- c("X", "Y")

And I still get the same error:

Error in '[.data.frame'(object, , value) : undefined columns selected

I've also tried to do it differently:

tracksp<- SpatialPoints(track)

And then I get the error below:

Error in .checkNumericCoerce2double(obj) : 
  cannot retrieve coordinates from non-numeric elements

I'm stuck. I believe it's the format that my coordinates are appearing in excel so that R can understand them. Can you help me?

Thank you

    
asked by anonymous 14.11.2016 / 19:04

0 answers