% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_one_sample_t_test_table.R
\name{make_one_sample_t_test_table}
\alias{make_one_sample_t_test_table}
\title{Create a Summary Table for a One-Sample t-test}
\usage{
make_one_sample_t_test_table(t_res, variable_label = "Variable", digits = 3)
}
\arguments{
\item{t_res}{An object of class "htest" produced by \code{t.test()},or a list of such objects.}

\item{variable_label}{A character string to label the tested variable(s).}

\item{digits}{Integer indicating the number of decimal places to round to.}
}
\value{
A data frame summarizing the one-sample t-test results.
}
\description{
Create a Summary Table for a One-Sample t-test
}
\examples{
data("attitude")
A <- as.data.frame(attitude)

# Example 1: One-sample t-test with default mu = 0
t1 <- t.test(A$rating)
make_one_sample_t_test_table(
  t_res = t1,
  variable_label = "Rating"
)

# Example 2: One-sample t-test with specified mu
t2 <- t.test(A$rating, mu = 60)
make_one_sample_t_test_table(
  t_res = t2,
  variable_label = "Rating"
)

# Example 3: Multiple one-sample t-tests combined into one table
t1 <- t.test(A$rating)
t2 <- t.test(A$learning)
t3 <- t.test(A$raises)

make_one_sample_t_test_table(
  t_res = list(t1, t2, t3),
  variable_label = c("Rating", "Learning", "Raises")
)

# Example 4: Multiple tests with different mu values
t1 <- t.test(A$rating, mu = 60)
t2 <- t.test(A$learning, mu = 65)
t3 <- t.test(A$raises, mu = 50)

make_one_sample_t_test_table(
  t_res = list(t1, t2, t3),
  variable_label = c("Rating", "Learning", "Raises (mu = 50)")
)
}
