Thanks a ton for the great package. I was wondering whether it's possible to enter a block with continuous predictors and a block with categorical predictors into apa.reg.table.
Example:
library(tidyverse)
library(apaTables)
dat <-
tibble(
dv = rnorm(10, 0, 1),
iv = rnorm(10, 0, 1),
cat = rep(c("A", "B"), each = 5)
)
block1 <- lm(dv ~ iv, data = dat)
block2 <- lm(dv ~ iv + cat, data = dat)
apa.reg.table(block1, block2, filename = "table.doc")
This results in an error message because block2 is a list that itself contains a list with the contrasts for cat. block1 does not have those contrasts, resulting in different numbers of list elements:
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
Any way to make this work other than creating numeric 0/1 variables for each dummy contrast?
Thanks a ton for the great package. I was wondering whether it's possible to enter a block with continuous predictors and a block with categorical predictors into
apa.reg.table
.Example:
This results in an error message because
block2
is a list that itself contains a list with the contrasts forcat
.block1
does not have those contrasts, resulting in different numbers of list elements:Any way to make this work other than creating numeric 0/1 variables for each dummy contrast?