Check out example codes for "r return index of rows that have NA in dataframe". It will help you in understanding the concepts better.

Code Example 1

# Basic syntax:
which(, arr.ind=TRUE)
# Where:
#	- which returns the dataframe row indices for rows that contain
#		a logical of TRUE
#	- processes the dataframe and converts all values to TRUE or 
#		FALSE based on whether they are NA or not

Learn ReactJs, React Native from