[R] Is it possible to have data stuctures like in C ?

Thomas Lumley tlumley at u.washington.edu
Mon Apr 7 16:08:08 CEST 2003


On 7 Apr 2003, Samuel Plessis-Fraissard wrote:

> I'am a very fresh R user and I'd like to know how I could create such
> structures.
>
> I saw R was objects-oriented but I can not find any doccumentation on
> about how to build my hown ojects.
>

You can build arbitrarily complex structures using lists (and lists of
lists, and...).

This isn't what people mean when they describe R as object-oriented,
though.

There are two systems for handling generic and method functions, so you
can say
    print(x)
or
    plot(x)

and the appropriate function for printing or plotting an `x' will be
called.

While there is some documentation (see ?class, ?UseMethod, and help for
the `methods' package) and there are quite a lot of examples in R itself
and in the Bioconductor project you probably want to read a book on S
programming.

	-thomas



More information about the R-help mailing list