Skip to content

Commit

Permalink
✨print N option
Browse files Browse the repository at this point in the history
  • Loading branch information
pierucci committed Dec 4, 2016
1 parent de497bc commit 884b921
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ to_data_frame <- function(x, n = length(x)) {
}

#' @export
print.gho <- function(x, n = 6, ...) {
print.gho <- function(x, n = options()$rgho.n, ...) {
if (n == Inf) {
n <- length(x)
}
Expand Down
3 changes: 2 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
rgho.verbose = FALSE,
rgho.retry = 5,
rgho.memotime = 3600,
rgho.http_proxy = NULL
rgho.http_proxy = NULL,
rgho.n = 6
)
toset <- !(names(op.rgho) %in% names(op))
if(any(toset)) options(op.rgho[toset])
Expand Down
2 changes: 2 additions & 0 deletions vignettes/a-intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ get_gho_codes(dimension = "COUNTRY")
get_gho_codes(dimension = "GHO")
```

The number of printed items can be changed by the option `rgho.n`.

## Search

The function `search_dimensions()` and `search_codes()` research a term in dimension or codes labels, respectively.
Expand Down

0 comments on commit 884b921

Please sign in to comment.