seq_changes: Show Graphically How an Attribute Changes Over Time

View source: R/seq_changes.R

seq_changesR Documentation

Show Graphically How an Attribute Changes Over Time

Description

This function takes a single row of a dataframe, a vector, or a list, checks for changes in consecutive values over the sequence, and show at which points the values change.

Usage

seq_changes(x, names = TRUE, sub_str = NULL, len = 2, gap = 15)

Arguments

x

The sequence to be analyzed.

names

Whether the sequence is named. Defaults to TRUE.

sub_str

Whether to use a substring of the names of the sequence. Defaults to NULL. If entered, this should be two integers in a vector.

len

The length of separation in showing the changes. Defaults to 2.

gap

The length of separation from names to values. Defaults to 15.

Examples

seq_changes(c(NA, "B", rep("A", 2), rep("C", 4), "D"), gap = 1, len = 1)


sysilviakim/Kmisc documentation built on Jan. 28, 2023, 10:58 a.m.