> 4 == 5 #
[1] FALSE
> 0 == 0
[1] TRUE
> 8 > 9
[1] FALSE
> 90 < 100
[1] TRUE
> x <- c(1,2,3,4)
> x < 3
[1] TRUE TRUE FALSE FALSE
> x >= c(1,0,2,4)
[1] TRUE TRUE TRUE TRUE
> y <- c("gene1", "gene2", 1:5)
> y
[1] "gene1" "gene2" "1" "2" "3" "4" "5"
> y[2]
[1] "gene2"
> y > 2
[1] TRUE TRUE FALSE FALSE TRUE TRUE TRUE
> y[2] <- 3
> y
[1] "gene1" "3" "1" "2" "3" "4" "5"
> y[2] <- "protein2"
> y
[1] "gene1" "protein2" "1" "2" "3" "4" "5"
> y[2:4] <- c(1,3,2,6)
警告メッセージ:
In y[2:4] <- c(1, 3, 2, 6) :
置き換えるべき項目数が,置き換える数の倍数ではありませんでした
> y[2:5] <- c(1,3,5,6)
> y
[1] "gene1" "1" "3" "5" "6" "4" "5"