\HeaderA{sync}{SYNCHRONIZE}{sync}
\begin{Description}\relax
Synchronizes the reference times of all files in a vector of SAC
files. This is done automatically in \code{\LinkA{plot.rsac}{plot.rsac}}.
This is useful if you are sending each file to a different plot but
want the relative time to be consistent between the different plots.
\end{Description}
\begin{Usage}
\begin{verbatim}
sync(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object of class \code{"rsac"}.
\end{ldescription}
\end{Arguments}
\begin{Value}
same as input.
\end{Value}
\begin{Author}\relax
Eric M. Thompson \textless{}eric.thompson@tufts.edu\textgreater{}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plot.rsac}{plot.rsac}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

data(srosa)

# Misleading, because t0 is different for each 
# trace:
par(mfrow = c(3, 1), mar = c(3,4,1,1))
xlim = c(0, 400)
plot(srosa[1], axes = FALSE, ylab = "z",
     xlab = "", xlim = xlim)
axis(side = 2); axis(side = 1)
plot(srosa[2], axes = FALSE, ylab = "North-South",
     xlab = "", xlim = xlim)
axis(side = 2); axis(side = 1)
plot(srosa[3], axes = FALSE, ylab = "East-West",
     xlab = "Time", xlim = xlim)
axis(side = 2); axis(side = 1)

# Better:
srosa <- sync(srosa)
par(mfrow = c(3, 1), mar = c(3,4,1,1))
xlim = c(0, 400)
plot(srosa[1], axes = FALSE, ylab = "z",
     xlab = "", xlim = xlim)
axis(side = 2)
plot(srosa[2], axes = FALSE, ylab = "North-South",
     xlab = "", xlim = xlim)
axis(side = 2)
plot(srosa[3], axes = FALSE, ylab = "East-West",
     xlab = "Time", xlim = xlim)
axis(side = 2); axis(side = 1)

\end{ExampleCode}
\end{Examples}

