Skip to content

Commit

Permalink
Translates function arguments to english
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeleiro committed Sep 4, 2023
1 parent 1a050b9 commit 1eae9e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions R/get_censo.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#'
#' `get_censo` retrieves data from the 2021 spanish census through the API of the National Institute of Statistics. For more info on the available tables and variables visit https://www.ine.es/dyngs/DataLab/en/manual.html?cid=1259945952385.
#'
#' @param tabla A string of length 1 with the table name to query data from.
#' @param table A string of length 1 with the table name to query data from.
#' @param variables A string with variable names of the queried table. If more than one, must be provided using c() (max. 4)
#' @param metricas A string with the units of measurement of the queried data. If more than one, must be provided concatenated using `c()`
#' @param idioma The language used in the body request (the only valid values are 'EN' or 'ES')
#' @param metrics A string with the units of measurement of the queried data. If more than one, must be provided concatenated using `c()`
#' @param language The language used in the body request (the only valid values are 'EN' or 'ES')
#'
#' @return A data.frame with the queried data
#' @export
Expand All @@ -21,14 +21,14 @@
#' @importFrom jsonlite toJSON
#' @importFrom jsonlite unbox
#'
get_censo <- function(tabla, variables, metricas, idioma = "ES") {
get_censo <- function(table, variables, metrics, language = "ES") {

BASEURL <- "https://www.ine.es/Censo2021/api"

body <- list(
idioma = unbox(idioma),
metrica = metricas,
tabla = unbox(tabla),
idioma = unbox(language),
metrica = metrics,
tabla = unbox(table),
variables = variables
)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

It's only function `get_censo` admits 4 parameters:

1. tabla: A string of length 1 with the table name to query data from
1. table: A string of length 1 with the table name to query data from
2. variables: A string with variable names of the queried table. If more than one, must be provided using c() (max. 4)
3. metricas: A string with the units of measurement of the queried data. If more than one, must be provided concatenated using 'c()'
4. idioma: The language used in the request body (the only valid values are 'EN' or 'ES')
3. metrics: A string with the units of measurement of the queried data. If more than one, must be provided concatenated using 'c()'
4. language: The language used in the request body (the only valid values are 'EN' or 'ES')
8 changes: 4 additions & 4 deletions man/get_censo.Rd

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

0 comments on commit 1eae9e0

Please sign in to comment.