View source: R/crest.set_modern_data.R
crest.set_modern_data | R Documentation |
crestObj
with private data.Format a crestObj
with private data.
crest.set_modern_data(
distributions,
climate,
df = NA,
climate_space = NA,
weight = FALSE,
minGridCells = 20,
selectedTaxa = NA,
site_info = c(NA, NA),
site_name = NA,
site_climate = rep(NA, length(climate)),
verbose = TRUE
)
distributions |
A dataframe containing the presence records of the studied proxies and their associated climate values. |
climate |
A vector of the climate variables to extract. See
|
df |
A data frame containing the data to reconstruct (counts, percentages or presence/absence data). |
climate_space |
A dataframe of climate values across the study area
useful to correct for the imbalance of the sampling data (see
' |
weight |
The records in the distributions can be weighted using the
percentages by setting weight=TRUE. Include a column called 'weight'
in the |
minGridCells |
The minimum number of unique presence data necessary to estimate a species' climate response. Default is 20. |
selectedTaxa |
A data frame assigns which taxa should be used for each variable (1 if the taxon should be used, 0 otherwise). The colnames should be the climate variables' names and the rownames the taxa names. Default is 1 for all taxa and all variables. |
site_info |
A vector containing the coordinates of the study site.
Default |
site_name |
The name of the dataset (default |
site_climate |
The climate values at the location of the dataset
'(default |
verbose |
A boolean to print non-essential comments on the terminal
(default |
A crestObj
object containing the spatial distributions.
#> Reformating the example dataset to fit this function
distributions <- cbind('ProxyName'= rep('Taxon1', nrow(reconstr$modelling$distributions[[1]])),
reconstr$modelling$distributions[[1]],
stringsAsFactors = FALSE)
for(tax in names(reconstr$modelling$distributions)[-1]) {
distributions <- rbind(distributions,
cbind('ProxyName'= rep(tax, nrow(reconstr$modelling$distributions[[tax]])),
reconstr$modelling$distributions[[tax]],
stringsAsFactors = FALSE)
)
}
distributions <- distributions[, c(2,1,3:6)]
print(head(distributions))
climate_space <- reconstr$modelling$climate_space
print(head(climate_space))
x <- crest.set_modern_data(distributions, df=crest_ex,
climate = c("bio1", "bio12"))
x <- crest.set_modern_data(distributions, df=crest_ex,
climate_space=climate_space,
climate = c("bio1", "bio12"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.