Skip to content

Commit

Permalink
soft-deprecate read.gdx(factors = )
Browse files Browse the repository at this point in the history
  • Loading branch information
0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q committed Jun 25, 2024
1 parent 0b66d3f commit 30598a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ importFrom(lazyeval,interp)
importFrom(lazyeval,lazy_dots)
importFrom(lazyeval,lazy_eval)
importFrom(lifecycle,deprecate_warn)
importFrom(lifecycle,deprecated)
importFrom(lifecycle,is_present)
importFrom(lubridate,is.POSIXct)
importFrom(magclass,"getNames<-")
importFrom(magclass,"getSets<-")
Expand Down
14 changes: 10 additions & 4 deletions R/read.gdx.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@
#' @param fields fields to read from variables and equations (any of `lo`,
#' `l`, `m`, and `up`); ignored for parameters
#' @param colNames string vector of column names to override dimension names
#' @param factors return non-numerical columns as factors (default) or character
#' vectors
#' @param squeeze if TRUE, squeeze out any zero or EPS stored in the GDX
#' @param factors Deprecated. Do not use any more.
#' @param squeeze if `TRUE`, squeeze out any zero or EPS stored in the GDX
#' container
#' @return quitte data frame
#' @author Michaja Pehl
#'
#' @importFrom lifecycle deprecated deprecate_warn is_present
#' @importFrom tibble as_tibble
#'
#' @export
read.gdx <- function(gdxName, requestList.name, fields = "l", colNames = NULL,
factors = TRUE, squeeze = TRUE) {
factors = deprecated(), squeeze = TRUE) {

if (is_present(factors))
{
deprecate_warn('0.3135.0', 'quitte::read.gdx(factors = )',
details = 'Please do not use the argument anymore.')
}

# Check if gdxrrw package is installed
if (!any(.packages(all.available = TRUE) == "gdxrrw"))
Expand Down

0 comments on commit 30598a8

Please sign in to comment.