MyNixOS website logo
Description

Minimal and Lightweight Configuration Tool.

Minimal and lightweight configuration tool that provides basic support for 'YAML' configuration files without requiring additional package dependencies. It offers a simple method for loading and parsing configuration settings, making it ideal for quick prototypes and lightweight projects.

rconf

rconf is a minimal and lightweight configuration tool for R that supports reading basic YAML configuration files without any additional package dependencies. It is designed for quick prototypes and lightweight projects, such as proteomics data analysis pipelines.

Features

  • Parse basic YAML configuration files
  • No external dependencies
  • Easy-to-use API for loading and accessing configuration settings

Installation

install.packages("rconf")

Usage

Place your YAML configuration file in a convenient location. For example, the package includes a sample configuration file in the inst/extdata/ directory. You can load it as follows:

# Load the rconf package
library(rconf)

# Load configuration from the sample file in extdata
cfg <- get_config(system.file("extdata", "config.yml", package = "rconf"))

# Access configuration settings
raw_dir         <- cfg$raw_data_dir
processed_dir   <- cfg$processed_data_dir
metadata_file   <- cfg$sample_metadata
normalization   <- cfg$normalization_method
fdr_cutoff      <- cfg$protein_fdr

# Print values
print(raw_dir)
print(processed_dir)
print(metadata_file)
print(normalization)
print(fdr_cutoff)

Sample Configuration File

The sample YAML configuration file included with rconf (located at inst/extdata/config.yml) is designed for a proteomics data analysis project. It might look like this:

default:
  # Data directories and files
  raw_data_dir: "/data/proteomics/raw"
  processed_data_dir: "/data/proteomics/processed"
  sample_metadata: "/data/proteomics/metadata/samples.csv"

  # Analysis parameters
  normalization_method: "median"
  quantification: "LFQ"
  protein_fdr: 0.01

  # Statistical analysis options
  differential_expression: true
  p_value_cutoff: 0.05

  # Plotting options
  plot:
    output_dir: "results/plots"
    format: "png"
    dpi: 300

Unit Testing

The package includes unit tests (using testthat) to ensure that YAML configurations are parsed correctly. See the tests in the tests/testthat/ directory for examples.

License

GPL-3

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows