Posts Tagged ‘ table ’

Copy and paste small data sets into R

March 21, 2012
By
Copy and paste small data sets into R

How can I embed a small data set into my R code? That was the question I came across today, when I prepared my talk about Dynamical Systems in R with simecol for the forthcoming Cologne R user group meeting. I wanted to add all the R code of the talk t...

Read more »

How to convert contingency tables to data frames with R

March 14, 2012
By

I wanted to write contingency tables in HTML with hwrite(). I realized that the method hwrite() does not exist for the table objects. I could use as.data.frame(), but the table produced is non-intuitive. I did a search on R-bloggers and I quickly found the solution to my problem: the as.data.frame.matrix() function. The contingency table A

Read more »

Example 8.23: Expanding latent class model results

January 31, 2011
By
Example 8.23: Expanding latent class model results

In Example 8.21 we described how to fit a latent class model to data from the HELP dataset using SAS and R (using poLCA(), and then followed up in example 8.22 using randomLCA(). In both entries, we classified subjects based on their observed (manifes...

Read more »

Programming with R – Processing Football League Data Part II

December 3, 2010
By

Following on from the previous post about creating a football result processing function for data from the football-data.co.uk website we will add code to the function to generate a league table based on the results to date. To create the league table we need to count various things such as the number of games played, number

Read more »

On the Gory Loops in R

October 17, 2010
By

his blog post is mainly for Stat 579 students on the homework for week 7, since I received too many “gory” loops in the homework submissions and I think it would help a bit to write my thoughts on R loops for beginners. The immortal motto for newbies in programming is: If you want to

Read more »

Creating a Presentation with LaTeX Beamer – Tables

July 14, 2010
By
Creating a Presentation with LaTeX Beamer – Tables

Tables of information can be included in a LaTeX beamer presentation in the same way that they would be incorporated into any other LaTeX document. The tabular environment is used and, if necessary, the tables could be numbered but this probably doesn’t make as much sense as labelling and numbering tables within an article or

Read more »

Set the significant digits for each column in a xtable for fancy Sweave output

June 26, 2009
By
Set the significant digits for each column in a xtable for fancy Sweave output

This tip may be useful in the situations when you need to set the number of digits to print for the different columns in a matrix/data.frame to be outputted as a LaTeX table.  For example:#install.packages("xtable") #library(xtable) tmp <- m...

Read more »