Issue with proj4: Error: [project] 'to' cannot be missing

26 views Asked by At

I am trying to use randomforest to create an isoscape, but I'm having issues at the beginning.

plant <-readxl::read_excel("Table S1.xlsx",col_names=TRUE, na="NA", sheet="plant") soil <-readxl::read_excel("Table S1.xlsx",col_names=TRUE, na="NA", sheet="soil") water <-readxl::read_excel("Table S1.xlsx",col_names=TRUE, na="NA", sheet="water") animal <-readxl::read_excel("Table S1.xlsx",col_names=TRUE, na="NA", sheet="local animal") ###Ignore warnings

plant_proj<-project(as.matrix(plant[,c("Longitude","Latitude")]),"+proj=eck4 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs")

plant_proj<-project(as.matrix(plant[,c("Longitude","Latitude")]),"+proj=eck4 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs") Error: [project] 'to' cannot be missing

I'm extremely new to R, and really don't know what I'm gettin myself into. I don't understand why this line is not working, as I have successfully used a very similar structure in the past.

0

There are 0 answers