iso_get_source_file_structure: Get source file and structure

View source: R/utils_source_information.R

iso_get_source_file_structureR Documentation

Get source file and structure

Description

If an iso file is read with the debug mode on, the source data (e.g. binary file) is stored with the file. By default this is not the case because it makes file objects unnecessarily large. Use these functions to retrieve and explore source structures.

Usage

iso_get_source_file_structure(iso_file)

iso_print_source_file_structure(x, ..., save_to_file = NULL)

## S3 method for class 'iso_file'
iso_print_source_file_structure(x, ..., save_to_file = NULL)

## S3 method for class 'binary_isodat_file'
iso_print_source_file_structure(
  x,
  start = 1,
  length = NULL,
  end = start + length,
  ...,
  save_to_file = NULL
)

## S3 method for class 'binary_isodat_file'
print(x, start = x$pos, length = 200, ...)

Arguments

iso_file

iso file object

x

the object for which to print the source file structure.

...

additional parameters depending on source file types

save_to_file

whether to save the source file structure to a text file (provide file path, will overwrite anything already in the file!) in addition to printing it out

start

starting position in the binary file to print from (prints the first block that spans this range)

length

length in the binary file to print to (by default NULL, which means print everything)

end

until which point in the binary file to print to. If provided, overrides whatever is specified in length

Details

Typically these functions are used for debugging purposes only.

Examples

isoreader:::iso_turn_debug_on()
iso_get_reader_example("dual_inlet_example.did") |>  
   iso_read_dual_inlet() |>
   iso_get_source_file_structure() |>
   iso_print_source_file_structure(length = 500)
## Not run: 
isoreader:::iso_turn_debug_on()
iso_get_reader_example("dual_inlet_example.did") |>  
   iso_read_dual_inlet() |>
   iso_get_source_file_structure() |>
   iso_print_source_file_structure(save_to_file = "structure.txt")

## End(Not run)

KopfLab/isoreader documentation built on Aug. 6, 2023, 9:22 p.m.