为什么看不到paste()函数的结果?

时间:2019-07-18 15:53:39

标签: r

我正在尝试粘贴一些有关月份的信息,以使代码更加明确。由于某种原因,我看不到该短语。怎么了?

year_mean <- (sum(profit_tax)/12) 

good_m <- c() # creates an empty vector

for (i in 1:12){
if (profit_tax [i] > year_mean) {

print(i)   # I can see only this number
paste("Month number", i, "was good") # But not this phrase
good_m <- c(good_m, profit_tax[i])
print(profit_tax[i])
 }
}
good_m

0 个答案:

没有答案