diff --git a/DESCRIPTION b/DESCRIPTION index a0ba94450..034cd4fe0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -43,7 +43,6 @@ Imports: rlang, SqlRender (>= 1.1.3), survival, - tibble, tidyr, utils Suggests: @@ -77,6 +76,6 @@ Remotes: ohdsi/IterativeHardThresholding, ohdsi/ParallelLogger, ohdsi/ShinyAppBuilder, - ohdsi/ResultModelManager + ohdsi/ResultModelManager, RoxygenNote: 7.2.3 Encoding: UTF-8 diff --git a/R/AndromedaHelperFunctions.R b/R/AndromedaHelperFunctions.R index bf70bdb06..b6182610c 100644 --- a/R/AndromedaHelperFunctions.R +++ b/R/AndromedaHelperFunctions.R @@ -97,7 +97,7 @@ calculatePrevs <- function(plpData, population){ #=========================== # add population to sqllite - population <- tibble::as_tibble(population) + population <- dplyr::as_tibble(population) plpData$covariateData$population <- population %>% dplyr::select("rowId", "outcomeCount") diff --git a/R/FeatureImportance.R b/R/FeatureImportance.R index f47f4de25..b5a469bc2 100644 --- a/R/FeatureImportance.R +++ b/R/FeatureImportance.R @@ -200,7 +200,7 @@ permute <- function(plpDataLocation,cId,population){ # find a new random selection of people and give them the covariate and value newPlp <- sample(population$rowId,nSamp) - newData <- tibble::as_tibble(cbind(rowId = newPlp,coi[,-1])) + newData <- dplyr::as_tibble(cbind(rowId = newPlp,coi[,-1])) # swap old covariate data with new plpData$covariateData$covariates <- plpData$covariateData$covariates %>% dplyr::filter(.data$covariateId != !!cId) %>% dplyr::collect() @@ -215,7 +215,7 @@ permute <- function(plpDataLocation,cId,population){ # sample the pop to replace swapPlp <- sample(population$rowId,nSamp) - haveCidDataSwapped <- tibble::as_tibble(cbind(rowId = swapPlp,haveCidData[,-1])) + haveCidDataSwapped <- dplyr::as_tibble(cbind(rowId = swapPlp,haveCidData[,-1])) # find the swapped people to switch connectedCovs <- plpData$covariateData$covariateRef %>% @@ -228,7 +228,7 @@ permute <- function(plpDataLocation,cId,population){ dplyr::filter(.data$rowId %in% swapPlp) %>% dplyr::collect() - swappedForCid <- tibble::as_tibble(cbind(rowId = haveCidData$rowId[1:nrow(plpToSwap)],plpToSwap[,-1])) + swappedForCid <- dplyr::as_tibble(cbind(rowId = haveCidData$rowId[1:nrow(plpToSwap)],plpToSwap[,-1])) # swap old covariate data with new diff --git a/R/Predict.R b/R/Predict.R index e84d48eec..14eff8787 100644 --- a/R/Predict.R +++ b/R/Predict.R @@ -168,7 +168,7 @@ applyTidyCovariateData <- function( if(!is.null(maxs)){ if('bins'%in%colnames(maxs)){ - covariateData$maxes <- tibble::as_tibble(maxs) %>% dplyr::rename(covariateId = "bins") %>% + covariateData$maxes <- dplyr::as_tibble(maxs) %>% dplyr::rename(covariateId = "bins") %>% dplyr::rename(maxValue = "maxs") } else{ covariateData$maxes <- maxs