R (and S) being programming environments for statisticians, there purpose is quite
different from a spreadsheet.
- There are no specific functions for listing data with all kinds of presentation
options. If you want to do this you will need to either program your own functions,
or use R to produce the raw table you want and then interface to some other software
(Tex for instance).
- Otherwise the full power of R is available to produce any form of data table
(sorting, selecting, rearranging data matrices).
- Graphical representation of a table using coding techniques however will require
that you create your own functions, i.e. you need programming skills...
Some useful commands/examples
The examples below assume that your have read the workspace world, and have
issued an attach(world) command.
- world simply lists the contents of the data frame world
- head(world) shows the first observations, and
tail(world) shows the last few observations.
- world[order(urb),] orders the data frame
by urb (ascending order); a
- world[urb<20,] List the data frame but only the
countries that have an urbanization of less than 20%.
- rownames(world[urb>90,]) list the country names for more than 90% urbanized countries.