nlist {GenomicDistributions} | R Documentation

## Nathan's magical named list function. This function is a drop-in replacement for the base list() function, which automatically names your list according to the names of the variables used to construct it. It seamlessly handles lists with some names and others absent, not overwriting specified names while naming any unnamed parameters. Took me awhile to figure this out.

### Description

Nathan's magical named list function. This function is a drop-in replacement for the base list() function, which automatically names your list according to the names of the variables used to construct it. It seamlessly handles lists with some names and others absent, not overwriting specified names while naming any unnamed parameters. Took me awhile to figure this out.

### Usage

    nlist(...)

### Arguments

`...` | arguments passed to list()

### Value

A named list object.

### Examples

    x=5
    y=10
    nlist(x,y) # returns list(x=5, y=10)
    list(x,y) # returns unnamed list(5, 10)

[Package GenomicDistributions version 1.2.0 Index]