View source: R/get_state_transition_df.R
get_state_transition_df | R Documentation |
Get the state transition data frame
get_state_transition_df(x)
x |
A state transition table as produced by a call
to |
A dataframe with columns fromState
, toState
,
and nrOfTransitions
.
### Get path to example source
examplePath <-
system.file("extdata", package="rock");
### Get a path to one example file
exampleFile <-
file.path(examplePath, "state-example-1.rock");
### Parse single example source
parsedExample <- rock::parse_source(exampleFile);
### Show the state transition probabilities
exampleTable <- rock::get_state_transition_table(
parsedExample
);
exampleStateDf <- rock::get_state_transition_df(
exampleTable
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.