Difference between revisions of "PowerExtrapolation.R"

From Organic Design wiki
m
m (fix error in 02')
Line 3: Line 3:
 
dset <- scan(what="")
 
dset <- scan(what="")
 
11/1/00 10.70 60
 
11/1/00 10.70 60
5/1/05 11.81 33.26
+
5/1/02 11.81 33.26
 
1/1/02 12.36 34.8
 
1/1/02 12.36 34.8
 
4/1/02 11.84 33.67
 
4/1/02 11.84 33.67

Revision as of 20:17, 11 February 2007

library(chron)

dset <- scan(what="") 11/1/00 10.70 60 5/1/02 11.81 33.26 1/1/02 12.36 34.8 4/1/02 11.84 33.67 10/1/02 11.82 33.64 3/1/03 11.82 33.33 10/1/03 13.84 33.33 10/1/04 13.77 33.33 11/1/04 15.26 33.33 12/1/04 14.07 59.59 4/1/05 14.528 60.55 10/1/05 15.7 64.68 3/1/06 16.4 66.02 6/1/06 14.78 33.33 ""

dim(dset) <- c(3, length(dset)/3) dset <- as.data.frame(t(dset)) colnames(dset) <- c("Date", "kwh", "dailyCharge")

dset$Date <- dates(levels(dset$Date)[unclass(dset$Date)])

plot(dset$Date, as.numeric(as.vector(dset$kwh)))