calcAlpha | R Documentation |
This function calculates values of alpha, the time coefficient.
calcAlpha( ghgName = c("ch4", "co2", "n2o", "c2h6", "voc"), datect, sectorList = 1:10, timeScales = c(TRUE, TRUE, TRUE, TRUE), beta_df = data.frame(sector = 1:10, beta_year = rep(1, 10), beta_yday = rep(1, 10), beta_wday = rep(1, 10), beta_hour = rep(1, 10)) )
ghgName |
Greenhouse gas: one of "ch4", "co2", "n2o", "c2h6" or "voc". Defaults to "ch4". |
datect |
A vector of timestamps in POSIXct format. |
sectorList |
A vector of sector numbers for which alpha values should be returned, e.g. c(1,3,7). Defaults to all. |
timeScales |
A vector of logicals for including variation at inter-annual, seasonal, intra-weekly, and diurnal time scales (i.e. the POSIXlt variables year, yday, wday, and hour. Defaults to TRUE for all four. |
beta_df |
A data frame of beta coefficients, which act as multipliers on each sector. Defaults to 1 for all, but This allows for parameter estimation by optimisation or MCMC. |
calcFlux
for the higher-level function which calls this.
startDate <- as.POSIXct(strptime("01/06/2006", "%d/%m/%Y"), tz = "UTC") endDate <- as.POSIXct(strptime("02/06/2006", "%d/%m/%Y"), tz = "UTC") # create a sequence of dates nTimes <- 2 datect <- seq(startDate, endDate, length = nTimes) alpha_df <- calcAlpha("ch4", datect)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.