Skip to content

Commit a4e9f43

Browse files
committed
1. Creating vignette for additional parameters
2. Change description of functions regarding to that 3. Change function parameter sorting according to the new file 4. Change tests for sortcriterion if necessary dependent of the changes under point 3
1 parent 442e6ff commit a4e9f43

31 files changed

+361
-92
lines changed

R/gen_alternative_terms.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#' gen_alternative_terms: Call for similiar or spelling related terms for further search
1+
#' gen_alternative_terms: Call For Similiar or Spelling Related Terms for Further Search
22
#'
33
#' @description Function to find search terms that are similar or related to one another and also represented in Genesis.
44
#'
55
#' @param term Character string. Maximum length of 15 characters. Term or word for which you are searching for alternative or related terms. Use of '*' as a placeholder is possible to generate broader search areas.
66
#' @param similarity Logical. Indicator if the output of the function should be sorted based on a Levenshtein edit distance based on the \code{adist()} function.
7-
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing.
7+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
88
#'
99
#' @return A list with all recalled elements from Genesis. Attributes are added to the data.frame, describing the search configuration for the returned output.
1010
#' @export

R/gen_catalogue.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
#' @param code a string with a maximum length of 10 characters. Code from a Genesis-Object. Only one code per iteration. "*"-Notations are possible.
66
#' @param category a string. Specific Genesis-Object-types: 'tables', 'statistics', and 'cubes'. All three together are possible.
77
#' @param detailed a logical. Indicator if the function should return the detailed output of the iteration including all object-related information or only a shortened output including only code and object title.
8-
#' @param sortcriterion a string. Indicator if the output should be sorted by 'code' or 'content'. This is a parameter of the Genesis API call itself.
98
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
10-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
9+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
1110
#'
1211
#' @return A list with all recalled elements from Genesis API. Based on the detailed-parameter it contains more or less information, but always includes the code of the object, the title, and the type of the object. This is done to facilitate further processing with the data. Attributes are added to the dataframe describing the search configuration for the returned output.
1312
#' @export
@@ -27,7 +26,6 @@
2726
gen_catalogue <- function(code = NULL,
2827
category = c("tables", "statistics", "cubes"),
2928
detailed = FALSE,
30-
sortcriterion = c("code", "content"),
3129
error.ignore = FALSE,
3230
...) {
3331

@@ -36,11 +34,9 @@ gen_catalogue <- function(code = NULL,
3634
check_function_input(code = code,
3735
category = category,
3836
detailed = detailed,
39-
sortcriterion = sortcriterion,
4037
error.ignore = error.ignore,
4138
caller = caller)
4239

43-
sortcriterion <- match.arg(sortcriterion)
4440

4541
#-----------------------------------------------------------------------------
4642

@@ -103,7 +99,6 @@ gen_catalogue <- function(code = NULL,
10399
username = gen_auth_get()$username,
104100
password = gen_auth_get()$password,
105101
selection = code,
106-
sortcriterion = sortcriterion,
107102
...)
108103

109104
results_json <- test_if_json(results_raw)
@@ -156,7 +151,6 @@ gen_catalogue <- function(code = NULL,
156151
username = gen_auth_get()$username,
157152
password = gen_auth_get()$password,
158153
selection = code,
159-
sortcriterion = sortcriterion,
160154
...)
161155

162156
results_json <- test_if_json(results_raw)

R/gen_find.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @param detailed A logical. Indicator if the function should return the detailed output of the iteration including all object related information or only a shortened output including only code and object title. Default Option is FALSE.
1010
#' @param ordering A logical. Indicator if the function should return the output of the iteration ordered first based on the fact if the searched term is appearing in the title of the object and secondly on an estimator of the number of variables in this object. Default option is TRUE.
1111
#' @param error.ignore A logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce an artificial response (e.g., for complex processes not to fail).
12-
#' @param ... Additional parameters of the Genesis API call. These parameters are only affecting the Genesis API call itself, there is no further processing.
12+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
1313
#'
1414
#' @return A list with all elements retrieved from Genesis. Attributes are added to the data.frame describing the search configuration for the returned output.
1515
#' @export

R/gen_list_jobs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#'
55
#' @param selection Filter the list of jobs for matching codes.
66
#' @param sortcriterion Allows to sort the resulting list of jobs by their Code ("content"), the time of completion ("time") or status ("status")
7-
#' @param ... Further parameters to be passed down to the API caller.
7+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
88
#'
99
#' @return A list of all current jobs connected to the given user.
1010
#' @export

R/gen_meta_data.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#'
55
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
66
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
7-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
7+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
88
#'
99
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
1010
#' @export
@@ -73,7 +73,7 @@ gen_metadata_stats <- function(code = NULL,
7373
#'
7474
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration. "*"-Notation is possible.
7575
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
76-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
76+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
7777
#'
7878
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
7979
#' @export
@@ -143,7 +143,7 @@ gen_metadata_var <- function(code = NULL,
143143
#'
144144
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
145145
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
146-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
146+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
147147
#'
148148
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
149149
#' @export
@@ -210,7 +210,7 @@ gen_metadata_val <- function(code = NULL,
210210
#'
211211
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
212212
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
213-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
213+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
214214
#'
215215
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
216216
#' @export
@@ -354,7 +354,7 @@ gen_metadata_tab <- function(code = NULL,
354354
#'
355355
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
356356
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
357-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
357+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
358358
#'
359359
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
360360
#' @export
@@ -477,7 +477,7 @@ gen_metadata_cube <- function(code = NULL,
477477
#' @param code string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
478478
#' @param category a string. Specific object-types: 'Cube', 'Statistic', "Table", "Variable" and 'Value'. The function needs a specified object type.
479479
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
480-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
480+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
481481
#'
482482
#' @return A list with all recalled elements from Genesis. Attributes are added to the dataframe describing the search configuration for the returned output.
483483
#' @export

R/gen_modified_data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @param code a string with a maximum length of 15 characters. Code from a Genesis object. Only one code per iteration. "*" notations are possible. Empty code (default value) includes all changes, updates, and new added objects.
66
#' @param type a string. Specific Genesis object type: 'tables', 'statistics', and 'statisticsUpdates'. All three can be accessed through "all", which is the default.
77
#' @param date a string. Specific date that is used as the last update or upload time in Genesis to include a Genesis object in return. Default option is 'now', which uses the current date of your system. Alternative options are 'week_before', using the current date of your system minus 7 days, 'month_before', using the current date of your system minus 4 weeks, and 'year_before', using the current date of your system minus 52 weeks. Additionally, it is possible to fill in a specific date of format 'DD.MM.YYYY'.
8-
#' @param ... Additional parameters for the Genesis call. These parameters are only affecting the Genesis call itself, not the further processing.
8+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
99
#'
1010
#' @return A list with all recalled elements from Genesis. Always includes the code of the object, the title, and the type of the object. This is done to facilitate further processing with the data. Attributes are added to the data.frame describing the search configuration for the returned output.
1111
#' @export

R/gen_objects2stat.R

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
#' @param code a string with a maximum length of 6 characters (15 characters if cubes are not used as a category). Code from a Genesis-Object. Only one code per iteration.
66
#' @param category a string. Specific object-types: 'tables', 'variables', and 'cubes'. All three together are possible and the default option.
77
#' @param detailed a logical. Indicator if function should return the detailed output of the iteration including all object-related information or only a shortened output including only code and object title. The default is detailed = FALSE.
8-
#' @param sortcriterion a string. Indicator if the output should be sorted by 'code' or 'content'. This is a parameter of the Genesis API call itself. The default is "code".
98
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
10-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
9+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
1110
#'
1211
#' @return A list with all recalled elements from Genesis Based on the detailed-parameter it contains more or less information, but always includes the code of the object, the title, and the type of the object. This is done to facilitate further processing of the data. Attributes are added to the dataframe describing the search configuration for the returned output.
1312
#' @export
@@ -26,7 +25,6 @@
2625
gen_objects2stat <- function(code = NULL,
2726
category = c("tables", "variables", "cubes"),
2827
detailed = FALSE,
29-
sortcriterion = c("code", "content"),
3028
error.ignore = FALSE,
3129
...) {
3230

@@ -35,12 +33,9 @@ gen_objects2stat <- function(code = NULL,
3533
check_function_input(code = code,
3634
category = category,
3735
detailed = detailed,
38-
sortcriterion = sortcriterion,
3936
error.ignore = error.ignore,
4037
caller = caller)
4138

42-
sortcriterion <- match.arg(sortcriterion)
43-
4439
#-------------------------------------------------------------------------------
4540

4641
if ("tables" %in% category) {
@@ -49,7 +44,6 @@ gen_objects2stat <- function(code = NULL,
4944
username = gen_auth_get()$username,
5045
password = gen_auth_get()$password,
5146
name = code,
52-
sortcriterion = sortcriterion,
5347
...)
5448

5549
results_json <- test_if_json(results_raw)
@@ -94,7 +88,6 @@ gen_objects2stat <- function(code = NULL,
9488
username = gen_auth_get()$username,
9589
password = gen_auth_get()$password,
9690
name = code,
97-
sortcriterion = sortcriterion,
9891
...)
9992

10093
results_json <- test_if_json(results_raw)

R/gen_objects2var.R

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
#' @param code a string with a maximum length of 15 characters. Code from a Genesis-Object. Only one code per iteration.
66
#' @param category a string. Specific object-types: 'tables', 'statistics', and 'cubes'. All three together are possible and the default option.
77
#' @param detailed a logical. Indicator if function should return the detailed output of the iteration including all object-related information or only a shortened output including only code and object title. The default is detailed = FALSE.
8-
#' @param sortcriterion a string. Indicator if the output should be sorted by 'code' or 'content'. This is a parameter of the Genesis API call itself. The default is "code".
98
#' @param error.ignore a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.
10-
#' @param ... Additional parameter of the Genesis API call. These parameters are only affecting the Genesis API call itself, no further processing.
9+
#' @param ... Additional parameters for the Genesis API call. These parameters are only affecting the Genesis call itself, no further processing. For more details see `vignette("additional_parameter")`.
1110
#'
1211
#' @return A list with all recalled elements from Genesis. Based on the detailed-parameter it contains more or less information, but always includes the code of the object, the title, and the type of the object. This is done to facilitate further processing of the data. Attributes are added to the dataframe describing the search configuration for the returned output.
1312
#' @export
@@ -26,7 +25,6 @@
2625
gen_objects2var <- function(code = NULL,
2726
category = c("tables", "statistics", "cubes"),
2827
detailed = FALSE,
29-
sortcriterion = c("code", "content"),
3028
error.ignore = FALSE,
3129
...) {
3230

@@ -36,11 +34,8 @@ gen_objects2var <- function(code = NULL,
3634
category = category,
3735
detailed = detailed,
3836
error.ignore = error.ignore,
39-
sortcriterion = sortcriterion,
4037
caller = caller)
4138

42-
sortcriterion <- match.arg(sortcriterion)
43-
4439
#-----------------------------------------------------------------------------
4540

4641
if ("tables" %in% category) {
@@ -49,7 +44,6 @@ gen_objects2var <- function(code = NULL,
4944
username = gen_auth_get()$username,
5045
password = gen_auth_get()$password,
5146
name = code,
52-
sortcriterion = sortcriterion,
5347
...)
5448

5549
results_json <- test_if_json(results_raw)
@@ -96,7 +90,6 @@ gen_objects2var <- function(code = NULL,
9690
username = gen_auth_get()$username,
9791
password = gen_auth_get()$password,
9892
name = code,
99-
sortcriterion = sortcriterion,
10093
...)
10194

10295
results_json <- test_if_json(results_raw)

0 commit comments

Comments
 (0)