From 7b79ffd02d827de38020752d30b2ceaa1b66716b Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 16 Dec 2025 11:57:27 +0100 Subject: [PATCH 1/3] docs: Add link to PM_model$fit in internal function fit --- R/extendr-wrappers.R | 2 ++ man/fit.Rd | 6 +++++- src/rust/src/lib.rs | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/R/extendr-wrappers.R b/R/extendr-wrappers.R index c7c3b3552..20dca60ef 100755 --- a/R/extendr-wrappers.R +++ b/R/extendr-wrappers.R @@ -50,6 +50,8 @@ dummy_compile <- function(template_path) .Call(wrap__dummy_compile, template_pat is_cargo_installed <- function() .Call(wrap__is_cargo_installed) #' Fits the model at the given path to the data at the given path using the provided parameters. +#' NOTE: This is an internal function and should not be called directly. +#' See [PM_model] `$fit()` method for arguments. #' @param model_path Path to the compiled model file. #' @param data Path to the data file. #' @param params List of fitting parameters. diff --git a/man/fit.Rd b/man/fit.Rd index 443b982f7..f6bd1cf36 100644 --- a/man/fit.Rd +++ b/man/fit.Rd @@ -2,7 +2,9 @@ % Please edit documentation in R/extendr-wrappers.R \name{fit} \alias{fit} -\title{Fits the model at the given path to the data at the given path using the provided parameters.} +\title{Fits the model at the given path to the data at the given path using the provided parameters. +NOTE: This is an internal function and should not be called directly. +See \link{PM_model} \verb{$fit()} method for arguments.} \usage{ fit(model_path, data, params, output_path, kind) } @@ -22,4 +24,6 @@ Result of the fitting process. } \description{ Fits the model at the given path to the data at the given path using the provided parameters. +NOTE: This is an internal function and should not be called directly. +See \link{PM_model} \verb{$fit()} method for arguments. } diff --git a/src/rust/src/lib.rs b/src/rust/src/lib.rs index d280ceff1..9c5b93e17 100755 --- a/src/rust/src/lib.rs +++ b/src/rust/src/lib.rs @@ -117,8 +117,9 @@ fn simulate_all( rows.into_dataframe().unwrap() } - /// Fits the model at the given path to the data at the given path using the provided parameters. +/// #' NOTE: This is an internal function and should not be called directly. +/// #' See [PM_model] `$fit()` method for arguments. /// @param model_path Path to the compiled model file. /// @param data Path to the data file. /// @param params List of fitting parameters. @@ -307,4 +308,4 @@ extendr_module! { // To generate the exported function in R, run the following command: // rextendr::document() // Optional: reload Pmetrics -// devtools::load_all() \ No newline at end of file +// devtools::load_all() From 6cd32be7c64cb977a2bebfe5b61fa9cad2ec7b94 Mon Sep 17 00:00:00 2001 From: Markus Hovd Date: Wed, 17 Dec 2025 10:18:18 +0100 Subject: [PATCH 2/3] Update src/rust/src/lib.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rust/src/lib.rs b/src/rust/src/lib.rs index 9c5b93e17..99f28f790 100755 --- a/src/rust/src/lib.rs +++ b/src/rust/src/lib.rs @@ -119,7 +119,7 @@ fn simulate_all( /// Fits the model at the given path to the data at the given path using the provided parameters. /// #' NOTE: This is an internal function and should not be called directly. -/// #' See [PM_model] `$fit()` method for arguments. +/// #' See [PM_model()] `$fit()` method for arguments. /// @param model_path Path to the compiled model file. /// @param data Path to the data file. /// @param params List of fitting parameters. From 97feabee35182d29f9a02442dc75d1f831dac09f Mon Sep 17 00:00:00 2001 From: Markus Hovd Date: Wed, 17 Dec 2025 10:18:39 +0100 Subject: [PATCH 3/3] Update R/extendr-wrappers.R Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- R/extendr-wrappers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/extendr-wrappers.R b/R/extendr-wrappers.R index 20dca60ef..a2ae2137f 100755 --- a/R/extendr-wrappers.R +++ b/R/extendr-wrappers.R @@ -51,7 +51,7 @@ is_cargo_installed <- function() .Call(wrap__is_cargo_installed) #' Fits the model at the given path to the data at the given path using the provided parameters. #' NOTE: This is an internal function and should not be called directly. -#' See [PM_model] `$fit()` method for arguments. +#' See [PM_model()] `$fit()` method for arguments. #' @param model_path Path to the compiled model file. #' @param data Path to the data file. #' @param params List of fitting parameters.