我有一個單獨的列矩陣(一個rbind操作的結果),其初始起始值名爲'starts',用於幾個時間序列,開始於不同的月份並顯示如下: starts <- matrix(rep(100,5),ncol=1)
rownames(starts) <- month.name[1:5]
starts
[,1]
January 100
February 100
March 100
爲什麼表函數找到一個被刪除的變量? Dog <- c("Rover", "Spot")
Cat <- c("Scratch", "Fluffy")
Pets <- data.frame(Dog, Cat) #create a data frame with two variables
names(Pets)
# [1] "Dog" "Cat"
#rename Dog to a lon