pds3_read: Parse PDS3

Description Usage Arguments Value Examples

View source: R/pds3_read.R

Description

Parses a PDS3 file to extract meta information

Usage

1
pds3_read(x, util = pds3_lexer_parser(), assume_complete = TRUE)

Arguments

x

A String of the PDS3 to parse, containing one of the following:

Content

String you want to parse

Filename

Path to a file containing a PDS3

util

A list containing a PDS3 lexer & parser as returned by 'getLexerParser()'. Typically not required, but improves performance if parsing many files.

assume_complete

(default: TRUE) Assume that there is no content after 'END'. If set to false, will pre-parse the file to find END. If you start getting parsing errors, you may need to set this flag to false.

Value

A list with the following components:

label

Raw label content. If there is extra_data, it will be excluded

extra_data

Content following 'END'. If assume_complete is F or there is no content after the label, this will be an empty string

odl

Parsed label content.

Examples

1
2
3
pds3_read('PDS_VERSION_ID = PDS3
 PRODUCT_CREATION_TIME         = 2017-05-31T18:42:49
 END')

pds3 documentation built on May 2, 2019, 6:59 a.m.