Home basic programing in r r R Basics-7 - Coding-Handling 'NA' (Hands On) - ClassiCoder Handling NA valuesPerform the following task:1. Remove the NA and odd values from the vector V passed as the function parameter.2. Note: Function structure is given as unalterable code.Function-str()-R-BasicFunction-str()-R-Basic-Solution
13 comments
V<-V[!is.na(V)]
i=V%%2==0
V[i]
i=V%%2==0
V[i]
handling_na <- function(V)
{
# Enter your code here. Read input from STDIN. Print output to STDOUT
V<-c(1,4,NA,7,9,NA,2)
V<-V[!is.na(V)]
i=V%%2==0
V <- V[i]
return (V)
it will pass