Problem with rob.calibrange from SetMethods package

9 views
Skip to first unread message

Judith

unread,
May 15, 2026, 3:42:26 PM (9 days ago) May 15
to QCA with R
Dear all,

I use the R version 4.4.1 and the following package versions: SetMethods: 4.1, QCA: 3.22, admisc: 0.36

When I try to run the function rob.calibrange from the SetMethods package I get the error message:
 Error in if (admisc::possibleNumeric(x)) { : Condition has a length > 1

I have no idea where exactly the problem is. I tried to reinstall the packages, I deleted every columns from my dataframes that are not needed and I checked that all variables are numeric. 

Does anybody has an idea what I can do?

Kind regards
Judith

Adrian Dușa

unread,
May 15, 2026, 3:45:39 PM (9 days ago) May 15
to QCA with R
Hi Judith,

I would recommend upgrading to the latest R version 4.6.0, after which update all necessary packages using:

install.packages(c("admisc", "declared", "QCA"), repos = "dusadrian.r-universe.dev")

If the error still persists after this, you should contact the maintainer of the SetMethods package.

I hope this helps,
Adrian

Breno A. H. Marisguia

unread,
May 15, 2026, 10:43:40 PM (9 days ago) May 15
to Adrian Dușa, QCA with R
Hey Judith!

I don't think the problem is that your variables are non-numeric. The error suggests that `rob.calibrange()` is not receiving one single raw condition to calibrate. In particular, SetMethods' `test.cond.raw` argument should point to exactly one column pointed by the `raw.data` argument.

The "Condition has a length > 1" message suggests that `admisc::possibleNumeric(x)` is returning more than one logical value, which is usually consistent with `x` being more than one column or a data-frame-like object.

Try checking if `test.cond.raw` is not selecting several columns by accident. For example, it should be something like this:

`test.cond.raw = "my_specific_raw_variable",`

and not a vector of several variable names.

It may also help to convert your data to a normal data frame before running the function, just in case:

`raw.data <- as.data.frame(raw.data)`
`calib.data <- as.data.frame(calib.data)`

Then try rob.calibrange again. For fuzzy-set calibration, also check that it contains exactly three anchors, since SetMethods won't work with 6.

Best,
Breno


--
You received this message because you are subscribed to the Google Groups "QCA with R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qcawithr+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qcawithr/5e035cce-d9e2-4ef7-9b66-289c76e7f3abn%40googlegroups.com.

Judith

unread,
May 18, 2026, 12:41:43 PM (6 days ago) May 18
to QCA with R
Hey Breno,

thank you very much! Interestingly and surprisingly for me it was indeed the case that my data was not correctly stored as a datframe and after fixing that the function worked well. 

You´ve helped me a lot.

Best,
Judith

Reply all
Reply to author
Forward
0 new messages