compare: Agreement statistics between two columns

View source: R/analysis.R

compareR Documentation

Agreement statistics between two columns

Description

Rows where x or y is missing are removed first.

Usage

compare(data, x, y, by = NULL)

Arguments

data

Data frame with the two columns, for example after a merge

x

First column (for example the reference dataset)

y

Second column

by

Optional group columns, for example "state_name"

Value

Data frame with the by columns, n, r (Pearson), bias (mean of y - x) and rmse

Examples

df <- data.frame(imd = c(1, 2, 3, 4), era5 = c(1.1, 2.3, 2.9, 4.2))
compare(df, "imd", "era5")

varunayan documentation built on Oct. 30, 2026, 1:07 a.m.