Articles by steve

The apply command 101

May 15, 2014 | steve

The goal of this blog entry is to introduce basic and essential information about the apply function. Even established R users get confused when considering this family of functions especially when observing how many of the them there are: apply, tapply, lapply, sapply, rapply, eapply, mapply. When I was new ... [Read more...]

Dining in San Francisco – Let R Guide You

May 6, 2014 | steve

I’m frequently asked by newcomers to R to provide an easy to follow generic set of instructions on how to download data, transform it, aggregate it, make graphs, and write it all up for publication in a high impact journal – all by the end of the day ! While such ... [Read more...]

GeoCoding, R, and The Rolling Stones – Part 1

April 12, 2014 | steve

Originally posted on Rolling Your Rs:In this article I discuss a general approach for Geocoding a location from within R, processing XML reports, and using R packages to create interactive maps. There are various ways to accomplish this, though using Google’s GeoCoding service is a good place to ... [Read more...]

Fortran and R – Speed Things Up

April 11, 2014 | steve

If you are a newcomer to R then you are probably quite busy learning the semantics of the language as you experiment with the apply family of commands or come up to speed on the grouping and conditioning capabilities offered by lattice graphics. And, along the way, you might have ... [Read more...]

Conditioning and Grouping with Lattice Graphics

February 17, 2014 | steve

Conditioning and grouping are two important concepts in graphing that allow us to rapidly refine our understanding of data under consideration. Conditioning, in particular, allows us to view relationships across “panels” with common scales. Each panel contains a plot whose data is “conditional” upon records drawn from the category that ... [Read more...]

Rstudio starts to codefold markdown

September 16, 2013 | steve

Rstudio is a great tool for working with R and R scripts. And Markdown is a great way to write even complex, reproducible documents in plain text. So they make a great combination. BUT: before when writing markdown in rstudio, you had to write “—-” after your headings to get ... [Read more...]

Vectors, Looping, and Performance

September 7, 2013 | steve

Vectors are at the heart of R and represent a true convenience. Moreover, vectors are essential for good performance especially when your are working with lots of data. We’ll explore these concepts in this posting. As a motivational example let’s generate a sequence of data from -3 to 3. ... [Read more...]

Omni test for statistical significance

May 9, 2013 | steve

In survey research, our datasets nearly always comprise variables with mixed measurement levels – in particular, nominal, ordinal and continuous, or in R-speak, unordered factors, ordered factors and numeric variables. Sometimes it is useful to be able to do blanket tests of one set of variables (possibly of mixed level) against ... [Read more...]

GeoCoding,R, and The Rolling Stones – Part 2

March 20, 2013 | steve

Welcome to Part 2 of the GeoCoding, R, and the Rolling Stones blog. Let’s apply some of the things we learned in Part 1 to a practical real world example. Mapping the Stones – A Real Example The Rolling Stones have toured for many years. You can go to Wikipedia and see ... [Read more...]

Apply Yourself !

February 13, 2013 | steve

Hello. Welcome to my debut post ! Check the About link to see what this Blog intends to accomplish. In this article I discuss a general approach for dealing with the problem of splitting a data frame based on a grouping variable and then doing some more operations per group. A ... [Read more...]

RStudio and TeXworks working great together

December 18, 2012 | steve

Just now writing a reproducible report in R using RStudio on Ubuntu. So the source is a .Rnw file and I am compiling it with knitr. For the narrative part of the report it is a shame that RStudio doesn’t have autocomplete for latex styles, headings etc. But I ... [Read more...]

Horizon plots with ggplot (not)

August 27, 2012 | steve

The Timely Portfolio blog via R-bloggers has recently published some interesting entries about the value of horizon plots for visual comparison of a number of time series. Very nice it looks too. You can read more about them here. The trick to understanding them is to imagine that each row ...
[Read more...]

Heatmap tables with ggplot2, sort-of

August 27, 2012 | steve

I wrote before about heatmap tables as a better way of producing frequency or other tables, with a solution which works nicely in latex. It is possible to do them much more easily in ggplot2, like this library(Hmisc) library(ggplot2) library(reshape) data(HairEyeColor) P=t(HairEyeColor[,,2]) Pm=melt(... [Read more...]

Heatmap tables with ggplot2

August 20, 2012 | steve

I wrote before about heatmap tables as a better way of producing frequency or other tables, with a solution which works nicely in latex. It is possible to do them much more easily in ggplot2, like this library(Hmisc) library(ggplot2) library(reshape) data(HairEyeColor) P=t(HairEyeColor[,,2]) Pm=melt(... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)