scag2sdf: Calculating (user defined) scagnostics

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/scagn2sdf.R

Description

The function calculates scagnostics for a data frame based on the functions giving by the user and converts them to a list of class "sdfdata".

Usage

1
scag2sdf(data, scagfun.list, arguments.list = NULL)

Arguments

data

A data frame. If it contains categorical variables, they are excluded.

scagfun.list

A list of functions (see Details).

arguments.list

A list of arguments (see Details).

Details

scagfun.list is a list of functions. Each of the functions needs to be a function with arguments x (a numeric vector) and y (a numeric vector). The function can also include further parameters, which can be specified in arguments.list.

Value

A list of class "sdfdata" including data frames sdf and data.

sdf

The scagnostics for every single pair of variables for the functions given in scagfun.list.

data

The original data frame minus categorical variables.

Author(s)

Katrin Grimm

See Also

scag2sdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(Election2005)
## Not run: 
set.seed(345456)
election05_small <- Election2005[,sample(5:70,10)]

# Use correlation, distance correlation and a spline based 
# measure as scagnostics.

scagdf <- scag2sdf(election05_small,
    scagfun.list=
      list(cor=cor,dcor2d=dcor2d,splines2d=splines2d))
head(scagdf$sdf)

# Use sperman correlation 
scagdf <- scag2sdf(election05_small,
    scagfun.list=
      list(cor=cor,dcor2d=dcor2d, splines2d=splines2d),
    arguments.list = 
      list(list(method="spearman"),NULL,NULL))

## End(Not run)

mbgraphic documentation built on May 2, 2019, 2:45 a.m.