Skip to content

Commit

Permalink
adjusted imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tscheypidi committed Jul 19, 2024
1 parent eae1566 commit 0f7979a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Description: A wrapper package for the gamstransfer package extending its functi
License: BSD_2_clause + file LICENSE
URL:https://github.com/pik-piam/gdx2
BugReports: https://github.com/pik-piam/gdx2/issues
Depends:
Imports:
gamstransfer,
magclass (>= 6.0)
Suggests:
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Generated by roxygen2: do not edit by hand

export(readGDX2)
import(gamstransfer)
import(magclass)
importFrom(magclass,as.magpie)
4 changes: 0 additions & 4 deletions R/imports.R

This file was deleted.

7 changes: 3 additions & 4 deletions R/readGDX2.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@
#' @return The gdx objects read in the format set with the argument
#' \code{format}.
#' @author Jan Philipp Dietrich
#' @export
#' @importFrom magclass as.magpie
#' @examples
#' \dontrun{
#' readGDX2("bla.gdx", "blub*")
#' }
#'
#' @export

readGDX2 <- function(gdx, ..., format = "simplest", react = "warning",
spatial = NULL, temporal = NULL, magpie_cells = TRUE) {

Expand Down Expand Up @@ -102,7 +101,7 @@ readGDX2 <- function(gdx, ..., format = "simplest", react = "warning",
if(m$class %in% c("Set", "Alias")) {
x[[i]] <- x[[i]]$records
} else {
x[[i]] <- as.magpie(x[[i]]$records, spatial = spatial, temporal = temporal)
x[[i]] <- magclass::as.magpie(x[[i]]$records, spatial = spatial, temporal = temporal)
}
attr(x[[i]], "description") <- d
attr(x[[i]], "gdxMetadata") <- m
Expand Down
1 change: 0 additions & 1 deletion man/readGDX2.Rd

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

0 comments on commit 0f7979a

Please sign in to comment.