similar_number: Numeric similarity comparison class

View source: R/0-parent-children.R

similar_numberR Documentation

Numeric similarity comparison class

Description

similar_number is an S3 class for numeric similarity comparisons.

Usage

similar_number(scores, summary, methods, list_names, raw_values, digits = 3)

Arguments

scores

List of similarity scores per method and comparison

summary

Summary statistics by method and comparison

methods

Character vector of methods used for comparison

list_names

Character vector of names for the compared lists

raw_values

List of raw numeric values being compared

digits

Number of digits to round results (default: 3)

Details

This class extends the similar class and implements numeric data-specific similarity comparison methods.

Value

An object of class "similar_number" (which inherits from "similar") containing:

  • scores: List of numeric similarity scores per method and comparison

  • summary: Summary statistics by method and comparison

  • methods: Character vector of numeric comparison methods used (exact, percent, normalized, fuzzy, exp, raw)

  • list_names: Character vector of names for the compared numeric lists

  • digits: Number of digits to round results in output

  • raw_values: List of raw numeric values that were compared

The numeric similarity scores are normalized values between 0 and 1, where 1 indicates identical numbers and 0 indicates maximally different numbers based on the specific method used. The exception is the "raw" method, which returns the absolute difference between values.


samesies documentation built on April 4, 2025, 2:08 a.m.