Yes, we can find the index of an element in a vector as follows: > a <- c(3, 2, -7, -3, 5, 2) > b <- (a==-7) # this will output a TRUE/FALSE ...
確定! 回上一頁