Learn R Programming

animbook (version 1.0.0)

anim_prep_cat: Transformed category data into a categorized format

Description

This function transformed the category data in the categorized format by ordering the values.

Usage

anim_prep_cat(
  data,
  id = NULL,
  values = NULL,
  time = NULL,
  group = NULL,
  order = NULL,
  label = NULL
)

Value

A categorized data.

Arguments

data

A data frame contained the category values.

id

The column name that represents the identifiers variable.

values

The column name contains the category values.

time

The column name that represents the time variable.

group

The column name that represents the distinguished group between the values.

order

A vector of order for sorting the category values.

label

A vector of labels to represent the qtile.

Details

The function takes the input data, ordering the values, and assigning the variable names.

Examples

Run this code
anim_prep_cat(data = aeles, id = id, values = party, time = year)

Run the code above in your browser using DataLab