Chapter 14 Time Series
Working with Time Series Data
The first think you will need to do is convert you data.frame into a time series
Although I recommended using ggplot earlier in this book, when it comes to time series data, dynamic plots can be useful
This is not recommended for most users but you can also create dynamic plots with plot.ly which can be useful in pre-processing large time series data. You will need to create a plot.ly account and remember your username and API key. Once that is done, add that into your .RProfile with the following 2 lines of code
Once this is complete you can create a normal figure using ggplot and then send it to plotly.
<- ggplot(df %>% plot filter(time > 480 & time < 500)) + aes(x = time, y = ecg) + geom_line(size = 1L, colour = "#0c4c8a") + theme_minimal() ::api_create(plot, filename = "Showoff_to_Joel")plotly
plotly has a max file size you can send with a free account, but we can work around that by creating a local file
14.3 Installing Zotero
If you do plan on being able to write documents then I suggest using Zotero.