Learn R Programming

cayleyR (version 0.2.1)

save_bridge_states: Save Bridge States to CSV

Description

Writes a list of bridge states (each with state and cycle fields) to a CSV file.

Usage

save_bridge_states(bridge_states, filename)

Value

Invisible NULL. Side effect: writes a CSV file.

Arguments

bridge_states

List of lists, each containing state (integer vector) and cycle (integer)

filename

Character, output CSV file path

Examples

Run this code
bs <- list(
  list(state = 1:5, cycle = 0),
  list(state = c(2, 1, 3, 4, 5), cycle = 1)
)
# save_bridge_states(bs, tempfile(fileext = ".csv"))

Run the code above in your browser using DataLab