Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

logical vector passed in R

a <- c(1, 2, 3, 4, 5)
a[c(TRUE, FALSE, TRUE, FALSE, TRUE)]
## [1] 1 3 5
Source by bookdown.org #
 
PREVIOUS NEXT
Tagged: #logical #vector #passed #R
ADD COMMENT
Topic
Name
1+9 =