mgpd_data: internal

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

View source: R/mgpd_data.R

Description

internal use only

Usage

1
mgpd_data(xdat, thr = rep(0, 5))

Arguments

xdat
thr

Details

internal use only

Value

internal use only

Note

internal use only

Author(s)

P. Rakonczai

References

internal use only

See Also

internal use only

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (xdat, thr = rep(0, 5)) 
{
    n = dim(xdat)[1]
    d = dim(xdat)[2]
    if (!(d %in% c(2:5))) 
        print("Error message: invalid dimension.")
    else {
        potdat = NULL
        id = rep(0, n)
        for (i in 1:d) potdat = cbind(potdat, xdat[, i] - thr[i])
        for (i in 1:d) id = id + (potdat[, i] > 0)
        potdat = potdat[id > 0, ]
    }
    potdat = as.data.frame(potdat)
    potdat
  }

mgpd documentation built on May 2, 2019, 9:39 a.m.