remove na from vector r
x<-x[!is.na(x)]
remove na from vector r
x<-x[!is.na(x)]
remove elements from character vector in r
x<-c(2, 4, 6, 9, 10) # the list
y<-c(4, 9, 10) # values to be removed
idx = which(x %in% y) # Positions of the values of y in x
x = x[-idx] # Remove those values using their position and "-" operator
x = x[ - which(x %in% y)] # In short
x = x[! x %in% y] # You can also try
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us