[R] Help converting file to XTS
bgunter@4567 @end|ng |rom gm@||@com
Tue Feb 5 18:43:53 CET 2019
Hard to say without knowing what dat looks like.
Can you show us a small sample, perhaps via dput( head( dat)) ?
See ?dput, ?head for details.
A guess would be that dat is a data frame and not a character string, but
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Feb 5, 2019 at 9:24 AM Johannes Møllerhagen <johamol using stud.ntnu.no>
> Hello there! I am a master student working on my master thesis, and I am
> trying to convert some data to xts so I can apply a highfrequency package
> to it.
> At the moment I am trying to use a POSIXct function. I am quite new at
> this program and I am having some issue. The file is attached.
> The current coding is:
> xts(dat,order.by=as.POSIXct(dat),"%d/%m/%Y %H:%M")
> And the error is:
> Error in as.POSIXct.default(dat) :
> do not know how to convert 'dat' to class “POSIXct”
> Any help is appreciated!
> Kind Regards
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help