r - Check if a variable is xts or data.frame -


Well, the question is all this..I want to check in one of my tasks if a function parameter is given Is xts or data frame type how can i do this?

this is is.smth and as.smth

  df < - data.frame () xt & lt; - is xts (). Data.frame (df) [1] TRUE is.data.frame (xt) [1] FALSE is.xts (df) [1] FALSE is.xts (xt) [1] TRUE  

Comments