My Program:
Males <- Filter(Class_, Sex=="M")
Log: Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'Class_' of mode 'function' was not found
My Program:
Males <- Filter(Class_, Sex=="M")
Log: Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'Class_' of mode 'function' was not found
R
is case sensitive. There is no function “Filter” currently in namespace. (Update: I was wrong about Filter()
not being in namespace, it is in {base}
, so of course it is. However, it was misused.)
For a data frame named d
Males <- d[which(d$Sex == “M”),]
will return a data frame.