if (FALSE) {
#Generic example with a few occurrences
occdf <- data.frame(lng = c(2, -103, -66),
lat = c(46, 35, -7),
age = c(88, 125, 200))
#Calculate palaeocoordinates using reconstruction files
ex1 <- palaeorotate(occdf = occdf, method = "grid")
#Calculate palaeocoordinates using the GPlates API
ex2 <- palaeorotate(occdf = occdf, method = "point")
#Calculate uncertainity in palaeocoordinates from models
ex3 <- palaeorotate(occdf = occdf,
method = "grid",
model = c("MERDITH2021",
"GOLONKA",
"PALEOMAP"),
uncertainty = TRUE)
#Now with some real fossil occurrence data!
#Grab some data from the Paleobiology Database
data(tetrapods)
#Assign midpoint age of fossil occurrence data for reconstruction
tetrapods$age <- (tetrapods$max_ma + tetrapods$min_ma)/2
#Rotate the data
ex3 <- palaeorotate(occdf = tetrapods)
#Calculate uncertainity in palaeocoordinates from models
ex4 <- palaeorotate(occdf = tetrapods,
model = c("MERDITH2021",
"GOLONKA",
"PALEOMAP"),
uncertainty = TRUE)
}
Run the code above in your browser using DataLab