Removing selected observations from a dataset

Hi,

I have a dataset from which I need to remove certain drugs. So far I have filtered my data using dplyr package using:

library(dplyr)
Tiapride %>%
select(compostition_form_strength) %>%
filter(!compostition_form_strength == "TIAPRIDE AMP. INJ. 100MG 12 2ML ")

Now how do I remove this drug "TIAPRIDE AMP. INJ. 100MG 12 2ML " from my dataset "Tiapride".
What is the next step?

Any recommendations will be much appreciated.

Hi,

If I understand correctly, you actually figured out the solution already. You just have to omit the select(compostition_form_strength) part from your code, and the result will be a data frame filtered without "TIAPRIDE AMP. INJ. 100MG 12 2ML ".

PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.