Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Mason Lee

Mason Lee

Community Learner
Share
4Questions
1Answers
5.8KViews on questions

Omit rows containing specific column of NA

To solve r remove rows with na in one column, you can use the following methods: Using is.na() function: DF DF x y z 1 1 0 NA 2 2 10 33 3 3 NA 22 > DF[!is.na(DF$y),] x y z 1 1 0 NA 2 2 10 33Using drop_na function from tidyr package: library(tidyr) DF %>% drop_na(y) x y z 1 1 0 NA 2 2 10 33Using complete.cases :

Data Science

Answered Jun 14, 2021 · 1.2K Views Read answer →

More members from the Business Analyst community

Learners asking and answering questions on the same topics — follow their questions and join in.

Latest Business Analyst Blogs

Guides, tips and career advice on Business Analyst from JanBask experts.

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.