Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

missing values in dataframe by loop

$
0
0

I have full dataframe. I want using loop check each value of var1 variable, if his value is missing or not. If his value is missing i want to do some actions.

I know that i can check var1 is missing by using is.na function.

for (row in 1:nrow(full)) {

  if (var1[row] is missing)) {
         ............
  }
else {
         ............ 
}

    }

Thank you


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>