Skip to content

Commit

Permalink
remove merge conflict nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelos Zhu committed Oct 6, 2023
1 parent 5ce0b17 commit e34b55b
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 304 deletions.
4 changes: 0 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
Package: admiral
Type: Package
Title: ADaM in R Asset Library
<<<<<<< HEAD
Version: 0.12.1
=======
Version: 0.12.2.9000
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
Authors@R: c(
person("Ben", "Straub", email = "ben.x.straub@gsk.com", role = c("aut", "cre")),
person("Stefan", "Bundfuss", role = "aut"),
Expand Down
4 changes: 0 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ export(derive_var_atoxgr)
export(derive_var_atoxgr_dir)
export(derive_var_base)
export(derive_var_chg)
<<<<<<< HEAD
export(derive_var_confirmation_flag)
=======
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
export(derive_var_dthcaus)
export(derive_var_extreme_dt)
export(derive_var_extreme_dtm)
Expand Down
3 changes: 0 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<<<<<<< HEAD
=======
# admiral (development version)

## New Features
Expand Down Expand Up @@ -38,7 +36,6 @@

- A unit test for `derive_param_computed()` was modified in anticipation of major user-facing changes to R version 4.4 (#2147)

>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
# admiral 0.12.1

- `derive_extreme_records()` no longer fails if `dataset_add` is specified and a
Expand Down
6 changes: 0 additions & 6 deletions R/compute_kidney.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,7 @@
compute_egfr <- function(creat, creatu = "SI", age, weight, sex, race = NULL, method, wt) {
### BEGIN DEPRECATION
if (!missing(wt)) {
<<<<<<< HEAD
deprecate_warn("0.12.0", "compute_egfr(old_param = 'wt')", "compute_egfr(new_param = 'weight')")
# old_param is given using exprs()
weight <- wt
=======
deprecate_stop("0.12.0", "compute_egfr(old_param = 'wt')", "compute_egfr(new_param = 'weight')")
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
}
### END DEPRECATION

Expand Down
12 changes: 0 additions & 12 deletions R/derive_expected_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@
#' @param dataset
#' `r roxygen_param_dataset(expected_vars = c("dataset_ref", "by_vars"))`
#'
<<<<<<< HEAD
#' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead.
#'
=======
#' A data frame, the columns from `dataset_ref` and specified by the
#' `by_vars` parameter are expected.
#'
#' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead.
#'
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
#' @param dataset_ref Expected observations dataset
#'
#' Data frame with the expected observations, e.g., all the expected
Expand Down Expand Up @@ -97,11 +89,7 @@ derive_expected_records <- function(dataset,
by_vars = NULL,
set_values_to = NULL) {
if (!missing(dataset_expected_obs)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"derive_expected_records(dataset_expected_obs = )",
"derive_expected_records(dataset_ref = )"
Expand Down
14 changes: 0 additions & 14 deletions R/derive_extreme_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,7 @@ derive_extreme_records <- function(dataset = NULL,
true_value = "Y",
false_value = "N",
keep_source_vars = exprs(everything()),
<<<<<<< HEAD
set_values_to,
filter) {
if (!missing(filter)) {
deprecate_stop(
"0.11.0",
"derive_extreme_records(filter = )",
"derive_extreme_records(filter_add = )"
)
filter_add <- enexpr(filter)
}

=======
set_values_to) {
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
# Check input arguments
assert_vars(by_vars, optional = is.null(dataset_ref))
assert_expr_list(order, optional = TRUE)
Expand Down
9 changes: 0 additions & 9 deletions R/derive_locf_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
#'
#' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead.
#'
<<<<<<< HEAD
=======
#' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead.
#'
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
#' @param dataset_ref Expected observations dataset
#'
#' Data frame with all the combinations of `PARAMCD`, `PARAM`, `AVISIT`,
Expand Down Expand Up @@ -122,11 +117,7 @@ derive_locf_records <- function(dataset,
order,
keep_vars = NULL) {
if (!missing(dataset_expected_obs)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"derive_locf_records(dataset_expected_obs = )",
"derive_locf_records(dataset_ref = )"
Expand Down
155 changes: 0 additions & 155 deletions R/derive_merged.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,81 +396,6 @@ derive_vars_merged <- function(dataset,
dataset
}

<<<<<<< HEAD
#' Merge a Categorization Variable
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' This function is *deprecated*, please use `derive_vars_merged()` instead.
#'
#' Merge a categorization variable from a dataset to the input dataset. The
#' observations to merge can be selected by a condition and/or selecting the
#' first or last observation for each by group.
#'
#' @param dataset_add Additional dataset
#'
#' The variables specified by the `by_vars`, the `source_var`, and the `order`
#' argument are expected.
#'
#' @param new_var New variable
#'
#' The specified variable is added to the additional dataset and set to the
#' categorized values, i.e., `cat_fun(<source variable>)`.
#'
#' @param source_var Source variable
#'
#' @param cat_fun Categorization function
#'
#' A function must be specified for this argument which expects the values of
#' the source variable as input and returns the categorized values.
#'
#' @param missing_value Values used for missing information
#'
#' The new variable is set to the specified value for all by groups without
#' observations in the additional dataset.
#'
#' *Default*: `NA_character_`
#'
#' @inheritParams derive_vars_merged
#'
#' @return The output dataset contains all observations and variables of the
#' input dataset and additionally the variable specified for `new_var` derived
#' from the additional dataset (`dataset_add`).
#'
#' @details
#'
#' 1. The additional dataset is restricted to the observations matching the
#' `filter_add` condition.
#'
#' 1. The categorization variable is added to the additional dataset.
#'
#' 1. If `order` is specified, for each by group the first or last observation
#' (depending on `mode`) is selected.
#'
#' 1. The categorization variable is merged to the input dataset.
#'
#'
#' @family deprecated
#' @keywords deprecated
#'
#' @export
#'
derive_var_merged_cat <- function(dataset,
dataset_add,
by_vars,
order = NULL,
new_var,
source_var,
cat_fun,
filter_add = NULL,
mode = NULL,
missing_value = NA_character_) {
deprecate_stop("0.11.0", "derive_var_merged_cat()", "derive_vars_merged()")
}

=======
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
#' Merge an Existence Flag
#'
#' @description Adds a flag variable to the input dataset which indicates if
Expand Down Expand Up @@ -635,86 +560,6 @@ derive_var_merged_exist_flag <- function(dataset,
mutate(!!new_var := if_else(!!new_var == 1, true_value, false_value, missing_value))
}

<<<<<<< HEAD
#' Merge a Character Variable
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' This function is *deprecated*, please use `derive_vars_merged()` instead.
#'
#' Merge a character variable from a dataset to the input dataset. The
#' observations to merge can be selected by a condition and/or selecting the
#' first or last observation for each by group.
#'
#' @param dataset_add Additional dataset
#'
#' The variables specified by the `by_vars`, the `source_var`, and the `order`
#' argument are expected.
#'
#' @param new_var New variable
#'
#' The specified variable is added to the additional dataset and set to the
#' transformed value with respect to the `case` argument.
#'
#' @param source_var Source variable
#'
#' @param case Change case
#'
#' Changes the case of the values of the new variable.
#'
#' *Default*: `NULL`
#'
#' *Permitted Values*: `NULL`, `"lower"`, `"upper"`, `"title"`
#'
#' @param missing_value Values used for missing information
#'
#' The new variable is set to the specified value for all by groups without
#' observations in the additional dataset.
#'
#' *Default*: `NA_character_`
#'
#' *Permitted Value*: A character scalar
#'
#' @inheritParams derive_vars_merged
#'
#' @return The output dataset contains all observations and variables of the
#' input dataset and additionally the variable specified for `new_var` derived
#' from the additional dataset (`dataset_add`).
#'
#' @details
#'
#' 1. The additional dataset is restricted to the observations matching the
#' `filter_add` condition.
#'
#' 1. The (transformed) character variable is added to the additional dataset.
#'
#' 1. If `order` is specified, for each by group the first or last observation
#' (depending on `mode`) is selected.
#'
#' 1. The character variable is merged to the input dataset.
#'
#'
#' @family deprecated
#' @keywords deprecated
#'
#' @export
derive_var_merged_character <- function(dataset,
dataset_add,
by_vars,
order = NULL,
new_var,
source_var,
case = NULL,
filter_add = NULL,
mode = NULL,
missing_value = NA_character_) {
deprecate_stop("0.11.0", "derive_var_merged_character()", "derive_vars_merged()")
}


=======
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
#' Merge Lookup Table with Source Dataset
#'
#' Merge user-defined lookup table with the input dataset. Optionally print a
Expand Down
8 changes: 0 additions & 8 deletions R/derive_param_computed.R
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ derive_param_computed <- function(dataset = NULL,
assert_logical_scalar(keep_nas)
### BEGIN DEPRECATION
if (!missing(analysis_var)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"derive_param_computed(analysis_var = )",
"derive_param_computed(set_values_to = )"
Expand All @@ -317,11 +313,7 @@ derive_param_computed <- function(dataset = NULL,
analysis_var <- assert_symbol(enexpr(analysis_var))

if (!missing(analysis_value)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"derive_param_computed(analysis_value = )",
"derive_param_computed(set_values_to = )"
Expand Down
34 changes: 0 additions & 34 deletions R/derive_param_exist_flag.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,29 +168,7 @@ derive_param_exist_flag <- function(dataset = NULL,
missing_value = NA_character_,
filter_add = NULL,
by_vars = get_admiral_option("subject_keys"),
<<<<<<< HEAD
set_values_to,
dataset_adsl,
subject_keys) {
### BEGIN DEPRECATION
if (!missing(dataset_adsl)) {
deprecate_stop(
"0.11.0", "derive_param_exist_flag(dataset_adsl = )",
"derive_param_exit_flag(dataset_ref = )"
)
}

if (!missing(subject_keys)) {
deprecate_stop(
"0.11.0", "derive_param_exist_flag(subject_keys = )",
"derive_param_exit_flag(by_vars = )"
)
}
### END DEPRECATION

=======
set_values_to) {
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
# Check input parameters
condition <- assert_filter_cond(enexpr(condition))
assert_character_scalar(true_value)
Expand All @@ -210,18 +188,6 @@ derive_param_exist_flag <- function(dataset = NULL,
assert_param_does_not_exist(dataset, set_values_to$PARAMCD)
}

<<<<<<< HEAD
if (!missing(aval_fun)) {
assert_function(aval_fun)
deprecate_stop(
"0.11.0",
"derive_param_exist_flag(aval_fun = )",
"derive_param_exist_flag(set_values_to = )"
)
}

=======
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
# Create new observations
new_obs <- derive_var_merged_exist_flag(
dataset_ref,
Expand Down
4 changes: 0 additions & 4 deletions R/derive_var_dthcaus.R
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ dthcaus_source <- function(dataset_name,
set_values_to = NULL,
traceability_vars = NULL) {
if (!is.null(traceability_vars)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"dthcaus_source(traceability_vars = )",
"dthcaus_source(set_values_to = )"
Expand Down
4 changes: 0 additions & 4 deletions R/derive_var_extreme_date.R
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,7 @@ date_source <- function(dataset_name,
traceability_vars = NULL,
set_values_to = NULL) {
if (!is.null(traceability_vars)) {
<<<<<<< HEAD
deprecate_warn(
=======
deprecate_stop(
>>>>>>> b800ab103ddbf55701d4f6b2ed0080d3c3525f27
"0.12.0",
"date_source(traceability_vars = )",
"date_source(set_values_to = )"
Expand Down
Loading

0 comments on commit e34b55b

Please sign in to comment.