R Under development (unstable) (2026-03-11 r89605 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(tabstats) > > test_check("tabstats") Pearson Correlation Matrix ────────────────────────────── Variable a b c ────────────────────────────── a ────────────────────────────── b 0.89 ────────────────────────────── c 0.79 0.66 ────────────────────────────── Pearson Correlation Matrix ───────────────────────────────── Variable a b c ───────────────────────────────── a ───────────────────────────────── b 0.89 <0.001 ───────────────────────────────── c 0.79 0.66 <0.001 0.012 ───────────────────────────────── Pearson Correlation Matrix ──────────────────────────────────────────────── Variable mpg cyl disp hp ──────────────────────────────────────────────── mpg 1 -0.852 -0.848 -0.776 ──────────────────────────────────────────────── cyl -0.852 1 0.902 0.832 ──────────────────────────────────────────────── disp -0.848 0.902 1 0.791 ──────────────────────────────────────────────── hp -0.776 0.832 0.791 1 ──────────────────────────────────────────────── Correlation Matrix ──────────────────────── Variable A B ──────────────────────── A 1 0.5 ──────────────────────── B 0.5 1 ──────────────────────── Pearson Correlation Matrix ─────────────────────────────────────── Variable mpg cyl disp ─────────────────────────────────────── mpg 1 -0.852 -0.848 ─────────────────────────────────────── cyl -0.852 1 0.902 ─────────────────────────────────────── disp -0.848 0.902 1 ─────────────────────────────────────── ┌───────────────────────────┐ | Layout for Corr. Matrix | ├───────────────────────────┤ | < rho > | └───────────────────────────┘ Correlation Matrix ────────────────────────────── Variable a b c ────────────────────────────── a ────────────────────────────── b 0.89 ────────────────────────────── c 0.79 0.66 ────────────────────────────── Correlation Matrix ───────────────────────────────── Variable a b c ───────────────────────────────── a ───────────────────────────────── b 0.89 <0.001 ───────────────────────────────── c 0.79 0.66 <0.001 0.012 ───────────────────────────────── Correlation Matrix ────────────────────────────── Variable a b c ────────────────────────────── a ────────────────────────────── b 0.89 ────────────────────────────── c 0.79 0.66 ────────────────────────────── Cross Tabulation: x by y ───────────────────────────────────── y ───────────────────────────────────── x A B TOTAL ───────────────────────────────────── Yes 10 (12) 30 (28) 40 No 20 (18) 40 (42) 60 ───────────────────────────────────── TOTAL 30 70 100 ───────────────────────────────────── Cross Tabulation: by ──────────────────────────────────────────────── ──────────────────────────────────────────────── 3 4 5 TOTAL ──────────────────────────────────────────────── 4 1 (5.2) 8 (4.1) 2 (1.7) 11 6 2 (3.3) 4 (2.6) 1 (1.1) 7 8 12 (6.6) 0 (5.2) 2 (2.2) 14 ──────────────────────────────────────────────── TOTAL 15 12 5 32 ──────────────────────────────────────────────── ┌──────────────────────────────────┐ | Layout for Cont. Table | ├──────────────────────────────────┤ | < Freq > (< Expected Value >) | └──────────────────────────────────┘ Cross Tabulation: x by y ───────────────────────────────────── y ───────────────────────────────────── x A B TOTAL ───────────────────────────────────── Yes 10 (12) 30 (28) 40 No 20 (18) 40 (42) 60 ───────────────────────────────────── TOTAL 30 70 100 ───────────────────────────────────── Cross Tabulation: x by y ───────────────────────────────────── y ───────────────────────────────────── x A B TOTAL ───────────────────────────────────── Yes 10 (12) 30 (28) 40 No 20 (18) 40 (42) 60 ───────────────────────────────────── TOTAL 30 70 100 ───────────────────────────────────── Cross Tabulation: x by y ───────────────────────────────────── y ───────────────────────────────────── x A B TOTAL ───────────────────────────────────── Yes 10 (12) 30 (28) 40 No 20 (18) 40 (42) 60 ───────────────────────────────────── TOTAL 30 70 100 ───────────────────────────────────── ─────────── a b c ─────────── 1 4 7 2 5 8 3 6 9 ─────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── Empty data frame (0 rows, 0 columns) i Showing 3 of 32 rows ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 ──────────────────────────────────────────────────────────────────── ! Displayed only 3 of 32 rows. Set `nrows` to show more. ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 ──────────────────────────────────────────────────────────────────── ! Displayed only 3 of 32 rows. Set `nrows` to show more. ─────────────────────────────────────────────────────────────────────────── row_names mpg cyl disp hp drat wt qsec vs am ─────────────────────────────────────────────────────────────────────────── Mazda RX4 21.000 6 160 110 3.900 2.620 16.460 0 1 Mazda RX4 Wag 21.000 6 160 110 3.900 2.875 17.020 0 1 Datsun 710 22.800 4 108 93 3.850 2.320 18.610 1 1 Hornet 4 Drive 21.400 6 258 110 3.080 3.215 19.440 1 0 Hornet Sportabout 18.700 8 360 175 3.150 3.440 17.020 0 0 ─────────────────────────────────────────────────────────────────────────── --- ───────────────────────────────── row_names gear carb ───────────────────────────────── Mazda RX4 4 4 Mazda RX4 Wag 4 4 Datsun 710 4 1 Hornet 4 Drive 3 1 Hornet Sportabout 3 2 ───────────────────────────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────── mpg cyl disp hp drat wt qsec vs am gear carb ──────────────────────────────────────────────────────────────────── 21.000 6 160 110 3.900 2.620 16.460 0 1 4 4 21.000 6 160 110 3.900 2.875 17.020 0 1 4 4 22.800 4 108 93 3.850 2.320 18.610 1 1 4 1 21.400 6 258 110 3.080 3.215 19.440 1 0 3 1 18.700 8 360 175 3.150 3.440 17.020 0 0 3 2 ──────────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────── Sepal.Length Sepal.Width Petal.Length Petal.Width Species ───────────────────────────────────────────────────────────────── 5.100 3.500 1.400 0.200 setosa 4.900 3.000 1.400 0.200 setosa 4.700 3.200 1.300 0.200 setosa 4.600 3.100 1.500 0.200 setosa 5.000 3.600 1.400 0.200 setosa ───────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────── Sepal.Length Sepal.Width Petal.Length Petal.Width Species ───────────────────────────────────────────────────────────────── 5.100 3.500 1.400 0.200 setosa 4.900 3.000 1.400 0.200 setosa 4.700 3.200 1.300 0.200 setosa 4.600 3.100 1.500 0.200 setosa 5.000 3.600 1.400 0.200 setosa ───────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────── Sepal.Length Sepal.Width Petal.Length Petal.Width Species ───────────────────────────────────────────────────────────────── 5.100 3.500 1.400 0.200 setosa 4.900 3.000 1.400 0.200 setosa 4.700 3.200 1.300 0.200 setosa 4.600 3.100 1.500 0.200 setosa 5.000 3.600 1.400 0.200 setosa ───────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────── Sepal.Length Sepal.Width Petal.Length Petal.Width Species ───────────────────────────────────────────────────────────────── 5.100 3.500 1.400 0.200 setosa 4.900 3.000 1.400 0.200 setosa 4.700 3.200 1.300 0.200 setosa 4.600 3.100 1.500 0.200 setosa 5.000 3.600 1.400 0.200 setosa ───────────────────────────────────────────────────────────────── --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- Styled --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- ------------------------------------------ A 10 C 30 B 20 D 40 E 50 ------------------------------------------ ------------------------------------------ Variable Value Variable Value ------------------------------------------ N 200 Max 6.50 Mean 4.12 Skew 0.23 SD 0.98 Kurt 2.87 Median 4.00 SE 0.07 Min 1.50 IQR 1.25 ------------------------------------------ ------------------------------------------ N 200 Median 4.00 Mean 4.12 Min 1.50 SD 0.98 Max 6.50 Skew 0.23 Kurt 2.87 SE 0.07 IQR 1.25 ------------------------------------------ ───────────────────── A 10 B 20 C 30 D 40 E 50 ───────────────────── --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- --------------------- Category Value --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- -------------------- A | 10 B | 20 C | 30 D | 40 E | 50 -------------------- --------------------- Category Value --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- left_col: "blue" right_col: "red" (no keys set) Full Test ------------------------------------------ Variable Value Variable Value ------------------------------------------ N 200 Max 6.50 Mean 4.12 Skew 0.23 SD 0.98 Kurt 2.87 Median 4.00 SE 0.07 Min 1.50 IQR 1.25 ------------------------------------------ --------------------- A 10 B 20 C 30 D 40 E 50 --------------------- [ FAIL 0 | WARN 0 | SKIP 0 | PASS 223 ] > > proc.time() user system elapsed 3.42 1.03 4.68