# How could I seasonally adjust data series and constrain produced data only to 0 or positive values?

I would like to seasonally adjust data series that cannot be negative. How I could do this? Currently I am using seas in R. Is it possible to constrain the output series to 0 or positive values?

It is not very clear what you want exactly, but here are two options that may help you:

Option 1, offsetting: Subtract min(seriesX) from each element of output seriesX;

data.table style:

seriesX[, value := value - min(value)]

Option 2, thresholding: Transform each seriesX element smaller than 0 - to 0

data.table style:

seriesX[value < 0, value := 0]