I’m having trouble putting two conditions into a subset. The result is a whole bunch of NA.
> df[(df$col > 0) && (df$col < 4), ]
I’m having trouble putting two conditions into a subset. The result is a whole bunch of NA.
> df[(df$col > 0) && (df$col < 4), ]
Drop the space after ',' and you only need one '&'.
df[df$col > 0 & df$col < 4,]
You may be getting NA 'cause you want OR (|) instead of AND (&).