Learn R Programming

PPRL (version 0.3.5)

CompareAS16: Comparing bit vectors generated by CreateAS16

Description

Comparing all elements of two vectors of records with each other using Armknechts & Schnells methods "create" and "compare".

Usage

CompareAS16(IDA, dataA, IDB, dataB, password, t = 0.85)

Arguments

IDA

A character vector or integer vector containing the IDs of the first data.frame.

dataA

A character vector containing the bit vectors that are to be created by Armknechts method "create".

IDB

A character vector or integer vector containing the IDs of the second data.frame.

dataB

A character vector containing the bit vectors that are to be created by Armknechts method "create".

password

A string containing the password used in the method "create".

t

A float containing the lower Tanimoto similarity threshold.

Value

The function returns a data.frame with four columns containing all ID-pairs of all bit vectors, the estimated Tanimoto similarity and the classification (links/non-links).

Details

Two bit vectors generated by CreateAS16 are compared as described in the original publication.

See Also

PPRL, CreateAS16

Examples

Run this code
# NOT RUN {
# Load test data
testFile <- file.path(path.package("PPRL"), "extdata/testdata.csv")
testData <- read.csv(testFile, head = FALSE, sep = "\t",
  colClasses = "character")

# Create Bloom Filter
testData <- CreateBF(ID = testData$V1, testData$V7, k = 20, padding = 1,
  q = 2, l = 1000, password = "(H]$6Uh*-Z204q")

# Optional: Create the new Bloom filter
testAS <- CreateAS16(testData$ID, testData$CLKs, password = "kh<U+00E4>uds")

# Compare bit vectcors
res <- CompareAS16(testData$ID, testData$CLKs, testData$ID, testData$CLKs,
  password = "kh<U+00E4>uds", t = 0.85)

# }

Run the code above in your browser using DataLab