phdApply: Apply a function to all data frames in a phd data set (or...

Description Usage Arguments Examples

Description

This is a convenience function to apply a function (FUN) to all data frames within the phd data set (or copy of it).

Usage

1
phdApply(phd.dat, FUN, ..., demo.rm = TRUE)

Arguments

phd.dat

Data set on which to apply function. Either phd or copy of it.

FUN

the function to be applied

...

optional arguments to FUN.

demo.rm

a logical value indicating whether the demographic data frames should be removed before the analysis proceeds.

Examples

1
2
3
4
5
6
7
8
x <- phdApply(phd, compute)
sapply(x, names)
head(x[[1]]$EA)

x <- phdApply(phd, compute, "accuracy")
x <- appendDemo(x, phd)  # append demographics back on
lapply(x, names)
head(x[[1]]$EA)

drsimonj/jacksonphd documentation built on May 15, 2019, 2:52 p.m.