read_properties: Read BioLockJ properties

Description Usage Arguments Value Functions Examples

View source: R/read_properties.R

Description

Read properties from a BioLockJ config file or properties file, or a vector of lines representing BioLockJ properties.

Usage

1
2
3
read_properties(existingLines)

read_props_file(filepath)

Arguments

existingLines

a character vector, usually the result of readLines()

filepath

character string, exactly one, giving the path to the file to read.

Value

read_properties: returns a named character vector. Names are property names (left of =), values are property values (right of =).

read_props_file(): is a wrapper for read_properties() that takes a file; returns result of read_properties().

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ex1 = system.file("extdata", "example_with_defaults.properties", package = "BioLockR")
read_props_file(ex1)

ex2 = system.file("extdata", "example_no_defaults.properties", package = "BioLockR")
read_properties( readLines(ex2) )
# identical to:
read_props_file(ex2)

vals = c("name=value", "property.name=its value", "property.other=another value")
read_properties( vals )

BioLockJ-Dev-Team/BioLockR documentation built on March 9, 2021, 10:43 p.m.