meanlist: Mean of all elements in a list

Description Usage Arguments Value Author(s) See Also Examples

View source: R/funlist.r

Description

This is just a wrapper of funlist using mean

Usage

1
  meanlist(alist, na.rm = FALSE)

Arguments

alist

a list

na.rm

logical indicating whether missing values should be removed

Value

the mean

Author(s)

Gaston Sanchez

See Also

funlist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# say you have some list
list1 = list(1:5, runif(3), rnorm(4))

# get the mean of all elements in list1
meanlist(list1)

# say you have missing data
list2 = list(c(1:4, NA), runif(3), rnorm(4))

# get the mean of all elements in list2 removing NAs
meanlist(list2, na.rm=TRUE)

turner documentation built on May 2, 2019, 8:35 a.m.