> which(LETTERS=="A")
[1] 1
> which(LETTERS=="B")
[1] 2
Can i use one statement in which to get the value of 1,2?
which(LETTERS=="B" or "A")
Error: unexpected symbol in "which(LETTERS=="B" or"
> which(LETTERS=="A")
[1] 1
> which(LETTERS=="B")
[1] 2
Can i use one statement in which to get the value of 1,2?
which(LETTERS=="B" or "A")
Error: unexpected symbol in "which(LETTERS=="B" or"
Or:
as answer for the title, how subsetting a vector using multiple conditions: