Skip to content

Commit

Permalink
Style: Change default fix to TRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
ybkamaleri committed Oct 25, 2023
1 parent 9ca2396 commit 679b2ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions R/track-change.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#' be used.
#'
#' @inheritParams get_code
#' @param fix Default is TRUE. Use external codes to fix geo changes manually.
#' The codes is sourced from
#' @param fix Default is FALSE. When TRUE then use external codes to fix geo
#' changes manually. The codes is sourced from
#' \href{https://github.com/helseprofil/config/blob/main/geo/}{config} files
#' depending on the granularity levels.
#' @return A dataset of class `data.table` consisting all older codes from
Expand All @@ -33,7 +33,7 @@ track_change <- function(type = c(
from = NULL,
to = NULL,
names = TRUE,
fix = TRUE) {
fix = FALSE) {

if (fix){
lifecycle::deprecate_soft(
Expand Down Expand Up @@ -72,10 +72,8 @@ track_change <- function(type = c(
if (!names)
DT[, (granularityNames) := NULL]

if (!fix)
return(DT)

DT <- alter_manual(DT, type)
if (fix)
DT <- alter_manual(DT, type)

return(DT)
}
Expand Down
6 changes: 3 additions & 3 deletions man/track_change.Rd

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

1 comment on commit 679b2ed

@ybkamaleri
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to issue #84

Please sign in to comment.