Creates a data frame containing up to five time series
Dataframe_Combine.Rd
Combines up to five time series, detrended where necessary, into a single data frame.
Arguments
- data.1
Data frames with two columns containing in column
1 - Continuous sequence of times spanning from the first to the final recorded observations.
2 - Corresponding values detrended where necessary.
- data.2
As for
data.1
.- data.3
As for
data.1
.- data.4
As for
data.1
.- data.5
As for
data.1
.- n
Integer
1-5
specifying the number of time series. Default is2
.- names
Character vector giving the column names excluding the first column which is labelled as "Date".
Value
A data frame containing all times from the first to the most up to date reading of any of the variables.
Examples
#Formatting data
S20.Rainfall.df<-Perrine_df
S20.Rainfall.df$Date<-as.Date(S20.Rainfall.df$Date)
S20.OsWL.df<-S20_T_MAX_Daily_Completed_Detrend_Declustered[,c(2,4)]
S20.OsWL.df$Date<-as.Date(S20.OsWL.df$Date)
#Detrending O-sWL series at Site S20
S20.OsWL.Detrend<-Detrend(Data=S20.OsWL.df,Method = "window",PLOT=FALSE,
x_lab="Date",y_lab="O-sWL (ft NGVD 29)")
#Creating a dataframe with the date alongside the detrended OsWL series
S20.OsWL.Detrend.df<-data.frame(as.Date(S20.OsWL.df$Date),S20.OsWL.Detrend)
colnames(S20.OsWL.Detrend.df)<-c("Date","OsWL")
#Combining the two datasets by Date argument
S20.Detrend.df<-Dataframe_Combine(data.1<-S20.Rainfall.df,
data.2<-S20.OsWL.Detrend.df,
names=c("Rainfall","OsWL"))