Learn R Programming

overlapping (version 2.4)

perm.pairs: Paired permutation

Description

Perform a random permutation of the data list.

Usage

perm.pairs( x, paired = FALSE )

Value

It returns a list with paired elements of x randomly permuted.

Arguments

x

a list of numerical vectors to be compared (each vector is an element of the list).

paired

logical; set to TRUE if the data are paired (i.e. non-independent samples).

Author

Massimiliano Pastore

Examples

Run this code
set.seed(20150605)
# independent samples
x <- list(X1=rnorm(10), X2=rt(15,8)) 
perm.pairs( x )

x <- list(X1=rnorm(10), X2=rt(15,8), X3=rchisq(12,3))
perm.pairs( x )

# non-independent samples
x <- list(X1=rnorm(10), X2=rt(10,8)) 
perm.pairs( x, paired = TRUE )

Run the code above in your browser using DataLab