Learn R Programming

HodgesTools (version 1.0.0)

append_section_to_ini: Append section to ini file

Description

Takes a new section in ini format and adds to existing ini.

Usage

append_section_to_ini(ini_file, new_section)

Value

No return value. Edits and overwrites input config.ini file.

Arguments

ini_file

file location of config.ini file

new_section

named list of the section list

Author

Tyler Hansen

Details

The new_section must be a named list of the section list. See examples.

Examples

Run this code
#list of key-value pairs
CHRACC <- list(dir='/chrAcc_peaks/',
               peaks='/chrAcc_peaks/GM12878_genrich.narrowPeak')

#list of section, resulting in list of list.
new_section <- list(CHRACC=CHRACC)

#write ini
ini_file <- system.file("extdata", "config.ini")
append_section_to_ini(ini_file, new_section)

Run the code above in your browser using DataLab