Learn R Programming

bullseye (version 0.1.2)

pairwise: A generic function to create a data structure for every variable pair in a dataset

Description

Creates a data structure for every variable pair in a dataset.

Usage

pairwise(x, score = NA_character_, pair_type = NA_character_)

# S3 method for matrix pairwise(x, score = NA_character_, pair_type = NA_character_)

# S3 method for data.frame pairwise(x, score = NA_character_, pair_type = NA_character_)

# S3 method for easycorrelation pairwise(x, score = NA_character_, pair_type = NA_character_)

as.pairwise(x, score = NA_character_, pair_type = NA_character_)

Value

A tbl_df of class pairwise for pairs of variables with a column value for the score value, score for a type of association value and pair_type for the type of variable pair.

Arguments

x

A dataframe or symmetric matrix.

score

a character string indicating the value of association, either "nn", "fn", "ff".

pair_type

a character string specifying the type of variable pair.

Methods (by class)

  • pairwise(matrix): pairwise method

  • pairwise(data.frame): pairwise method

  • pairwise(easycorrelation): pairwise method

Functions

  • as.pairwise(): Same as pairwise

Examples

Run this code
pairwise(cor(iris[,1:4]), score="pearson")
pairwise(iris)

Run the code above in your browser using DataLab