Skip to content
Prev 2651 / 15274 Next

xts library Can I put my test data into the R code ( without reading a file ) ?

Try this:

library(xts) # this also pulls in zoo

Lines <- "2007-12-03  100.00  110.00  90.00  110.00
2007-12-04  110.00  120.00 100.00  120.00
2007-12-05  120.00  130.00 110.00  130.00
2007-12-06  130.00  140.00 120.00  140.00"

x <- read.zoo(textConnection(Lines))
x <- as.xts(x)
On Mon, Jul 14, 2008 at 6:29 AM, Pierre8r <pierre8r-gmane at yahoo.fr> wrote: