These data input functions are deprecated and they will be removed in the next release of hyperspec package. Now functions in package hySpc.read.txt (link) should be used as the alternatives.

read.ini(
  con = stop("Connection con needed."),
  skip = NULL,
  encoding = "unknown"
)

Arguments

con

connection or file name

skip

number of lines to skip before first [section] starts

encoding

see base::readLines()

Value

a list with one element per section in the .ini file, each containing a list with elements for the key-value-pairs.

Details

read.ini reads ini files of the form

[section]
key = value

into a list.

read.ini sanitizes the element names and tries to convert scalars and comma separated numeric vectors to numeric.

Author

C. Beleites