@idvarma wrote:
Hi Team,
I have a data set with Y/N values and also a numeric value. How to handle those unexpected values.
Data is as below.OWN_OCCUPIED
Y
N
N
12
Y
YY
YThe above has one missing value and numeric. I want those two replace with ‘NA’. How is this possible in R. I tried as below but couldn’t find the solution
e <- c()
i = 1while(i <= nrow(df2)){
e[i] <- df2[i,3]
if(e[i] ==‘Y’){
print(“Accepted”)
}
else if(e[i] == ‘N’){
print(“ACCEPTED”)
}
else
print(“Reject”)
i = i+1
}
Posts: 1
Participants: 1