Learn R Programming

pems.utils (version 0.3.0.7)

7.3.coldstart.code: Cold Start Emissions related code

Description

Functions associated with Cold Start Emissions calculations.

Usage

#calculations

fitColdStart(em, time, engine.on = NULL, data = NULL, method = 2, ..., fun.name="fitColdStart")

#Cold Start Plots

coldStartPlot(time, em = NULL, ..., data = NULL, engine.on = NULL, plot.type = 1, method = 2, fun.name="coldStartPlot")

panel.coldStartPlot1(..., loa.settings = FALSE) panel.coldStartPlot2(..., loa.settings = FALSE)

Value

fitColdStart generates a cold start contribution report as a pems dataset.

coldStartPlot generates a cold start contribution report as a lattice plot.

Arguments

em, time

(Typically pems.element vectors) em is the emissions data-series that the cold start contribution should be estimated for; time is the associated time-series, typically a local time measurement in seconds.

engine.on

(Optimal, single Numeric) The time the emission source, e.g. monitored vehicle engine, was started. If not supplied, this is assumed to be start of the supplied em and time data-series. See also Notes.

data

(Optional, typically pems) The data source for em and time.

method

(Optinal, Numeric) The method to use when fitting and calculating the cold start contribution: method 1 Single break point fit of accumulated emissions; method 2 modified break-point. If not supplied, method 2 is used by default.See also Notes and References.

...

(Optional) Other arguments, currently passed on as supplied to assoicated calculation or plotting function, or passed back to pemsPlot.

fun.name

(Optional character) The name of the parent function, to be used in error messaging.

plot.type

(Optional numeric) For coldStartPlot, the type of cold start plot to generate: 1 a conventional accumulation profile; or 2 an emission time-series. If not supplied, plot type 1 is selected by default.

loa.settings

(Logical) For coldStartPlot panel functions, a loa plot argument that can typically be ignored by plot users.

Author

Karl Ropkins

Details

fitColdStart fits a cold start model to the supplied emissions and time-series data.

coldStartPlot generates a plot of the cold start model.

panel.coldStartPlot1 and panel.coldStartPlot1 are plot panels used by coldStartPlot when generating plot.types 1 and 2, respectively.

References

fitColdStart uses methods described in:

[Heeb]

[Ropkins cold start]

See Also

See common.calculations (and checkUnits and convertUnits) for details of data management.

Examples

Run this code

###########
##example 1 
###########

#basic usage

#to do/maybe not run... time to compile...

Run the code above in your browser using DataLab