% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classes.R
\name{HexData-methods}
\alias{HexData-methods}
\alias{grid_info,HexData-method}
\alias{cells,HexData-method}
\alias{n_cells,HexData-method}
\alias{nrow,HexData-method}
\alias{ncol,HexData-method}
\alias{dim,HexData-method}
\alias{names,HexData-method}
\alias{$,HexData-method}
\alias{$<-,HexData-method}
\alias{[,HexData-method}
\alias{[[,HexData-method}
\alias{[[<-,HexData,ANY,missing-method}
\alias{show,HexData-method}
\alias{as.data.frame,HexData-method}
\alias{as.list,HexData-method}
\title{HexData S4 Methods}
\usage{
\S4method{grid_info}{HexData}(x)

\S4method{cells}{HexData}(x)

\S4method{n_cells}{HexData}(x)

\S4method{nrow}{HexData}(x)

\S4method{ncol}{HexData}(x)

\S4method{dim}{HexData}(x)

\S4method{names}{HexData}(x)

\S4method{$}{HexData}(x, name)

\S4method{$}{HexData}(x, name) <- value

\S4method{[}{HexData}(x, i, j, ..., drop = FALSE)

\S4method{[[}{HexData}(x, i)

\S4method{[[}{HexData,ANY,missing}(x, i, j) <- value

\S4method{show}{HexData}(object)

\S4method{as.data.frame}{HexData}(x, row.names = NULL, optional = FALSE, ...)

\S4method{as.list}{HexData}(x, ...)
}
\arguments{
\item{x}{HexData object}

\item{name}{Column name}

\item{value}{Replacement value}

\item{i, j}{Row/column indices}

\item{...}{Additional arguments}

\item{drop}{Logical, whether to drop dimensions}

\item{object}{HexData object (for show)}

\item{row.names}{Optional row names}

\item{optional}{Logical (ignored)}
}
\value{
\itemize{
\item \code{grid_info}: HexGridInfo object containing grid specification
\item \code{cells}: Numeric vector of unique cell IDs
\item \code{n_cells}: Integer count of unique cells
\item \code{nrow}, \code{ncol}, \code{dim}: Integer dimensions
\item \code{names}: Character vector of column names (including virtual cell columns)
\item \code{$}, \code{[[}: The requested column or cell data as a vector
\item \verb{$<-}, \verb{[[<-}: The modified HexData object
\item \code{[}: Subsetted HexData object or extracted data
\item \code{show}: The object, invisibly (called for side effect of printing)
\item \code{as.data.frame}: Data frame with original data plus cell columns
\item \code{as.list}: Named list containing data, grid, cell_id, and cell_center
}
}
\description{
S4 methods for HexData objects. These provide standard R operations
for accessing data, subsetting, and conversion.
}
\details{
Unlike \code{[.data.frame}, \code{drop} defaults to \code{FALSE}: selecting
a single column returns a \code{HexData} object (preserving \code{grid}/
\code{cell_id}/\code{cell_center}) rather than dropping to a bare vector.
Pass \code{drop = TRUE} explicitly to get data.frame-style dropping.
}
\keyword{internal}
