data_tracesl: Plot two time series from a dataset in the same linegraph

Usage Arguments

View source: R/functions.R

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data_tracesl(
  dataset1,
  dataset2,
  start_date = "2013-09-30",
  n_obs = 26,
  interval = "quarter",
  main,
  second,
  title = "Comparison Time series plot",
  yname = "Number of sales",
  xname = "Dates"
)

Arguments

dataset1

A subsetted dataframe which contains one precise time series of interest (to allow for univariate ts).

dataset2

A subsetted dataframe which contains one precise time series of interest (to allow for univariate ts).

start_date

A character string which refers to the date of the first observation, with format "

\item

n_obsA number equal to the observations inside the time series (default = 26).

\item

intervalA character string which refers to the time interval between each observation (default = "quarter").

\item

mainA character string for the name of the first time series.

\item

secondA character string for the name of the second time series.

\item

titleA character string for the title of the plot (default = 'Comparison Time series plot').

\item

ynameA character string for the name of the y-axe (default = 'Number of sales').

\item

xnameA character string for the name of the x-axe (default = 'Dates').

The plot for the selected arguments. This function allows comparisons in trends between two timeseries selected from a dataset and includes a slider to better select the periods of the analysis. dataset<-data.frame('something'=c(...), 'somethingelse'=c(...)) data_tracesl(dataset$something,dataset$somethingelse,main='High school', main='University', second='High school',title='Grades', yname='Numbers')


unimi-dse/9768672c documentation built on Feb. 16, 2020, 5:45 a.m.