Skip to content

Commit

Permalink
Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinRoth committed Mar 10, 2017
1 parent 5454046 commit 203041a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/KIS.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#' @param period Either numeric, timeBased or ISO-8601 style (see \code{\link[xts]{.subset.xts}})
#' @return data.table
#' @export
#' @examples
#' KIS('TG', '260_H', '2016')
#' KIS('MOR_10', '260_A_a', '2016')
KIS <- function(var, geoIdentifier, period) {
InternalOnly()
flog.debug("Started downloading data from KIS")
Expand Down Expand Up @@ -76,8 +79,8 @@ WriteKISRecipe <- function(var, locationID, period) {
paste0('"elementgroupnames":[],') %>%
paste0('"unitsettings":[{"unit":"', unit, '",') %>%
paste0('"scale":"true","conversionfunction":"NONE"}],') %>%
paste0('"starttime":"20160115_000000_000000",') %>%
paste0('"endtime":"20160916_000000_000000",') %>%
paste0('"starttime":"20160115_000000_000000",') %>% # hard coded because does not effect result
paste0('"endtime":"20160916_000000_000000",') %>% #
paste0('"maxresults":1000,') %>%
paste0('"countsettings":{"count":false,"period":"DAY",') %>%
paste0('"countconditionbyelement":[{"element":"', var, '",') %>%
Expand Down
4 changes: 4 additions & 0 deletions man/KIS.Rd

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

0 comments on commit 203041a

Please sign in to comment.