| Line 1... |
Line 1... |
| 1 |
% File src/library/stats/man/model.frame.Rd
|
1 |
% File src/library/stats/man/model.frame.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2023 R Core Team
|
3 |
% Copyright 1995-2025 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{model.frame}
|
6 |
\name{model.frame}
|
| 7 |
\alias{model.frame}
|
7 |
\alias{model.frame}
|
| 8 |
\alias{model.frame.default}
|
8 |
\alias{model.frame.default}
|
| Line 39... |
Line 39... |
| 39 |
defaults to all. This can be any valid indexing vector (see
|
39 |
defaults to all. This can be any valid indexing vector (see
|
| 40 |
\code{\link{[.data.frame}}) for the rows of \code{data}, or
|
40 |
\code{\link{[.data.frame}}) for the rows of \code{data}, or
|
| 41 |
a (logical) expression using variables in \code{data} or
|
41 |
a (logical) expression using variables in \code{data} or
|
| 42 |
if that is not supplied, in
|
42 |
if that is not supplied, in
|
| 43 |
\code{formula}. (See additional details about how this argument
|
43 |
\code{formula}. (See additional details about how this argument
|
| 44 |
interacts with data-dependent bases under \sQuote{Details} below.)}
|
44 |
interacts with data-dependent bases and summary statistics
|
| - |
|
45 |
under \sQuote{Details} below.)}
|
| 45 |
|
46 |
|
| 46 |
\item{na.action}{an optional (name of a) function for treating missing
|
47 |
\item{na.action}{an optional (name of a) function for treating missing
|
| 47 |
values (\code{NA}s). The default is first,
|
48 |
values (\code{NA}s). The default is first,
|
| 48 |
any \code{na.action} attribute of \code{data}, second
|
49 |
any \code{na.action} attribute of \code{data}, second
|
| 49 |
a \code{na.action} setting of \code{\link{options}}, and third
|
50 |
a \code{na.action} setting of \code{\link{options}}, and third
|
| Line 108... |
Line 109... |
| 108 |
2.10.0).
|
109 |
2.10.0).
|
| 109 |
|
110 |
|
| 110 |
Because variables in the formula are evaluated before rows are dropped
|
111 |
Because variables in the formula are evaluated before rows are dropped
|
| 111 |
based on \code{subset}, the characteristics of data-dependent bases such
|
112 |
based on \code{subset}, the characteristics of data-dependent bases such
|
| 112 |
as orthogonal polynomials (i.e. from terms using \code{\link{poly}}) or
|
113 |
as orthogonal polynomials (i.e. from terms using \code{\link{poly}}) or
|
| - |
|
114 |
splines (such as \code{\link[splines]{bs}()} from package \pkg{splines})
|
| 113 |
splines will be computed based on the full data set rather than the
|
115 |
will be computed based on the full data set rather than the
|
| - |
|
116 |
subsetted one. This also applies to summary statistics, i.e., all
|
| - |
|
117 |
functions of variables returning shorter length results, often length one,
|
| 114 |
subsetted one.
|
118 |
such as \code{\link{mean}}.
|
| 115 |
|
119 |
|
| 116 |
Unless \code{na.action = NULL}, time-series attributes will be removed
|
120 |
Unless \code{na.action = NULL}, time-series attributes will be removed
|
| 117 |
from the variables found (since they will be wrong if \code{NA}s are
|
121 |
from the variables found (since they will be wrong if \code{NA}s are
|
| 118 |
removed).
|
122 |
removed).
|
| 119 |
|
123 |
|