Description Usage Arguments Value Examples
The function submits the request to the API fill endpoint
to retrieve the desired extra data points. At the current stage
dataset must be rectangular, and structure should be in the shape proposed
analyze function. The minimum required by the endpoint is the data set and
the corresponding structure
. You can browse the available resources at
https://rejustify.com/repos
). Other features, including private
resources and models, are taken as defined for the account.
The API defines the submitted data set as x
and any server-side data set as y
.
The corresponding structures are marked with the same principle, as structure.x
and
structure.y
, for instance. The principle rule of any data manipulation is to never change
data x
(except for missing values), but only adjust y
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
df |
The data set to be analyzed. Must be matrix-convertible. If data frame,
the dimension names will be taken as the row/column names. If matrix, the row/column
names will be ignored, and the header will be set from matrix values in line with |
structure |
Structure of the |
keys |
The matching keys and matching methods between dimensions in Matching keys are given consecutively, i.e. the first element in Currently, API suports 6 matching methods: |
default |
Default values used to lock dimensions in data |
shape |
It informs the API whether the data set should be read by
columns ( |
inits |
It informs the API how many initial rows (or columns in
horizontal data), correspond to the header description. The default
is |
sep |
The header can also be described by single field values,
separated by a given character separator, for instance 'GDP, Austria, 1999'.
The option informs the API which separator should be used to split the
initial header string into corresponding dimensions. The default is |
learn |
It is |
accu |
Acceptable accuracy level on a scale from 0 to 1. It is used in the matching algorithms
to determine string similarity. The default is |
form |
Requests the data to be returned either in |
token |
API token. By default read from global variables. |
email |
E-mail address for the account. By default read from global variables. |
url |
API url. By default read from global variables. |
list consisting of 5 elements: data
, structure.x
, structure.y
, keys
and default
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #API setup
setCurl()
#register token/email
register(token = "YOUR_TOKEN", email = "YOUR_EMAIL")
#sample data set
df <- data.frame(year = c("2009", "2010", "2011"),
country = c("Poland", "Poland", "Poland"),
`gross domestic product` = NA,
check.names = FALSE, stringsAsFactors = FALSE)
#endpoint analyze
st <- analyze(df)
#endpoint fill
df1 <- fill(df, st)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.