Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nlist

Named lists


Description

Create a named list using specified names or, if names are omitted, using the names of the objects in the list. The code list(a = a, b = b) becomes nlist(a,b) and list(a = a, b = 2) becomes nlist(a, b = 2), etc.

Usage

nlist(...)

Arguments

...

Objects to include in the list.

Value

A named list.

Examples

# All variables already defined
a <- rnorm(100)
b <- mat.or.vec(10, 3)
nlist(a,b)

# Define some variables in the call and take the rest from the environment
nlist(a, b, veggies = c("lettuce", "spinach"), fruits = c("banana", "papaya"))

loo

Efficient Leave-One-Out Cross-Validation and WAIC for Bayesian Models

v2.4.1
GPL (>= 3)
Authors
Aki Vehtari [aut], Jonah Gabry [cre, aut], Mans Magnusson [aut], Yuling Yao [aut], Paul-Christian Bürkner [aut], Topi Paananen [aut], Andrew Gelman [aut], Ben Goodrich [ctb], Juho Piironen [ctb], Bruno Nicenboim [ctb]
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.