Skip to content

Commit

Permalink
Fixed spelling and apply() errors
Browse files Browse the repository at this point in the history
Fix to issue #3 (2 bugs in dsmextra) posted by Dave Fifield on Jan 2, 2020
  • Loading branch information
pjbouchet committed Jan 8, 2020
1 parent c53eb3d commit 3d7cb75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/compare_covariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ compare_covariates <- function(extrapolation.type = "both",
if(length(varmin.univariate)<length(varmax.univariate)){

varmin.univariate <- c(varmin.univariate, rep("-", times = length(varmax.univariate)-length(varmin.univariate)))
min.univariate <- c(min.univariate, rep("-", times = length(max.univariates)-length(min.univariate)))
min.univariate <- c(min.univariate, rep("-", times = length(max.univariate)-length(min.univariate)))

}else{

varmax.univariate <- c(varmax.univariate, rep("-", times = length(varmin.univariate)-length(varmax.univariate)))
max.univariates <- c(max.univariates, rep("-", times = length(min.univariate)-length(max.univariates)))
max.univariate <- c(max.univariate, rep("-", times = length(min.univariate)-length(max.univariate)))
}
}

Expand Down
4 changes: 2 additions & 2 deletions R/summarise_extrapolation.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ summarise_extrapolation <- function(extrapolation.object,

if("Analogue"%in%as.character(resdf$Type)) add.sep <- TRUE

resdf <- apply(resdf, 2, function(x) as.character(x))
resdf <- purrr::map_dfr(resdf, as.character)

#---------------------------------------------
# Add sub-totals, if necessary
Expand Down Expand Up @@ -324,7 +324,7 @@ summarise_extrapolation <- function(extrapolation.object,

}

mic_resdf <- apply(mic_resdf, 2, function(x) as.character(x))
mic_resdf <- purrr::map_dfr(mic_resdf, as.character)

mic_resdf <- rbind(mic_resdf, rep("-----------", ncol(mic_resdf)))
mic_resdf <- rbind(mic_resdf, c("Total",
Expand Down

0 comments on commit 3d7cb75

Please sign in to comment.