# Paired t test. Base R only; tested with R 4.6.1.
report <- function(path, x) cat(path, "=", if (is.numeric(x)) sprintf("%.17g", x) else as.character(x), "\n")

d <- read.csv("data.csv")                       # columns x and y, one pair per row
fit <- t.test(d$x, d$y, paired = TRUE)          # two-sided

report("/estimate",  mean(d$x - d$y))            # mean of the x - y differences
report("/statistic", fit$statistic)
report("/p_value",   fit$p.value)
