Basic numeric row:
vec <- c(1.0, 1.01, 1.001)
TexRow(vec)
#> % created using textab on Tue Apr 25 07:41:51 2023
#> \begin{tabular}{rrr}
#> 1.000 & 1.010 & 1.001 \\
#> \end{tabular}
Numeric row rounded to the second decimal place:
vec <- c(1.0, 1.01, 1.001)
TexRow(vec, dec = 2)
#> % created using textab on Tue Apr 25 07:41:51 2023
#> \begin{tabular}{rrr}
#> 1.00 & 1.01 & 1.00 \\
#> \end{tabular}
Entry-specific rounding:
Numeric row where all numbers are percentages:
vec <- c(20,30,40)
TexRow(vec, dec = 0, percentage = TRUE)
#> % created using textab on Tue Apr 25 07:41:51 2023
#> \begin{tabular}{rrr}
#> 20\% & 30\% & 40\% \\
#> \end{tabular}
Only some entries are percentages:
Numeric row where all numbers are dollars:
vec <- c(20.32,30.67,40.98)
TexRow(vec, dec = 2, dollar = TRUE)
#> % created using textab on Tue Apr 25 07:41:51 2023
#> \begin{tabular}{rrr}
#> \$20.32 & \$30.67 & \$40.98 \\
#> \end{tabular}
Only some entries are in dollars:
Numeric row where all numbers are standard errors:
vec <- c(20.32,30.67,40.98)
TexRow(vec, dec = 2, se = TRUE)
#> % created using textab on Tue Apr 25 07:41:51 2023
#> \begin{tabular}{rrr}
#> (20.32) & (30.67) & (40.98) \\
#> \end{tabular}
Only some entries are standard errors:
Infer p-value from numeric vector:
p < 0.1
gives 1 starp < 0.05
gives 2 starsp < 0.01
gives 3 stars