| Line 1... |
Line 1... |
| 1 |
% File src/library/base/man/as.data.frame.Rd
|
1 |
% File src/library/base/man/as.data.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-2024 R Core Team
|
3 |
% Copyright 1995-2026 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{as.data.frame}
|
6 |
\name{as.data.frame}
|
| 7 |
\title{Coerce to a Data Frame}
|
7 |
\title{Coerce to a Data Frame}
|
| 8 |
\alias{as.data.frame}
|
8 |
\alias{as.data.frame}
|
| Line 35... |
Line 35... |
| 35 |
|
35 |
|
| 36 |
\method{as.data.frame}{matrix}(x, row.names = NULL, optional = FALSE,
|
36 |
\method{as.data.frame}{matrix}(x, row.names = NULL, optional = FALSE,
|
| 37 |
make.names = TRUE, \dots,
|
37 |
make.names = TRUE, \dots,
|
| 38 |
stringsAsFactors = FALSE)
|
38 |
stringsAsFactors = FALSE)
|
| 39 |
|
39 |
|
| 40 |
as.data.frame.vector(x, row.names = NULL, optional = FALSE, \dots,
|
40 |
as.data.frame.vector(x, row.names = NULL, optional = FALSE, validRN = TRUE, \dots,
|
| 41 |
nm = deparse1(substitute(x)))
|
41 |
nm = deparse1(substitute(x)))
|
| 42 |
|
42 |
|
| 43 |
is.data.frame(x)
|
43 |
is.data.frame(x)
|
| 44 |
}
|
44 |
}
|
| 45 |
\arguments{
|
45 |
\arguments{
|
| Line 72... |
Line 72... |
| 72 |
\code{x}) are invalid. If they are invalid, the default,
|
72 |
\code{x}) are invalid. If they are invalid, the default,
|
| 73 |
\code{TRUE}, calls \code{\link{make.names}(*, unique=TRUE)};
|
73 |
\code{TRUE}, calls \code{\link{make.names}(*, unique=TRUE)};
|
| 74 |
\code{make.names=NA} will use \dQuote{automatic} row names and a
|
74 |
\code{make.names=NA} will use \dQuote{automatic} row names and a
|
| 75 |
\code{FALSE} value will signal an error for invalid row names.}
|
75 |
\code{FALSE} value will signal an error for invalid row names.}
|
| 76 |
%% *.vector():
|
76 |
%% *.vector():
|
| - |
|
77 |
\item{validRN}{a \code{\link{logical}} indicating if row names should be
|
| - |
|
78 |
checked to be valid; currently only checks if the row contain no
|
| - |
|
79 |
\code{\link{NA}}s. This was implicitly \code{FALSE} in \R version
|
| - |
|
80 |
before 4.7.0. Setting it to \code{FALSE} may still be necessary during
|
| - |
|
81 |
dataframe construction.}
|
| 77 |
\item{nm}{a \code{\link{character}} string to be used as column name.}
|
82 |
\item{nm}{a \code{\link{character}} string to be used as column name.}
|
| 78 |
}
|
83 |
}
|
| 79 |
\value{
|
84 |
\value{
|
| 80 |
\code{as.data.frame} returns a data frame, normally with all row names
|
85 |
\code{as.data.frame} returns a data frame, normally with all row names
|
| 81 |
\code{""} if \code{optional = TRUE}.
|
86 |
\code{""} if \code{optional = TRUE}.
|