From 6f8141da4d010b5febf6dedb2112eb8cfe78b1cb Mon Sep 17 00:00:00 2001 From: DylanCarbone Date: Wed, 24 Jan 2024 17:44:15 +0000 Subject: [PATCH] small error fixes to RMD and occDetFunc function --- R/occDetFunc.r | 5 +++-- pre_vignette/sparta_vignette.Rmd | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/occDetFunc.r b/R/occDetFunc.r index a8eba0a..f806a06 100644 --- a/R/occDetFunc.r +++ b/R/occDetFunc.r @@ -716,8 +716,9 @@ occDetFunc <- function (taxa_name, occDetdata, spp_vis, n_iterations = 5000, nyr # get the sessionInfo and coerce into a useable format session.info <- sessionInfo() - packages <- c(sapply(session.info[7][[1]], function(x) x$Version), - sapply(session.info[8][[1]], function(x) x$Version)) + + packages <- c(sapply(session.info$otherPkgs, function(x) x$Version), + sapply(session.info$loadedOnly, function(x) x$Version)) MD <- list(method = 'sparta::occDetFunc', call = call <- match.call(), diff --git a/pre_vignette/sparta_vignette.Rmd b/pre_vignette/sparta_vignette.Rmd index 2761dca..fff171d 100644 --- a/pre_vignette/sparta_vignette.Rmd +++ b/pre_vignette/sparta_vignette.Rmd @@ -417,7 +417,7 @@ str(myData) system.time({ occ_out <- occDetModel(taxa = myData$taxa, site = myData$site, - time_period = myData$time_period, + survey = ymd(myData$time_period), species_list = c('a','b','c','d'), write_results = FALSE, n_iterations = 200,