Dear dplyr gurus,
I am trying to perform a simple filtering using dplyr but it doesnt seem to work with what I want to do.
I want to filter a dataframe based on column B as an example when only if column B matches the category, then look at column C variable.
df
SubjectID Treatment Time Value
A1 Amutant T0 5.3
B0 control T0 4.8
A3 Bmutant T3 4
B1 control T1 3
B3 control T3 6
df %>%
group_by (Time) %>%
filter (Time == "T0") %>% #Should I use filter if or filter at here?
filter (Value <5)
This is not what I exactly want to get because I want to subset only based on "T0" values in "Value" and not filter out all the Time.
The results should be filtering out those subjects with T0 higher than 5.
Thanks in advance!