Skip to main content

Displaying Multiway Tables

  • Chapter
Lattice

Part of the book series: Use R! ((USE R))

  • 9066 Accesses

An important subset of statistical data comes in the form of tables. Tables usually record the frequency or proportion of observations that fall into a particular category or combination of categories. They could also encode some other summary measure such as a rate (of binary events) or mean (of a continuous variable). In R, tables are usually represented by arrays of one (vectors), two (matrices), or more dimensions. To distinguish them from other vectors and arrays, they often have class “table”. The R functions table() and xtabs() can be used to create tables from raw data.

Graphs of tables do not always convey information more easily than the tables themselves, but they often do. The barchart() and dotplot() functions in lattice are designed to display tabulated data. As with other high-level functions, the primary formula interface requires the data to be available as a data frame. The as.data.frame.table() function can be used for converting tables to suitable data frames. In addition, there are methods in lattice that work directly on tables. We focus on the latter in this chapter; examples using the formula interface can be found in Chapter 2.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer Science+Business Media, LLC

About this chapter

Cite this chapter

(2008). Displaying Multiway Tables. In: Lattice. Use R!. Springer, New York, NY. https://doi.org/10.1007/978-0-387-75969-2_4

Download citation

Publish with us

Policies and ethics