當我執行:代表功能奇怪的錯誤
a <- seq(1,1.5,0.1)
b <- c(1,1.1,1.4,1.5)
x <- rep(c(a,b),times=c(2,1))
錯誤代表(C(A,B),C(2,1)):無效 '次' 參數
爲什麼?
當我執行:代表功能奇怪的錯誤
a <- seq(1,1.5,0.1)
b <- c(1,1.1,1.4,1.5)
x <- rep(c(a,b),times=c(2,1))
錯誤代表(C(A,B),C(2,1)):無效 '次' 參數
爲什麼?
已標記的回答是,已經完全使用這裏mapply
unlist(mapply(function(x,n)rep(x,n),list(a,b),c(2,1)))
當您連接它是一個載體的替代品。 – akrun