Hi guys,
I usually program with Python, however I need to make use of the R-package 'eventstudies' because there is no similar Python-package of similar quality.
The R-package expects zoo objects (from what I understood, specific objects that are better suited for time-series objects in R). In particular, I need the time series as an index and the firm names as columns.
I have successfully imported a CSV-file, which consists of the two columns 'Period' and 'ABC' for the particular firm name as a data frame. After importing it with read.csv() and afterwards transforming the data frame to a zoo object with read.zoo() however, it assigns every time period a particular column, which is incorrect for my purposes.
I have looked through the arguments available for the read.zoo() method, unfortunately I have not found out yet how to set the column 'Period' as the time series index and keep the firm name column as the observation for which time series data exists.
Would greatly appreciate if someone could point out how I can solve this (probably) rather simple problem!