recur_dataset: function for dataset and graph Recurpackage recur_dataset...

Description Usage Arguments Value Examples

View source: R/recur_dataset.R

Description

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

Usage

1

Arguments

x

4 columns wide dataset with the first three columns are the values of the three numbers to be input

Value

return a line plot with x axis as the sequence length n and Y axis as the sequence number vector output

Examples

 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)

fangfeiliu/recurpkg documentation built on Aug. 2, 2020, 1:50 a.m.