process_data: Convert data to R format if saved to disk

Description Usage Arguments Value Examples

View source: R/helper_funcs.R

Description

This function will convert objects saved to disk to R friendly objects, or the same output as ComputeEntryWisePerturbationExpectation. If you used the "save to disk" option or ran via python directly, run this function to read the data into R. Files read in: asymptotic_stability.npy, column_names.txt, distributions.pkl, expected_num_switch.csv, num_non_zero.npy, num_switch_funcs.pkl, row_names.txt and size.npy. Note how most of these objects are python based objects- numpy or pickle objects.

Usage

1
process_data(matrix, type = "csv", folder, prefix = NULL)

Arguments

matrix

path to the original matrix.

type

csv or tab. Is the original matrix comma separated or tab separated? Default: csv

folder

path to the folder where output data was saved.

prefix

optional prefix to file names

Value

object formatted in the same way the output of ComputeEntryWisePerturbationExpectation

Examples

1
2
3
4
5
6
7
## Not run: 
infile <- system.file("extdata", "Modules", "IGP.csv", 
    package = "PressPurt")
data <- process_data(matrix = infile, 
    type = "csv", folder = "output")

## End(Not run)

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