Skip to content

Commit 4932a92

Browse files
committed
Change filler_contrasts default behavior (rescale = FALSE) but change example to use rescaling (check failed previously)
1 parent 3dd8489 commit 4932a92

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

R/hypr.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ hmat2expr <- function(hmat, as_fractions = TRUE) {
353353
ret <- lapply(seq_len(nrow(hmat)), function(j) {
354354
simplify_expr_sum(
355355
as(lapply(seq_len(ncol(hmat)), function(i) {
356-
num <- new("expr_real", num = hmat[j,i])
356+
num <- new("expr_real", num = as.numeric(hmat[j,i]))
357357
if(as_fractions) {
358358
frac <- as.numeric(strsplit(attr(as.fractions(hmat[j,i]), "fracs"), "/", TRUE)[[1]])
359359
if(length(frac) == 2 && frac[2] <= 1000) {
@@ -1149,13 +1149,13 @@ minabsnz <- function(x) {
11491149
#' cmat(h2)
11501150
#'
11511151
#' # Filling the remaining degree of freedom retrieves the contrast
1152-
#' h3 <- filler_contrasts(h2)
1152+
#' h3 <- filler_contrasts(h2, rescale = TRUE)
11531153
#' cmat(h3)
11541154
#'
1155-
#' stopifnot(all.equal(cmat(h3)[,3], cmat(h1)[,2]))
1155+
#' stopifnot(all.equal(cmat(h3)[,3], cmat(h1)[,2], check.attributes = FALSE))
11561156
#'
11571157
#' @export
1158-
filler_contrasts <- function(x, how.many = nlevels(x), rescale = TRUE) {
1158+
filler_contrasts <- function(x, how.many = nlevels(x), rescale = FALSE) {
11591159
check_argument(x, "hypr")
11601160
check_argument(how.many, "numeric")
11611161
check_argument(rescale, "logical")

man/filler_contrasts.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)