Learn R Programming

semisupKernelPCA (version 0.1.5)

add.linkinfo: Add links to the object

Description

adds one or several couples to either link or not-link relations recorded in the object.

Usage

## S3 method for class 'linkinfo':
add(object, inda, indb, type=c("link", "notlink"), ...)

Arguments

object
a linkinfo class object
inda
indexes in 1:length(linkinfo) of the 1st elements in the couples to be added
indb
indexes in 1:length(linkinfo) of the 2nd elements in the couples to be added
type
the relation where the couples should be added, in c("link", "notlink")
...
unused additional arguments, for compliance with generic mechanism

Value

  • updated linkinfo object.

Examples

Run this code
data(iris)

krn <- computeKernel(iris[,1:4])
lk <- linkinfo(krn)
lk <- add(lk, 1, 5, "link")
lk <- add(lk, 3, 55, "notlink")

Run the code above in your browser using DataLab