1 | analyze.ghg(dat)
|
dat |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (dat)
{
attach(dat)
mm <- format(as.POSIXct(as.character(dat$date)), format = "%m")
Fetch <- Fetch70_1_1_1
Time <- as.POSIXct(paste(date, time))
Dat <- data.frame(date = Time, H = H_1_1_1, LE = LE_1_1_1,
Fc = Fc_1_1_1, WS = WS_1_1_1, WD = WD_1_1_1, wdir = cut(WD_1_1_1,
breaks = seq(0, 360, by = 45)), ustar = ustar_1_1_1,
Fetch, month = mm)
detach(dat)
library(openair)
windRose(mydata = Dat, ws = "WS", wd = "WD")
readline()
library(rpart)
tree <- rpart(ustar ~ Fetch + wdir + month, data = Dat)
plot(tree, compress = T, margin = 0.1)
text(tree, cex = 0.7)
readline()
timeVariation(mydata = Dat, pollutant = c("H", "LE"))
readline()
out <- timeVariation(mydata = Dat, pollutant = c("ustar"),
plot = F)
readline()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.