Learn R Programming

RPMG (version 2.2-2)

getmem: Get Member

Description

Get a member of a list

Usage

getmem(v, mem = 1)

Arguments

v

vector

mem

element in vector

Value

vector of members of a list

Details

Used in conjunction with apply

Examples

Run this code
# NOT RUN {
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