I'm using a linked server that won't let me download new R packages (meaning I can only use base R). I know how to filter and select using dplyr
and tidyverse
but how can I select only rows for a new data.frame
(students.bio
) that meet the condition of students%subject == "Biology"
? Here is what I have tried so far:
students.bio <- students[which(students$subject == "Biology"), ]
students.bio <- Filter(students$subject == "Biology", students)
The first results in an empty df and the second says it can't find a function in the first argument.
I'm new to R so appreciate any help!