I have data frame "PnL_3.df" of 451 observations and 3 variables that are not regularly placed. First column are dates from 2002 to 2013, second column are numeric values, third column are percentage values in numeric format. I would like to build a time series object for generating a plot and calculations. How can I do this ?
I have tried ts(), but this command works only for regularly spaced data.
class(PnL_3.df) [1] "data.frame" str(PnL_3.df) 'data.frame': 451 obs. of 3 variables: $ V1: chr "2002-06-18" "2002-05-22" "2002-05-23" "2002-10-23" ... $ V2: num -97.7 118.1 83.6 126.9 13.2 ... $ V3: num -0.135 0.274 0.167 0.125 0.014 ...
I would be happy to build a time series object.