DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+7 =
Submit