diff --git a/R/find_rev.R b/R/find_rev.R index 720eaea9..b4dbd27b 100644 --- a/R/find_rev.R +++ b/R/find_rev.R @@ -778,11 +778,8 @@ nix_build_exit_msg <- function(x) { #' code ran between two software environments with `rix::with_nix()`. #' #' @param project_path Character with the folder path to the isolated nix-R project. -#' Defaults to `"."`, which is the current path in the working directory. If the folder +#' Defaults to `"."`, which is the current working directory path. If the folder #' does not exist yet, it will be created. -#' @param message_type Character. Message type, defaults to `"simple"`, which -#' gives minimal but sufficient feedback. Other values are currently -#' `"verbose"`, which provides more detailed diagnostics. #' @param rprofile_action Character. Action to take with `.Rprofile` file #' destined for `project_path` folder. Possible values include #' `"create_missing"`, which only writes `.Rprofile` if it @@ -793,13 +790,15 @@ nix_build_exit_msg <- function(x) { #' `"overwrite"` overwrites the `.Rprofile` file if it does exist; `"append"` #' appends the existing file with code that is tailored to an isolated Nix-R #' project setup. -#' +#' @param message_type Character. Message type, defaults to `"simple"`, which +#' gives minimal but sufficient feedback. Other values are currently +#' `"verbose"`, which provides more detailed diagnostics. #' @export #' @seealso [with_nix()] init <- function(project_path = ".", - message_type = c("simple", "verbose"), rprofile_action = c("create_missing", "create_backup", - "overwrite", "append")) { + "overwrite", "append"), + message_type = c("simple", "verbose")) { message_type <- match.arg(message_type, choices = c("simple", "verbose")) rprofile_action <- match.arg(rprofile_action, choices = c("create_backup", "create_missing", "overwrite", "append")) diff --git a/dev/build_envs.Rmd b/dev/build_envs.Rmd index 61d578c0..7926a164 100644 --- a/dev/build_envs.Rmd +++ b/dev/build_envs.Rmd @@ -877,11 +877,8 @@ via Nix #' code ran between two software environments with `rix::with_nix()`. #' #' @param project_path Character with the folder path to the isolated nix-R project. -#' Defaults to `"."`, which is the current path in the working directory. If the folder +#' Defaults to `"."`, which is the current working directory path. If the folder #' does not exist yet, it will be created. -#' @param message_type Character. Message type, defaults to `"simple"`, which -#' gives minimal but sufficient feedback. Other values are currently -#' `"verbose"`, which provides more detailed diagnostics. #' @param rprofile_action Character. Action to take with `.Rprofile` file #' destined for `project_path` folder. Possible values include #' `"create_missing"`, which only writes `.Rprofile` if it @@ -892,13 +889,15 @@ via Nix #' `"overwrite"` overwrites the `.Rprofile` file if it does exist; `"append"` #' appends the existing file with code that is tailored to an isolated Nix-R #' project setup. -#' +#' @param message_type Character. Message type, defaults to `"simple"`, which +#' gives minimal but sufficient feedback. Other values are currently +#' `"verbose"`, which provides more detailed diagnostics. #' @export #' @seealso [with_nix()] init <- function(project_path = ".", - message_type = c("simple", "verbose"), rprofile_action = c("create_missing", "create_backup", - "overwrite", "append")) { + "overwrite", "append"), + message_type = c("simple", "verbose")) { message_type <- match.arg(message_type, choices = c("simple", "verbose")) rprofile_action <- match.arg(rprofile_action, choices = c("create_backup", "create_missing", "overwrite", "append")) diff --git a/man/init.Rd b/man/init.Rd index d6166a7a..dd2be96b 100644 --- a/man/init.Rd +++ b/man/init.Rd @@ -7,19 +7,15 @@ setup via Nix.} \usage{ init( project_path = ".", - message_type = c("simple", "verbose"), - rprofile_action = c("create_missing", "create_backup", "overwrite", "append") + rprofile_action = c("create_missing", "create_backup", "overwrite", "append"), + message_type = c("simple", "verbose") ) } \arguments{ \item{project_path}{Character with the folder path to the isolated nix-R project. -Defaults to \code{"."}, which is the current path in the working directory. If the folder +Defaults to \code{"."}, which is the current working directory path. If the folder does not exist yet, it will be created.} -\item{message_type}{Character. Message type, defaults to \code{"simple"}, which -gives minimal but sufficient feedback. Other values are currently -\code{"verbose"}, which provides more detailed diagnostics.} - \item{rprofile_action}{Character. Action to take with \code{.Rprofile} file destined for \code{project_path} folder. Possible values include \code{"create_missing"}, which only writes \code{.Rprofile} if it @@ -30,6 +26,10 @@ POSIXct-derived strings that include the time zone information. A new \code{"overwrite"} overwrites the \code{.Rprofile} file if it does exist; \code{"append"} appends the existing file with code that is tailored to an isolated Nix-R project setup.} + +\item{message_type}{Character. Message type, defaults to \code{"simple"}, which +gives minimal but sufficient feedback. Other values are currently +\code{"verbose"}, which provides more detailed diagnostics.} } \description{ Creates an isolated project folder for a Nix-R configuration. \code{rix::init()}