Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
myFunc <- function(x) { x <- timeSeries(x, charvec=as.Date(index(x))) t<-tryCatch( doSomething(x), error=function(x) rep(0,ncol(x)) ) t }
エラー関数に x を渡すにはどうすればよいですか? 上記を実行すると、次のようになります。
rep(0, ncol(x)) のエラー: 'times' 引数が無効です