Commit 673218ee authored by Daniela Rabe's avatar Daniela Rabe
Browse files

argument fixed, updated documentation

parent a8a02e16
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
#' @param save_runs if the user wants to save the runs, if TRUE the complete Habitat Class object is returned #' @param save_runs if the user wants to save the runs, if TRUE the complete Habitat Class object is returned
#' @param parallel_mode run loops in parallel #' @param parallel_mode run loops in parallel
#' @param max_num_cores maximum number of cores for parallelism #' @param max_num_cores maximum number of cores for parallelism
#' @param progress_bar if true use a normal progress bar, otherwise a shiny's progress bar #' @param progress_bar if true use a normal progress bar, otherwise a shiny progress bar
#' @param session shiny session, needed for progress bar update
#' #'
#' @return a list with 5 elements: #' @return a list with 5 elements:
#' 1) returns 0 succeeded, 1 increase init.samples, or 2 increase init.samples and nb_models #' 1) returns 0 succeeded, 1 increase init.samples, or 2 increase init.samples and nb_models
...@@ -233,7 +234,7 @@ sample_nb <- function(raster, ...@@ -233,7 +234,7 @@ sample_nb <- function(raster,
shinyWidgets::updateProgressBar( shinyWidgets::updateProgressBar(
session = session, session = session,
id = "pbar", id = "pbar",
value = (nb_mean+jj) / (nb_mean + nrow(reference)), value = jj,
total = nrow(reference), total = nrow(reference),
title = paste("Doing prediction for class", jj) title = paste("Doing prediction for class", jj)
) )
......
...@@ -22,7 +22,8 @@ sample_nb( ...@@ -22,7 +22,8 @@ sample_nb(
save_runs, save_runs,
parallel_mode, parallel_mode,
max_num_cores, max_num_cores,
progress_bar = TRUE progress_bar = TRUE,
session
) )
} }
\arguments{ \arguments{
...@@ -58,7 +59,9 @@ sample_nb( ...@@ -58,7 +59,9 @@ sample_nb(
\item{max_num_cores}{maximum number of cores for parallelism} \item{max_num_cores}{maximum number of cores for parallelism}
\item{progress_bar}{if true use a normal progress bar, otherwise a shiny's progress bar} \item{progress_bar}{if true use a normal progress bar, otherwise a shiny progress bar}
\item{session}{shiny session, needed for progress bar update}
\item{nb_models}{number of models (independent classifiers) to collect} \item{nb_models}{number of models (independent classifiers) to collect}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment