Error in `vec_arith()`: ! <haven_labelled> - <MISSING> is not permitted
Closed this issue · 1 comments
Hi! New to R. Please help.
I tried running this simple descriptives function using jmv and it's throwing this haven related error. I already tried re-installing and restarting my session and I still get the error.
Code:
{r}
library(jmv)
descriptives(Review1practice)
Error:
Error in vec_arith()
:
! <haven_labelled> - is not permitted
Backtrace:
- jmv::descriptives(Review1practice)
- analysis$run()
- private$.run()
- private$.compute()
- private$.computeExtreme(...)
- vctrs:::
-.vctrs_vctr
(df$values) - vctrs:::vec_arith.default("-", e1, MISSING())
The interesting thing is that the same function/library works, if I provide more specifics. See below:
Code:
{r}
library(jmv)
descriptives(
data = Review1practice,
vars = enjoy,
mode = TRUE,
range = TRUE,
iqr = TRUE,
pc = TRUE)
Results:
DESCRIPTIVES
Descriptives
──────────────────────────────────
enjoy
──────────────────────────────────
N 186
Missing 0
Mean 4.195341
Median 4.333333
Mode 4.000000
Standard deviation 1.457532
IQR 1.666667
Range 6.000000
Minimum 1.000000
Maximum 7.000000
25th percentile 3.333333
50th percentile 4.333333
75th percentile 5.000000
──────────────────────────────────
Not lavaan related. Please contact the maintainers of the jmv package.