[R] help with functions "spec" and "specprop"

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Aug 23 20:22:25 CEST 2009


Looks like nobody answered so far.

If you want help: It is a good idea to say which package you are talking 
about. In a clean R session I get:

 > specprop
Error: object 'specprop' not found
 > spec
Error: object 'spec' not found


hence no idea which functions from which package we are talking about.
Since you are probably talking about a contributed package, it might 
make sense to contact the maintainer / author of that package in order 
to a) ask the question and particularly b) report the typo in the error 
message.

Best,
Uwe Ligges


mauede at alice.it wrote:
> I deal with mono-channel breathing signals sampled at 30[Hz] which are non-linear and non-stationary.
> My goal is to classify the signals according to common breathing patterns
> Trend remotion is necessary for cluster analysis but quite challenging. In fact, quasi-periodic patterns that span a number of
> consecutive breathing cycles should not be naively removed as they carry a lot of useful information. 
> In advance of applying any trend removing technique, I have to extract the main period and save it.
> I thought it would be an easy task through functions "spec" and  "specprop". But I cannot get them to work for me.
> Here is my simple exercise:
> 
>> length(amp)
> [1] 3885
>> amp.sp <- spec(amp,f=0.033)
>> specprop(amp.sp,f=0.033,str=TRUE,plot=1)
> Error in specprop(amp.sp, f = 0.033, str = TRUE, plot = 1) : 
>   Frequency resolution is to high (<0.5 hz)
>> specprop(amp.sp,f=0.033,str=TRUE)
> Error in specprop(amp.sp, f = 0.033, str = TRUE) : 
>   Frequency resolution is to high (<0.5 hz)
> 
> I cannot get the meaning of the message error unless there is a constraint on the frequency resolution deal with
> by these functions ... in this case the error message should read "... Frequency resolution is TOO  high (<0.5 hz)"
> Even so, I am still puzzled beause the default window is 512 wide ==> 1/512 = 0.001953125
> The signal length is 3885 ==> 1/3885 = 0.0002574003
> 
> Your help is very welcome.
> Thank you in advance.
> Kind regards,
> Maura 
> 
> 
> 
> tutti i telefonini TIM!
> 
> 
> 
> 
> 
> tutti i telefonini TIM!
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list