bsm objects, depending on the
eco.mem argument used when they were
fitted using the
brokenstick function, can contain numerous slots
brokenstick) keeping information about the high
sampling frequency data.
These information are usefull to get accurate computations in numerous cases but
need to be ignored in order to mimic abstracted dive profiles such as
those obtained by CTD-SRDL tags.
This function is a utility that allows to ignore these high sampling fequency
set the number of slot to ignore as the
A character indicating how the slots are to be handled.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
data(exses) bsm <- tdrply(brokenstick, 1:2, no = 100, obj = exses)[] bsm <- eco.mem(bsm, type = "ignore") try(predict(bsm)) # error: required slots treated as absent bsm <- eco.mem(bsm, type = "reset") predict(bsm) # slots were restored identical(bsm, x) # Use type = "delete" to save some memory lr_bytes <- object.size(eco.mem(bsm, type = "delete")) hr_bytes <- object.size(bsm) paste0(round(100 * as.numeric(lr_bytes / hr_bytes), digits = 2), "%") # Works on lists bsm <- eco.mem(tdrply(brokenstick, 1:2, no = 100:103, obj = exses), type = "delete") # Same as bsm <- tdrply(brokenstick, 1:2, no = 100:103, obj = exses, eco.mem = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.