VMATCH: Compare vectors

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

View source: R/VMATCH.R

Description

Compare vectors properly taking into account uniform vectors (with same values on all dimensions) and non-specified dimensions.

Usage

1
VMATCH(x, y, incomparable = 0, noise=TRUE)

Arguments

x

target vector

y

vector (numeric or data frame/list) or set of vectors whose similarity to the target is to be determined

incomparable

Value to be returned for incomparable vectors, in which all dimension pairs contain underspecified values

noise

logical for addition of noise to outcome (default is TRUE)

Details

Differences between vectors are determined per dimension, weighted (cf. world$weigh), and then averaged. If vectors are not specified for certain target dimensions, this does not count as a mismatch.

Value

numeric

Author(s)

Sander Lestrade

See Also

ACTOR, NOUNS, SITUATION, SELECTVERB, SELECTACTOR, SELECTUNDERGOER, PROPOSITION, REFCHECK, TOPICCOPY, GENERALIZE, CHECKSUCCESS, ANALYZE, TYPEMATCH, NOUNMORPHOLOGY, VERBMORPHOLOGY, INTERPRET.INT, SUCCESS, PERSONUPDATE, FUSE, SEMUPDATE

Examples

1
2
3
4
5
FOUND()
vectors=head(population[[1]]$nouns[,1:9])
target=vectors[1,]
vectors[2,]=NA
VMATCH(target, vectors)

MoLE documentation built on Nov. 17, 2017, 8 a.m.