0)
> print("TRUE") else print("FALSE")[1] "FALSE"
This is why you are being told that for many purposes, the Boolean vector may
work fine. But if you really want or need zero and one, that is a trivial
transformation as shown. Feel free to use ifelse() and then f
0)
> print("TRUE") else print("FALSE")[1] "FALSE"
This is why you are being told that for many purposes, the Boolean vector may
work fine. But if you really want or need zero and one, that is a trivial
transformation as shown. Feel free to use ifelse() and then f
Message-
From: Ebert,Timothy Aaron
To: Bert Gunter
Cc: R-help
Sent: Thu, Jan 27, 2022 2:27 pm
Subject: Re: [R] Error in if (fraction <= 1) { : missing value where TRUE/FALSE
needed
You did not claim it is faster, but if one is writing large programs or has
huge quantities of d
ator == 'T13', 1, 0)
the most probable source of the error is
fc= fairness_check(explainer,
protected = prot,
privileged = privileged)
so you should check explainer and privileged
Cheers
Petr
From: javed khan
Sent: Wednesday, January 26, 2022 3:45
Your error and your code don't match. Please spend some time to make a small
reproducible example [1][2] when posting a question... you may even figure out
your own answer before you send it out.
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
[2]
> Subject: Re: [R] Error in if (fraction <= 1) { : missing value where
TRUE/FALSE
> needed
>
> Ivan, thanks
>
> When I use options(error = NULL)
>
> it says: Error during wrapup: missing value where TRUE/FALSE needed
> Error: no more error handlers available
Hi
Do not post in HTML, please.
Try to show your real data - use str(test), or preferably dput(test). If
test is big, use only fraction of it
The problem must be probably in your data.
x <- sample(1:20, 100, replace=T)
fake <- paste("T", x, sep="")
ifelse(fake=="T14", 1,0)
[1] 0 0 0 0 0 0 0 0
On Wed, 26 Jan 2022 14:47:16 +0100
javed khan wrote:
> Error in if (fraction <= 1) { : missing value where TRUE/FALSE needed
> var <- ifelse(test$operator == 'T14', 1, 0)
The error must be in a place different from your test$operator
comparison. Have you tried traceback() to get the call stack
8 matches
Mail list logo