[R] Error with acf/pacf functions

David Winsemius dwinsemius at comcast.net
Wed Aug 19 20:21:05 CEST 2009


On Aug 19, 2009, at 12:33 PM, tmakino wrote:

>
> Ok strangely both acf and pacf work with the xts object as long as  
> the xts
> package hasn't been loaded.  As soon as I load the package, I get  
> the error
> again.
>
> tmakino wrote:
>>
>> I'm trying to apply a acf/pacf function to a xts object and get the
>> following error:
>>
>> Error in if (frequency > 1 && abs(frequency - round(frequency)) <  
>> ts.eps)
>> frequency <- round(frequency) :
>>  missing value where TRUE/FALSE needed

Are you by any chance using if() to perform some sort of variable  
transformation when you should really b using ifelse()? I have no idea  
why that might be influenced by loading the xts package. Show your  
full code and not just the error message if you want a more considered  
answer.


> -- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list