<- c(1, 2, -8, 9, 16)
my_vector[2:4]
#矩阵
#矩阵行列命名,默认先排列
cells <- c(1, 36, 24, 12)
row_names <- c(“R1...″, “R2″)
col_names <- c(“C1″, “C2″)
my_matrix1 <- matrix(cells, nrow=2, ncol=2, dimnames=list(row_names...(“C1″, “C2″, “C3″, “C4″)
my_array <- array(1:24, dim=c(2, 3, 4), dimnames=list(dim1, dim2, dim3))
#数据框...Poor", "Improved", "Excellent", "Poor")
patientdata <- data.frame(patientID, age, diabetes, status)
#选取数据框中的元素