Description Usage Arguments Value Examples
View source: R/recur_dataset.R
function for dataset and graph Recurpackage recur_dataset package The input data set should be 4 columns, The first three columns are the values of the three numbers to be input in order to calculate the recursive sequence define by X_n = X_(n-1) + |X_(n-2) -X(n-3)|/2 and the fourth column is the positive integer n for the sequence to be generated. The output is expected to be a line plot with X axis as n and Y axis as sequence numbers
1 |
x |
4 columns wide dataset with the first three columns are the values of the three numbers to be input |
return a line plot with x axis as the sequence length n and Y axis as the sequence number vector output
1 2 3 4 5 6 7 8 9 10 11 12 | my_data <- tibble::tribble(
~x, ~y, ~z, ~n,
2,4,3,3,
2,4,3,5,
2,4,3,7,
2,4,3,10,
2,4,3,15,
2,4,3,20,
2,4,3,25
)
recur_dataset(my_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.