View source: R/acled_transform_interaction.R
acled_transform_interaction | R Documentation |
This function allows users to change from numeric interaction codes (i.e. 1, 2, 3, etc) to string interaction codes (i.e. State Forces, Rebel Group, etc.)
acled_transform_interaction(df, only_inters = FALSE)
df |
dataframe. ACLED data including at least inter1, inter2 columns. If |
only_inters |
boolean. Option whether to include the interaction column in the transformation (if TRUE) or to only use inter1 and inter2 (if FALSE). |
Returns a tibble of of ACLED events with modified inter1, inter2 and potentially interaction columns .
Other Data Manipulation:
acled_transform_longer()
,
acled_transform_wider()
## Not run:
# Load data frame
argen_acled <- acled_api(
email = "your_email", key = "your_key",
country = "Argentina", start_date = "2022-01-01", end_date = "2022-02-01",
acled_access = FALSE
)
# Transform the interactions
argen_acled_transformed <- acled_transformation_interaction(argen_acled, only_inters = F)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.