> a <- c(1,2,3)
> names(a) <- c("dog","cat","mouse")
> a <- c(dog = 1, cat = 2, mouse = 3) > a dog cat mouse 1 2 3 > ##四楼的对 > as.numeric(a[1]) [1] 1