[R-SIG-Finance] na.omit.xts unsupported type error

Joshua Ulrich josh.m.ulrich at gmail.com
Tue May 17 02:02:30 CEST 2011


On Mon, May 16, 2011 at 5:59 PM, Worik Stanton <worik.stanton at gmail.com> wrote:
> Friends
>
> I cannot see what I am doing wrong.
>
> I have xts
>
>> Q.x
>           return                 colour
> 1977-01-05 "0.00657131520848225"  "RED"
> 1977-01-06 "-0.012214299603114"   "RED"
> 1977-01-10 "-0.0104483453737235"  "RED"
> 1977-01-12 "-0.012253432045205"   "RED"
> 1977-01-17 "-0.00435933050375995" "RED"
> 1977-01-19 "0.00186556754505644"  "RED"
>
>> na.omit(Q.x)
> Error in na.omit.xts(Q.x) : unsupported type
>
>> class(Q.x)
> [1] "xts" "zoo"
>
> I know there are no NAs in Q.x, but na.omit should still work surely?
>
> cheers
> Worik
>

You're not doing anything wrong, but the error tells you exactly
what's going on.  na.omit.xts doesn't currently support character
vectors.

Best,
--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com



More information about the R-SIG-Finance mailing list