-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_factor_name.Rd
50 lines (43 loc) · 1.93 KB
/
check_factor_name.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{check_factor_name}
\alias{check_factor_name}
\title{Check Factor Name}
\usage{
check_factor_name(
factor1_name,
factor2_name,
factor3_name = NULL,
random_effect_name,
factor1,
factor2,
factor3 = NULL,
random_effect = NULL
)
}
\arguments{
\item{factor1_name}{A character string representing the name for factor1. Defaults to "factor1" if NULL.}
\item{factor2_name}{A character string representing the name for factor2. Defaults to "factor2" if NULL.}
\item{factor3_name}{A character string representing the name for factor3. Defaults to "factor3" if \code{factor3} is provided and factor3_name is NULL.}
\item{random_effect_name}{A character string representing the name for the random effect. Defaults to "random_effect" if NULL.}
\item{factor1}{A factor or vector representing the first factor.}
\item{factor2}{A factor or vector representing the second factor.}
\item{factor3}{A factor or vector representing the third factor. Optional; defaults to \code{NULL}.}
\item{random_effect}{A factor or vector representing the random effect. May be \code{NULL}.}
}
\value{
A list containing:
\item{factor1_tmp}{Collapsed name for factor1.}
\item{factor2_tmp}{Collapsed name for factor2.}
\item{factor3_tmp}{Collapsed name for factor3 (or \code{NULL} if \code{factor3} is not provided).}
\item{random_effect_tmp}{Collapsed name for the random effect (or \code{NULL} if \code{random_effect} is \code{NULL}).}
\item{factor1}{Data frame for factor1.}
\item{factor2}{Data frame for factor2.}
\item{factor3}{Data frame for factor3 (or \code{NULL}).}
\item{random_effect}{Data frame for random_effect (or \code{NULL}).}
}
\description{
Processes input factors and a random effect by converting them into data frames with specified column names.
It also collapses the column names into single strings if multiple columns are present.
Supports an optional third factor.
}