Displaying 1 result from an estimated 1 matches for "dk1_xts".
2012 Aug 16
3
Reference a variable inside a string and another for object assingments
...SP.lokaldatotid, SP.pris FROM
DataIndsamling2.dbo.SpotPriser SP",
"WHERE (SP.omraade_id= 5 AND
SP.lokaldatotid >= '2005-01-01 00:00:00')"))
#Definer dato og tid kolonne
dk1$lokaldatotid <- as.POSIXct(dk1$lokaldatotid)
#Lav om til xts object
dk1_xts <- xts(dk1[,-1], order.by=dk1[,1])
#Data omregnet fra time ->> daglig, m?ned, ?rlige gennemsnit
dk1_xts_daily <- apply.daily(dk1_xts, FUN=mean)
dk1_xts_monthly <- apply.monthly(dk1_xts, FUN=mean)
dk1_xts_yearly <- apply.yearly(dk1_xts, FUN=mean)