Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parseDebian.System

Parses a string, file or connection for Debian formatted parameters


Description

Parses a text, file or a connection for Debian formatted parameters. A file in Debian format contains rows with parameters of the form KEY=VALUE. It is allowed to have duplicated keys.

Usage

## Static method (use this):
## System$parseDebian(text=NULL, file=NULL, keys=NULL, ...)

## Don't use the below:
## S3 method for class 'System'
parseDebian(this, text=NULL, file=NULL, keys=NULL, ...)

Arguments

text

The text to be parsed. Default value is NULL.

file

Name file, a File object or connection to be parsed. Default value is NULL.

keys

The keys (names of the parameters) to be retrieved. If NULL all fields are returned. Default value is NULL.

Either, text or file must be given.

Value

Returns a named list of parameter values.

Author(s)

Henrik Bengtsson

See Also

For more information see System.

Examples

file <- file.path(Package("R.utils")$path, "DESCRIPTION")
 l <- System$parseDebian(file=file)
 print(l)

R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.