Learn R Programming

RPMG (version 2.2-7)

getmem: Get Member

Description

Get a member of a list

Usage

getmem(v, mem = 1)

Value

vector of members of a list

Arguments

v

vector

mem

element in vector

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

Used in conjunction with apply

Examples

Run this code

z = list()
for(i in 1:10)
{

z[[i]] = round(10*runif(10))


}

y = as.vector(unlist(lapply(z, getmem, 6)))



Run the code above in your browser using DataLab