Description Usage Arguments Value See Also Examples
View source: R/calc_similarity.R
Uses the parameters specified by the function createParameters
. Extracts climatic data from the reference site and compares with every pixel in the search range. Returns a map (RasterLayer) of the search range filled with the calculated climatic similarity.
1 | calc_similarity(params)
|
params |
List of required input parameters, as specified to function |
RasterLayer with the calculated similarity.
ref_vals
,rota_stack
,similarity
1 2 3 4 5 6 7 8 9 10 | data(climstack) #contains 2 RasterStack objects: prec and tavg
#create params, give equal weights to both variables
params <- createParameters(x=-75.5, y=3.2, vars=c("prec","tmean"),weights=c(0.5,0.5),
ndivisions=c(12,12),growing.season=c(1,12),rotation="tmean",threshold=1,
env.data.ref=list(prec,tavg), env.data.targ=list(prec,tavg),
outfile="~/.",fname='similarity',writefile=FALSE)
#calculate similarity
sim_out <- calc_similarity(params)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.