\HeaderA{AttributeList-class}{Class "AttributeList"}{AttributeList.Rdash.class}
\aliasA{\$.AttributeList}{AttributeList-class}{.Rdol..AttributeList}
\aliasA{\$<\Rdash.AttributeList}{AttributeList-class}{.Rdol.<.Rdash..AttributeList}
\aliasA{as.data.frame.AttributeList}{AttributeList-class}{as.data.frame.AttributeList}
\aliasA{as.list.AttributeList}{AttributeList-class}{as.list.AttributeList}
\aliasA{AttributeList}{AttributeList-class}{AttributeList}
\aliasA{coerce,AttributeList,data.frame-method}{AttributeList-class}{coerce,AttributeList,data.frame.Rdash.method}
\aliasA{coerce,AttributeList,list-method}{AttributeList-class}{coerce,AttributeList,list.Rdash.method}
\aliasA{coerce,data.frame,AttributeList-method}{AttributeList-class}{coerce,data.frame,AttributeList.Rdash.method}
\aliasA{coerce,list,AttributeList-method}{AttributeList-class}{coerce,list,AttributeList.Rdash.method}
\aliasA{dim.AttributeList}{AttributeList-class}{dim.AttributeList}
\aliasA{names.AttributeList}{AttributeList-class}{names.AttributeList}
\aliasA{names<\Rdash.AttributeList}{AttributeList-class}{names<.Rdash..AttributeList}
\aliasA{[,AttributeList-method}{AttributeList-class}{[,AttributeList.Rdash.method}
\aliasA{[[.AttributeList}{AttributeList-class}{[[.AttributeList}
\aliasA{[[<\Rdash.AttributeList}{AttributeList-class}{[[<.Rdash..AttributeList}
\keyword{classes}{AttributeList-class}
\begin{Description}\relax
Attribute list; a kind of data.frame but without row.names
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls of the form \code{AttributeList(x)},
with \code{x} a list having elements of equal length.
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{att}:] Object of class \code{"list"}, containing the
attributes variables. The variables are guaranteed to have equal
length, and can be of any type that has a length 
}
\end{Section}
\begin{Section}{Methods}
\describe{
\item[[] \code{signature(x = "AttributeList")}: subsets 
\item[coerce] \code{signature(from = "AttributeList", to = "data.frame")}: convert the list
slot to data.frame 
\item[coerce] \code{signature(from = "AttributeList", to = "list")}: retrieve the list slot 
\item[coerce] \code{signature(from = "data.frame", to = "AttributeList")}: ... 
\item[coerce] \code{signature(from = "list", to = "AttributeList")}: ... 
\item[as.list] coerce AttributeList object to list
\item[as.data.frame] coerce AttributeList object to data.frame
\item[dim] retrieve dimensions of object, as if it were a data.frame:
\code{dim(x)[1]} is the length of variables (nr or rows),
\code{dim(x)[2]} the number of variables (nr of columns) 
\item[[[, \$] retrieve a list element
\item[[[<-, \$<-] assign a list element
\item[summary] calls \code{summary.data.frame} on the list
\item[names] get names from the list
\item[names<-] assign names to the list
}
\end{Section}
\begin{Note}\relax
In earlier versions (sp <= 0.7-6), objects of class
\LinkA{SpatialPointsDataFrame-class}{SpatialPointsDataFrame.Rdash.class}, \LinkA{SpatialPixelsDataFrame-class}{SpatialPixelsDataFrame.Rdash.class}
and \LinkA{SpatialGridDataFrame-class}{SpatialGridDataFrame.Rdash.class} had a slot of class
\LinkA{data.frame}{data.frame} to store the attribute information. It turns out that
especially for larger grids, holding the grid attribute information in a
data.frame requires up to a factor 11 more memory than needed by the data
alone, for the sole reason that R creates unique row.names for each row
(i.e., value).

To get around this problem, we created the simple S4 AttributeList class
which has a single slot which is a list, without row.names, but with a
validator function that checks that all elements in the list have equal
length. The class is meant to behave similar to a data.frame, having a
similar set of methods. It does not automatically convert character data
to factors.

If you have row.names in your data.frame, and you want to keep them when
you convert them to e.g. a \LinkA{SpatialPointsDataFrame-class}{SpatialPointsDataFrame.Rdash.class} object
using \LinkA{coordinates}{coordinates}, you should first copy the row.names to a column
in the data.frame. If not, they will get lost.
\end{Note}
\begin{Author}\relax
Edzer J. Pebesma, \email{e.pebesma@geo.uu.nl}
\end{Author}
\begin{SeeAlso}\relax
\LinkA{list}{list}, \LinkA{data.frame}{data.frame}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x = AttributeList(list(a = 1:10, b = sample(1:10), c = runif(10)))
x
summary(x)
x = object.size(AttributeList(list(a = 1:1000000)))
y = object.size(data.frame(a = 1:1000000))
y / x
\end{ExampleCode}
\end{Examples}

