Skip to content
/ TTS Public
forked from SMAC-Group/TTS

"A Tour of Time Series Analysis with R" (TTS) is a text that is aimed to provide better explanations for students investigating dependency within observations.

Notifications You must be signed in to change notification settings

FFTypeZero/TTS

 
 

Repository files navigation

TravisCI Build Status

A Tour of Time Series Analysis with R (TTS)

Housed within this repository is the A Tour of Time Series Analysis with R (TTS) book written using bookdown. The objective of the book is to provide an introduction to concepts related to dependent data for STAT 429: Time Series Analysis at the University of Illinois at Urbana-Champaign

Helpful References

Below is a list of helpful references that were used in the construction of the book.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Editing the Text

The instructions below are meant for contributors or users that wish to be able to build the book on their own computer.

The software that is required is as follows:

  1. Chiefly, make sure to download GitHub for Desktop.
    • If on Windows, make sure to run the installer using "Run as Administrator" (right click)
  2. Furthermore, one will need to acquire the RStudio Preview Build.
    • This build is different than the traditional RStudio client as it has cutting edge features. As a result, there is a high probability that something might go astray while using it.
  3. Install R version 3.3.1 or greater.
  4. Install the following R packages:
# Bookdown dependencies
install.packages(c("devtools", "servr", "rmarkdown", "knitr","shiny", "tibble"))
 
# Development version of bookdown has *several* bug fixes vs. cran
devtools::install_github("rstudio/bookdown")
 
# Latest version of gmwm
# Requires special environment see https://github.com/SMAC-Group/gmwm
devtools::install_github("SMAC-Group/gmwm")

Now, the first step in this process is to use the "Clone or desktop" feature found on the book repository to download its contents ( direct link: (macOS) | (windows) ). Do not download the zip. Make sure the download is done through the GitHub for Desktop application.

Once the content has been downloaded, the next step is to open the project up in RStudio. To do that, open the tts.Rproj file located in the repository directory that was just downloaded. Note: If you are not running the preview version, then you will receive an error.

After RStudio has been launched with the tts.Rproj file, then there is one more stage of adding the required package dependencies. Please run:

# Requires RStudio to be in `tts.Rproj` project
source("code/init/install_packages.R")

Once all of this is done, you can finally start editing the text. The text is just like editing a RMarkdown document with a few additional caveats. Namely, there are limitations to LaTeX characters and specific ways for refering to figures and/or equations. Overall, each Chapter is given by its own .Rmd and a starting header tag of #, e.g. 01-intro.Rmd is the first chapter with title # Introduction. An exception to this is the preface being given by index.Rmd.

To view the book within RStudio, use the "Addins" drop down menu located on the top window to launch "Preview Book". The preview option will make a live version of the book available to be explored via the "Viewer" panel in the lower right handside. Each time you save an .Rmd, the preview of the book will update within this viewer. Make sure to stop the preview by clicking the Stop sign icon if you are editing a code file. For some odd reason, this seems to cause a nasty crash.

With that being said, here are a few other organizational details:

All code is located in the /code/chapter/xx-name.R and is read into the top of the document using:

knitr::read_chunk('code/chapter/01_introduction.R')

All external figures (not rendered by R) are added to the document using:

knitr::include_graphics("images/img_name.png")

If you need help writing a LaTeX equation, then another Addin "Input LaTeX Math" exists to render the equation as you type it.

Note: Defining special latex symbols is problematic. If you need special symbols, raise it as an issue on the repository.

About

"A Tour of Time Series Analysis with R" (TTS) is a text that is aimed to provide better explanations for students investigating dependency within observations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 76.1%
  • TeX 13.6%
  • HTML 5.3%
  • CSS 3.1%
  • Shell 1.9%