fetch all rows with null values in dataframe or dataset - R

0 votes
How to fetch all rows with null values in dataframe or dataset? My dataset contains employee details with their information, some of the employees have null in email id. I need to fetch those id,and their details in the dataset.
Jul 4, 2019 in Data Analytics by nitya
11,117 views

1 answer to this question.

0 votes

Use below code - 

which(is.na(air))

is.na() will return a boolean value of whether a field value is null or not null.

which(is.na()) will return the row number where null or NA values are present.

answered Jul 4, 2019 by anonymous
• 33,030 points

Related Questions In Data Analytics

0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
4,549 views
+1 vote
2 answers
0 votes
1 answer

How to replace NA values in a dataframe with Zero's ?

It is simple and easy: df1<-as.data.frame(matrix(sample(c(NA, 1:10), 100, ...READ MORE

answered Apr 10, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
2,054 views
0 votes
1 answer
0 votes
1 answer

% of nulls for each column in the dataset - R

Use code as below -  lapply(air,function(x) { length(which(is ...READ MORE

answered Jul 4, 2019 in Data Analytics by anonymous
• 33,030 points
1,122 views
+1 vote
1 answer

How to add create a box plot with categorical columns?

One way is to convert to factor ...READ MORE

answered Jul 4, 2019 in Data Analytics by anonymous
• 33,030 points
2,029 views
0 votes
1 answer

Convert data.frame object into character vector/list

Hi, it is possible to store them ...READ MORE

answered Jul 9, 2019 in Data Analytics by anonymous
• 33,030 points
6,849 views
0 votes
1 answer

create data.frame with random numbers in R

First create a matrix with random numbers ...READ MORE

answered Sep 24, 2019 in Data Analytics by Debasmita Das
3,088 views
0 votes
3 answers

Code snippet to find number of null values in each column in a dataframe in R

colSums(is.na(data_frame_name)) will return you number of nulls ...READ MORE

answered Jul 5, 2019 in Data Analytics by sindhu
17,672 views
0 votes
1 answer

Store a built in dataset or dataframe from R to database

dbWriteTable() function allows you to store data ...READ MORE

answered Jul 30, 2019 in Data Analytics by anonymous
• 33,030 points
1,085 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP