Skip to content

Commit

Permalink
added example to commodity lookup and added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
datapumpernickel committed Aug 23, 2023
1 parent e5e2007 commit a88c844
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
7 changes: 4 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param key Provide your primary comtrade key
#'
#' @return Saves your comtrade primary key in the environment.
#' @returns Saves your comtrade primary key in the environment.
#' @export
set_primary_comtrade_key <- function(key = NULL) {
if (is.null(key)) {
Expand All @@ -17,7 +17,7 @@ set_primary_comtrade_key <- function(key = NULL) {
#'
#' If you would like your Comtrade API key to persist in between sessions, use `usethis::edit_r_environ()` to add the env variable COMTRADE_PRIMARY to your environment file.
#'
#' @return Gets your primary comtrade key from the environment var COMTRADE_PRIMARY
#' @returns Gets your primary comtrade key from the environment var COMTRADE_PRIMARY
#' @export
get_primary_comtrade_key <- function() {
key <- Sys.getenv("COMTRADE_PRIMARY")
Expand Down Expand Up @@ -241,7 +241,8 @@ ct_download_ref_table <- function(ref_table_id) {
#'
#' @seealso \code{\link{grepl}}
#'
#' @examples
#' @examplesIf interactive()
#' comtradr::ct_commodity_lookup('wine')


ct_commodity_lookup <- function(search_terms,
Expand Down
2 changes: 1 addition & 1 deletion man/comtradr-package.Rd

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

16 changes: 4 additions & 12 deletions man/ct_commodity_lookup.Rd

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

3 changes: 3 additions & 0 deletions man/ct_get_ref_table.Rd

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

0 comments on commit a88c844

Please sign in to comment.