LG_collect_orig_and_boot: Collect data from original and bootstrap into one object

Description Usage Arguments Details Value

View source: R/LG_collect_orig_and_boot.R

Description

The computation of the local Gaussian spectra can create an abundance of files in a plethora of directories. This function takes care of the pesky task of collecting relevant pieces into one object.

Usage

1
LG_collect_orig_and_boot(main_dir, data_dir, threshold = 500)

Arguments

main_dir

The path to the main directory, that contains the file-hierarchy created when using the local Gassian approach for the investigation of time series.

data_dir

The directory containing the result from the bootstrap.

threshold

An integer, default value 500 (measured in MB), that gives the upper in-memory size of the objects stored in the resulting files.

Details

This function will, after a sanity-check of the arguments main_dir and data_dir, figure out the dimension-names that should be included in the collected data, and an estimate of the size of it. If the size exceeds the value given to threshold, then a splitting will be performed. File-names will be created based on the combination of values from the directory names used on the spectra-part and the boots_spectra-part. For each file we will start out by creating an array with the desired dimension-properties, and then the saved data will be read and included into these. After saving (which might require a minor update of 'LG_save'), the info-object should also be updated and saved.

Value

A data-table with the stuff of interest.


LAJordanger/localgaussSpec documentation built on July 28, 2017, 12:15 a.m.