Plot 'Rendata' datasets with OT and historical data
Usage
## S3 method for class 'Rendata'
plot(x,
textOver = quantile(x$OTdata[, x$info$varName], probs = 0.99),
showHist = TRUE,
...)
Arguments
x
Rendata object i.e. a list object as read with the readXML
function.
textOver
Mark values of the variable in the OTdata part of
x. Values above the textOver value (if any) will be
marked with the character version of the block, typically a year
showHist
If TRUE, the historical periods (is any) are shown on the
plot.
...
further args to be passed to plot function.
Details
The plot shows the main data of the object x (the OTdata
part) as well as historical data MAXdata or OTSdata if
any. Different colours are used on the background. This function is
not intended to produce nice plots to be printed.
Note
This function is mainly a companion function of readXML. Its
goal is to check the content of the data read.
Author(s)
Yves Deville
See Also
readXML
Examples
if (require(XML)) {
## use 'index.xml' file shipped with Renext
dir1 <- system.file("Rendata", package = "Renext")
BrestNew <- readXML(name = "Brest", dir = dir1)
plot(BrestNew)
GaronneNew <- readXML(name = "Garonne", dir = dir1)
plot(GaronneNew)
test1 <- readXML(name = "test1", dir = dir1)
plot(test1)
}
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Renext)
Loading required package: evd
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Renext/plot.Rendata.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.Rendata
> ### Title: Plot a Rendata object
> ### Aliases: plot.Rendata
>
> ### ** Examples
>
> if (require(XML)) {
+ ## use 'index.xml' file shipped with Renext
+ dir1 <- system.file("Rendata", package = "Renext")
+ BrestNew <- readXML(name = "Brest", dir = dir1)
+ plot(BrestNew)
+ GaronneNew <- readXML(name = "Garonne", dir = dir1)
+ plot(GaronneNew)
+ test1 <- readXML(name = "test1", dir = dir1)
+ plot(test1)
+ }
Loading required package: XML
>
>
>
>
>
> dev.off()
null device
1
>