Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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
 
PREVIOUS NEXT
Tagged: #filter #vector #location
ADD COMMENT
Topic
Name
8+7 =