You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In calc.stError() if year is a labelled column - this can occur if data was imported using haven::read_sav - using period.mean or period.diff will throw an error
library(surveysd)
set.seed(1234)
eusilc<- demo.eusilc(n=4, prettyNames=TRUE)
dat_boot<- draw.bootstrap(eusilc, REP=3, hid="hid", weights="pWeight",
strata="region", period="year")
dat_boot_calib<- recalib(dat_boot, conP.var="gender", conH.var="region")
dat_boot_calib[, year:=haven::labelled(
as.integer(year),
labels= c(`2010`=2010L, `2011`=2011L, `2012`=2012L, `2013`=2013L))]
err.est<- calc.stError(dat_boot_calib, var="povertyRisk",
fun=weightedRatio, period.mean=3)
#> Error in rbindlist(l, use.names, fill, idcol) : #> Class attribute on column 1 of item 2 does not match with column 1 of item 1.
TODO
check this during input checking and call as.integer() or as.numeric() if column ìs.labelled
test this during devtools::test()
The text was updated successfully, but these errors were encountered:
In
calc.stError()
if year is a labelled column - this can occur if data was imported usinghaven::read_sav
- using period.mean or period.diff will throw an errorTODO
as.integer()
oras.numeric()
if columnìs.labelled
devtools::test()
The text was updated successfully, but these errors were encountered: