data("warps")
data("turtles")
warps_fnc <- as_fnc_df(warps,
func.names = c("hydro", "fea"))
kr_surf <- krige_surf(warps_fnc, new_data = turtles)
grid_weights <- generate_weights(n = 20, data = kr_surf)
all_lscps <- calc_all_lscps(kr_surf,
grid_weights = grid_weights)
all_lscps
# Extract the weighted surface for a single set
# of weights (here, the 6th set of weights)
grid_weights[6,]
wtd_lscp_6 <- calc_lscp(all_lscps, i = 6)
wtd_lscp_6
# This aligns with the weighted fitness value:
mean(all_lscps$wtd_lscps$new_data[,6])
Run the code above in your browser using DataLab