Answers for "how to filter a vector by location in r"

R
0

how to filter a vector by location in r

vec <- c(11,22,33,44,55,66,77,88)
indexs <- c(1,8,5)
vec[indexs] # will return: [1] 11 88 55
Posted by: Guest on April-20-2021

Code answers related to "how to filter a vector by location in r"

Browse Popular Code Answers by Language