Skip to content

Commit

Permalink
Fixed issue with rounding using dplyr
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerssam committed Jun 24, 2020
1 parent a31ee2d commit 65d0bd5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Package
Package: BiometryTraining
Title: Functions to Assist Teaching Design and Analysis of
Agronomic Experiments
Version: 0.5.0
Version: 0.5.1
Authors@R:
c(person(given = "Sharon",
family = "Nielsen",
Expand All @@ -29,7 +29,6 @@ Depends:
Imports:
agricolae,
asremlPlus,
dplyr (>= 1.0.0),
ggplot2,
lucid,
multcompView,
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ importFrom(RColorBrewer,brewer.pal)
importFrom(agricolae,HSD.test)
importFrom(agricolae,LSD.test)
importFrom(asremlPlus,REMLRT)
importFrom(dplyr,across)
importFrom(dplyr,mutate)
importFrom(ggplot2,aes)
importFrom(ggplot2,geom_abline)
importFrom(ggplot2,geom_histogram)
Expand Down Expand Up @@ -45,7 +43,6 @@ importFrom(stats,quantile)
importFrom(stats,resid)
importFrom(stats,sd)
importFrom(stats,update)
importFrom(tidyselect,vars_select_helpers)
importFrom(utils,download.file)
importFrom(utils,install.packages)
importFrom(utils,installed.packages)
Expand Down
7 changes: 4 additions & 3 deletions R/mct.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#' @importFrom agricolae LSD.test HSD.test
#' @importFrom predictmeans predictmeans
#' @importFrom stats predict
#' @importFrom dplyr mutate across
#' @importFrom tidyselect vars_select_helpers
#'
#' @return A list containing a data frame `pred.tab` consisting of predicted means, standard errors, confidence interval upper and lower bounds, and significant group allocations.
#'
Expand Down Expand Up @@ -211,7 +209,10 @@ mct.out <- function(model.obj, pred.obj, sig = 0.05, pred, int.type = "ci", tran
}

pp.tab$Names <- NULL
pp.tab <- dplyr::mutate(pp.tab, dplyr::across(tidyselect::vars_select_helpers$where(is.numeric), round, digits = round))


# pp.tab <- dplyr::mutate(pp.tab, dplyr::across(where(is.numeric), base::round, digits = round))
pp.tab <- rapply(object = pp.tab, f = base::round, classes = "numeric", how = "replace", digits = round)

return(pp.tab)
}

0 comments on commit 65d0bd5

Please sign in to comment.