1

in the dataframe

Version_ID      Development_methodology Version.Type
 75                 Agile                 On-going
 62                 Waterfall             On-going
 63                 Waterfall             On-going
 73                 Waterfall             On-going
 730                Waterfall             On-going
 631                Waterfall             On-going
 61                 Waterfall             On-going
 616                Waterfall             On-going

vector of IDs :

ind<-c(75,63,73,616)

I want to extract the subset whose rows have Version_ID != ind:

Version_ID Development_methodology Version.Type
 62                Waterfall         On-going
 730               Waterfall         On-going
 631               Waterfall         On-going
 61                Waterfall         On-going

Thanks

1 Answer 1

3

Use the %in% operator.

df[!df$Version_ID %in% ind, ]

See ?"%in% for more informations

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.