data <- read.csv("G.CSV")

with(F,sum(fuzzyand(A,C))/sum(C))

Error in eval(substitute(expr), data, enclos = parent.frame()) :

invalid 'envir' argument of type 'logical'

In this line of code

```
with(F,sum(fuzzyand(A,C))/sum(C))
```

What is `F`

supposed to be? It is being interpreted as the value FALSE.

F is a dataset,Can you help me solve this problem?Thank you very much if you can

Please show the code that assigns a data set to F and then the use of F in the with() function.

data <- read.csv("F.CSV")

with(F,sum(fuzzyand(A,C))/sum(C))

May I ask you where this error appeared?

You have stored the data set F.CSV in a variable named `data`

. The with() function should act on `data`

.

```
with(data,sum(fuzzyand(A,C))/sum(C))
```

Error: Input should be logical or numbers between 0 and 1.

After changing to data, such an error occurred again

I suppose the new error is coming from the fuzzyand() function. You can test that by running

```
data <- read.csv("F.CSV")
with(data, fuzzyand(A,C))
```

If that produces the same error, then either you column A or C is not of the correct type. As the error says "Input should be logical or numbers between 0 and 1."

If you post the output of

```
dput(head(data))
```

someone may be able to help you further.

Thank you very much, the problem has been solved

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.