Skip to content

Commit

Permalink
working out bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ty-WDFW committed Nov 4, 2024
1 parent 0da4b86 commit ff73347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/copy.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ copy_fishery_scalers <- function(fram_db, from_run, to_run, fishery_id = NULL){
#' @param fram_db FRAM database object
#' @param target_run Run ID to be copied from
#' @param times Number of copies
#' @param label Label of each copy e.g. copy 1, copy 2
#' @export
#' @examples
#' \dontrun{framdb |> copy_run(target_run = 141, times = 1)}
#'
copy_run <- function(fram_db, target_run, times = 1, identifier = 'copy'){
copy_run <- function(fram_db, target_run, times = 1, label = 'copy'){

# target_run = 139
# times = 1
Expand Down Expand Up @@ -152,7 +153,7 @@ copy_run <- function(fram_db, target_run, times = 1, identifier = 'copy'){
run_insert <- run_target |>
dplyr::mutate(
RunID = .env$max_run_id + .env$i,
RunName = glue::glue(RunName, ' {identifier} {i}')
RunName = glue::glue(.data$RunName, ' {label} {i}')
) |>
dplyr::select(-.data$PrimaryKey)

Expand Down
4 changes: 3 additions & 1 deletion man/copy_run.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff73347

Please sign in to comment.