When I try to run the filter() from dplyr so as to select rows of my dataset according to the values in the dependent variables, it automatically runs the filter_() asking for a method:
Error in UseMethod("filter_") :
no applicable method for 'filter_' applied to an object of class "logical"
How can I get to run the filter and select only those rows that follow my condition.
From the error message it seems you are trying to apply the filter() function to an object other than a data frame, you might want to double check the class of the object you are working with.
And this is the code and library I've been running and the error outcoming. I think it's due to a library mistake, running a filter()function different from the one I need.
> library (dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> filter(mydf$ind==1)
Error in UseMethod("filter_") :
no applicable method for 'filter_' applied to an object of class "logical"