Skip to content

Commit

Permalink
rename quantity_ppi to param_ppi (issue #267)
Browse files Browse the repository at this point in the history
  • Loading branch information
adokter committed Nov 4, 2019
1 parent 7d6644d commit 070b177
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions R/map.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ map.ppi <- function(x, map, param, alpha = 0.7, xlim, ylim,

stopifnot(inherits(x, "ppi"))

if(hasArg("quantity")) stop("unknown function argument 'quantity`. Did you mean `param`?")

if (missing(param)) {
if ("DBZH" %in% names(x$data)) {
param <- "DBZH"
Expand Down
2 changes: 2 additions & 0 deletions R/plot.ppi.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ plot.ppi <- function(x, param, xlim, ylim, zlim = c(-20, 20),
ratio = 1, na.value = "transparent", ...) {
stopifnot(inherits(x, "ppi"))

if(hasArg("quantity")) stop("unknown function argument 'quantity`. Did you mean `param`?")

if (missing(param)) {
if ("DBZH" %in% names(x$data)) {
param <- "DBZH"
Expand Down
2 changes: 2 additions & 0 deletions R/plot.scan.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ plot.scan <- function(x, param, xlim = c(0, 100000),
ylim = c(0, 360), zlim = c(-20, 20), na.value = "transparent", ...) {
stopifnot(inherits(x, "scan"))

if(hasArg("quantity")) stop("unknown function argument 'quantity`. Did you mean `param`?")

if (missing(param)) {
if ("DBZH" %in% names(x$data)) {
param <- "DBZH"
Expand Down
2 changes: 2 additions & 0 deletions R/plot.vp.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ plot.vp <- function(x, quantity = "dens",
line_lwd = 1, line.col = "red", line.lwd = 1, ...) {
stopifnot(inherits(x, "vp"))

if(hasArg("param")) stop("unknown function argument 'param`. Did you mean `quantity`?")

# deprecate function argument
if (!missing(line.col)) {
warning("argument line.col is deprecated; please use line_col instead.",
Expand Down
2 changes: 2 additions & 0 deletions R/plot.vpi.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ plot.vpi <- function(x, quantity = "mtr", xlab = "time",
"rt", "ff", "dd", "u", "v", "HGHT"
))

if(hasArg("param")) stop("unknown function argument 'param`. Did you mean `quantity`?")

# deprecate function argument
if (!missing(nightshade)) {
warning("argument nightshade is deprecated; please use night_shade instead.",
Expand Down
2 changes: 2 additions & 0 deletions R/plot.vpts.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ plot.vpts <- function(x, xlab = "time", ylab = "height [m]", quantity = "dens",
stopifnot(inherits(x, "vpts"))
stopifnot(quantity %in% c("dens", "eta", "dbz", "DBZH"))

if(hasArg("param")) stop("unknown function argument 'param`. Did you mean `quantity`?")

# deprecate function arguments
if (!missing(barbs.h)) {
warning("argument barbs.h is deprecated; please use barbs_height instead.",
Expand Down
2 changes: 1 addition & 1 deletion bioRad.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace,vignette
PackageRoxygenize: rd,collate,namespace
4 changes: 2 additions & 2 deletions man/integrate_to_ppi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 070b177

Please sign in to comment.