I would appreciate some help with the followiing error ... what did I do
wrong
and what is the woraroud.

> library(nlme)
>  glmod <- gls(A ~ T +cosP +cos2P +cos4P +cos5P +sin3P +sin5P +cosP2 +sinP3
+P2, correlation=corAR1(),method="ML")
Error: cannot allocate vector of size 491.3 Mb

I have a bunch of humans'  breathing signals. The recording frequency was 30
samples per second.
The only relevant variables are: amplitude, phase (inhale <-> exhale),
timestamp (time at which each amplitude sample was recorded).
I have to get rid of the time trend of the amplitude, and be left with the
amplitude explained by the phase.
Before devising a way to remove such a trend, it is necessary (I think) to
figure out whether its nature
that is whether such a time trend is linear or not.
*General question:
**Is there any technique and/or method to figure out the nature of the time
trend in a series of data ?*

Thank you in advance to anyone who provides any suggestion.

Best,
-- 
Maura E.M

	[[alternative HTML version deleted]]

