LSDinterface-package: Reading LSD Results (.res) Files

Description Details Author(s) References


Interfaces R with LSD. Reads object-oriented data in results files (.res) produced by LSD and creates appropriate multi-dimensional arrays in R. Supports multiple core parallelization of multi-file data reading for increased performance. Also provides functions to extract basic information and statistics from data files. LSD (Laboratory for Simulation Development) is free software developed by Marco Valente (documentation and downloads available at <>).


There are specific functions for different types of LSD data structures.

read.raw.lsd simply import LSD saved data in tabular (data frame) format (variables in columns and time steps in rows). read.single.lsd is appropriate to simple LSD data structures where each saved variable is single-instanced (inside an object with a single copy). read.multi.lsd reads all instances of all variables from the LSD results file, renaming multi-instanced variables. read.list.lsd is similar to read.multi.lsd but saves multiple-instanced variables as R lists, preventing renaming.

read.3d.lsd and read.4d.lsd are specialized versions for extracting data from multiple LSD results files simultaneously. The files must have the same structure (selected variables and number of time steps). They are frequently used to acquire data from Monte Carlo experiments or sensitivity analysis. read.3d.lsd operates like read.single.lsd but add each additional results file into a separate dimension of the produced 3-dimensional array (variable x time step x file). read.4d.lsd adds the ability to read each instance of a multi-instanced variable to the fourth dimension of the generated 4D array (variable x instance x time step x file).

select.colattrs.lsd and select.colnames.lsd provide methods to extract/summarize information from previously imported LSD data structures. functions provide information about LSD data structures. functions offer tools for dealing with LSD variable names in R.

For a complete list of exported functions, use library(help = "LSDinterface").


Marcelo C. Pereira

Maintainer: Marcelo C. Pereira <[email protected]>


LSD documentation is available at The latest LSD binaries and source code can be downloaded at

LSDinterface documentation built on Feb. 11, 2018, 3:12 p.m.