% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pgm.R
\name{cumsuminv}
\alias{cumsuminv}
\title{Inverse of Cummurative Sum}
\usage{
cumsuminv(x)
}
\arguments{
\item{x}{A numeric vector}
}
\value{
A vector of the inverse of cumsum.
}
\description{
Inverse of Cummurative Sum
}
\details{
This function returns lagged difference of lagg=1 and x[1] as: \cr
 c( x[1], diff(x,1) )
}
\examples{
set.seed(1701)
x=sample(1:9,9,replace=1)
y=cumsum(x)
Print(x,y,cumsuminv(y))

}
