ns_to_step: Num Switch Function to step function

Description Usage Arguments Value Examples

View source: R/helper_funcs.R

Description

This function transforms a Num Switch Function to a plot ready step function with x and y values. Returns a data frame of x and y values to plot.

Usage

1
ns_to_step(asymp_stab_start, asymp_stab_end, num_switch_func)

Arguments

asymp_stab_start

start interval from asymptotic_stability

asymp_stab_end

end interval from asymptotic_stability

num_switch_func

a single num switch function

Value

plot ready x and y values from the Num Switch Function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# Set input file
infile <- system.file("extdata", "Modules", "IGP.csv", 
    package = "PressPurt")
# Preprocess the matrix
PreProsMatrix <- PreprocessMatrix(input_file = infile, 
    output_folder = NULL, max_bound = 10, threads = 2)

# Run ComputeEntryWisePerturbationExpectation
Entrywise <- ComputeEntryWisePerturbationExpectation(
    PreProsMatrix = PreProsMatrix,
    distribution_type = "truncnorm", 
    input_a = 0, input_b = -2, threads = 1)

ns_step <- ns_to_step(
    asymp_stab_start = Entrywise$asymptotic_stability_start[1,1],
    asymp_stab_end = Entrywise$asymptotic_stability_end[1,1],
    num_switch_func = Entrywise$num_switch_funcs_r$`(1, 1)`)

## End(Not run)

PressPurt documentation built on Oct. 23, 2020, 8:07 p.m.