Skip to content

tonyy01/ggts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggts

Overview

Visualizing ts objects Using ggplot

Installation

devtools::install_github("tonyy01/ggts")

Usage

First, import ggts and use the ggts function inside it.

library(ggts)

Suppose we want to visualize the ts object co2.

Here is the base R package "graphics"' visulization:

plot(co2)

image

Here is the ggplot's visulization:

ggts(co2)

image

Since the plot is a ggplot object, you are able to utilize all of the ggplot grammar on the object. For instance, you can change the labels for x axis and y axis to the graphics' like appearance:

ggts(co2) +
  labs(x = "Time", y = "co2")

image

About

Visualizing ts objects Using ggplot

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages