Skip to content

Commit 2db8cfe

Browse files
author
cas
committed
export functions correctly
1 parent 50e5132 commit 2db8cfe

File tree

9 files changed

+47
-45
lines changed

9 files changed

+47
-45
lines changed

NAMESPACE

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
S3method(plot,Grid)
4-
S3method(plot,Stn)
5-
S3method(plot,heat)
6-
S3method(plot,kde2d.hist)
7-
S3method(plot,ts)
83
export(data.agg)
4+
export(plot.Grid)
5+
export(plot.Stn)
6+
export(plot.TimeSeries)
7+
export(plot.heat)
8+
export(plot.kde2d.hist)
99
import(HeatStress)
1010
import(MASS)
1111
import(RColorBrewer)

R/plot.Grid.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#' @param export.format "png" or "pdf" format.
2727
#' @param lon.points vector of longitudes for grid points to be marked in the map.
2828
#' @param lat.points vector of latitudes for grid points to be marked in the map.
29-
#' @export
29+
#' @export plot.Grid
3030
#' @details Packages classInt and maps needed.
3131
#' @import classInt maps
3232
#' @author Ana Casanueva (24.05.2017)

R/plot.Stn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#' @param export logical. If TRUE, the figure is exported as pdf file. Default: False.
2828
#' @param export.path path (including file name) to save the plot.
2929
#' @param export.format "png" or "pdf" format.
30-
#' @export
30+
#' @export plot.Stn
3131
#' @details Packages classInt and maps needed.
3232
#' @import classInt maps
3333
#' @author Ana Casanueva (17.02.2017)

R/plot.ts.R renamed to R/plot.TimeSeries.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' @inheritParams plot.ts.orig
1212
#' @return A time series plot. Plotted data if 'output.data'=TRUE.
1313
#' @details Plot time series of one vector. It is possible to plot the "raw" series or aggregate it temporarily or display a specific season/month. If the input data is a matrix, by default a separate panel is obtained for each station. 'stn.together' allows to plot all stations together (without subplot).
14-
#' @export
14+
#' @export plot.TimeSeries
1515
#' @import grDevices graphics
1616
#' @examples \dontrun{
1717
#'# Generate some data
@@ -22,30 +22,30 @@
2222
#'data.day <- array(runif(length(dates.day)*2, -5, 30), dim=c(length(dates.day),2))
2323
#'data.hour <- array(runif(length(dates.hour)*2, -5, 30), dim=c(length(dates.hour),2))
2424
#'# Plot original data
25-
#'plot.ts(data.day, dates.day, title = c("Original daily data"))
26-
#'plot.ts(data.day, dates.day, title = c("Original hourly data"), hour=T)
25+
#'plot.TimeSeries(data.day, dates.day, title = c("Original daily data"))
26+
#'plot.TimeSeries(data.day, dates.day, title = c("Original hourly data"), hour=T)
2727
#'# Plot temporarily aggregated data
28-
#'plot.ts(data.day, dates.day, title = "Yearly data", agg="Y")
29-
#'plot.ts(data.day, dates.day, title = "Monthly data", agg="M")
30-
#'plot.ts(data.day, dates.day, title = "Seasonal data", agg="S")
31-
#'plot.ts(data.hour, dates.hour, hour=T, title = "Daily data", agg="D")
28+
#'plot.TimeSeries(data.day, dates.day, title = "Yearly data", agg="Y")
29+
#'plot.TimeSeries(data.day, dates.day, title = "Monthly data", agg="M")
30+
#'plot.TimeSeries(data.day, dates.day, title = "Seasonal data", agg="S")
31+
#'plot.TimeSeries(data.hour, dates.hour, hour=T, title = "Daily data", agg="D")
3232
#'# Plot a specific season or month
33-
#'plot.ts(data.day, dates.day, title = "Seasonal data in summer", season = c(6,7,8))
34-
#'plot.ts(data.day, dates.day, title = c("Monthly data in June A", "Monthly data in June B"),
33+
#'plot.TimeSeries(data.day, dates.day, title = "Seasonal data in summer", season = c(6,7,8))
34+
#'plot.TimeSeries(data.day, dates.day, title = c("Monthly data in June A", "Monthly data in June B"),
3535
#'season = 6) # and different subtitles
3636
#'# Plot all stations together instead of in subplot
37-
#'plot.ts(data.day, dates.day, title = "Monthly data in June A", season = 6, stn.together=T)
37+
#'plot.TimeSeries(data.day, dates.day, title = "Monthly data in June A", season = 6, stn.together=T)
3838
#'# Plot and save plotted data
39-
#'res <- plot.ts(data.day, dates.day, title = "Monthly data in June", season = 6, output.data = T)
39+
#'res <- plot.TimeSeries(data.day, dates.day, title = "Monthly data in June", season = 6, output.data = T)
4040
#'# Export plot to file
41-
#'plot.ts(data.day, dates.day, title = "Monthly data in June", season = 6, export = T)
41+
#'plot.TimeSeries(data.day, dates.day, title = "Monthly data in June", season = 6, export = T)
4242
#'# Change window size
43-
#'plot.ts(data.day, dates.day, title = "Monthly data in June", season = 6,
43+
#'plot.TimeSeries(data.day, dates.day, title = "Monthly data in June", season = 6,
4444
#'window.width = 8, window.height = 4)
4545
#'}
4646

4747

48-
plot.ts <-
48+
plot.TimeSeries <-
4949

5050
function(data, dates, hour=FALSE, agg=NULL, aggFun="mean", season=NULL,
5151
export=FALSE, outDir = "current", outNam = "plot1",outDev = "pdf", title=NULL, input.mch=FALSE,

R/plot.heat.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' @details The two input variables of the desired index need to be provided, tas and either td or hu. Needed packages: HeatStress, RColorBrewer.
2424
#' @import HeatStress RColorBrewer
2525
#' @author Ana Casanueva, 13.12.2018
26-
#' @export
26+
#' @export plot.heat
2727
#' @examples \dontrun{
2828
#' # Generate data
2929
#' tas <- rnorm(150, mean=15, sd=2)

R/plot.kde2d.hist.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#' @return Plot with the 2-dimensional kernel densities and historgrams for the input variables.
1717
#' @details The two-dimensional kernel density estimation is done with the function kde2d in package MASS.
1818
#' @import MASS RColorBrewer
19-
#' @export
19+
#' @export plot.kde2d.hist
2020
#' @author Ana Casanueva, 13.12.2018
2121
#' @examples \dontrun{
2222
#' # Generate data

R/plotFun.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
#'
1414
#' \item \code{plot.Stn}: Plot a map of stations.
1515
#' \item \code{plot.Grid}: Plot a map of a regular grid.
16-
#' \item \code{plot.ts}: Plot time series with or without temporal aggregation.
16+
#' \item \code{plot.TimeSeries}: Plot time series with or without temporal aggregation.
1717
#' \item \code{plot.kde2d.hist}: Plot a 2D Kernel density plot with the histograms of the marginal distributions.
18+
#' \item \code{plot.heat}: Plot heat index as a function of the input variables.
1819
#'
1920
#'
2021
#' Additional functions:

man/plot.ts.Rd renamed to man/plot.TimeSeries.Rd

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotFun.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)