Difference between revisions of "OpasnetUtils/Drafts"

From Testiwiki
Jump to: navigation, search
(Answer)
(added first draft of "Sähkön hinta tunneittain")
Line 56: Line 56:
 
return(plo)
 
return(plo)
 
}
 
}
 +
 +
################## Sähkön hinta tunneittain
 +
 +
price <- opbase.data(ident="op_en7353")
 +
temperature <- opbase.data("op_en6315.2014_5_2015")
 +
temperature$Date <- substr(temperature$Date, 0, 11)
 +
price$Date <- substr(price$Date, 0, 11)
 +
mon <- c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
 +
for (i in mon) {
 +
price$Date <- gsub(i, which(mon == i), as.character(price$Date))
 +
}
 +
for (i in mon) {
 +
temperature$Date <- gsub(i, which(mon == i), as.character(temperature$Date))
 +
}
 +
price$Hours <- substr(price$Hours, 0, 2)
 +
price$Hours <- paste(price$Hours, ":00:00", sep="")
 +
temperature$Time <- paste(temperature$Time, ":00", sep="")
 +
as.character(temperature$Result)
 +
as.numeric(temperature$Result)
 +
cut(temperature$Result, breaks = c(-21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30), include.lowest=TRUE)
  
 
################## Suomentaja
 
################## Suomentaja

Revision as of 22:45, 15 August 2015



Question

Which functions are so useful that they should be taken into OpasnetUtils package? This page contains draft function which will be included when they are good enough and found important.

Answer

Call the objects stored by this code from another rode with this command:

objects.latest("Op_en6007", code_name = "answer")

+ Show code

See also

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>