Hi I’m getting an error and I’m unsure how to fix:
> proj4string(setop.dat) <- CRS("+proj=longlat +datum=WGS84
+ +no_defs +ellps=WGS84 +towgs84=0,0,0")
**Error in `proj4string<-`(`*tmp*`, value = new("CRS", projargs = "+proj=longlat +datum=WGS84 +no_defs")) :**
**Geographical CRS given to non-conformant data: -121.6213191**
I am setting up to conduct SDMs. I have been following along with this workshop: https://griffithdan.github.io/.../SDM-Workshop-OSU...
This is my code so far:
setop.dat = read.csv("C:…………………………setophaga.virens.csv")
colnames(setop.dat)
colnames(setop.dat) <- c("ID", "latitude", "longitude", "Provider", "observed_on")
coordinates(setop.dat) <- ~ latitude + longitude
setop.dat <- SpatialPointsDataFrame(coords = coordinates(setop.dat),
data = data.frame(setop.dat))
proj4string(setop.dat) <- CRS("+proj=longlat +datum=WGS84
+no_defs +ellps=WGS84 +towgs84=0,0,0")
After I solve that error I'd be projecting onto a simple map:
map(database = "usa")
points(setop.dat)
Any help is greatly appreciated.