Articles by is.R()

APSRtable: Getting Tables from R to \( \LaTeX \)

December 5, 2012 | is.R()

Oftentimes you might be writing in LaTeX and trying to push your results from R into your .tex file. This, at times, can be very frustrating. Luckily, there’s apsrtable, an R package that automatically produces the LaTeX code for your  R model ... [Read more...]

Reading/Writing Stata (.dta) files with Foreign

December 4, 2012 | is.R()

Oftentimes we find ourselves collaborating with others who might not use R or prefer to use Stata to clean and manage their data. Luckily, there is the foreign package that permits handling data of different types (SAS, SPSS, Stata, etc.) within the R... [Read more...]

Rolling means (and other functions) with zoo

December 2, 2012 | is.R()

The zoo package is designed for use with (potentially irregular) time series data. It is widely used for any number of applications, but among its most frequently useful functions are the roll* functions, such as rollmean, rollmedian, rollmax, rollapp... [Read more...]

Using XML to grab tables from the web

December 1, 2012 | is.R()

We’re going to try, this December, to bring you an “Advent CalendaR,” for each of the 24 days leading up to Christmas. Each day, our hope is to unwrap a useful R package to show you a useful or interesting function inside! Today&#821... [Read more...]

Finding a bright object

November 30, 2012 | is.R()

Finally, to return to the challenge I laid out in the first of this series on image manipulation in R: can we do anything as cool in R as can be done in Mathematica? Like, for example, this illustration of how to search images of the surface of Mars... [Read more...]

Images as Voronoi tesselations

November 28, 2012 | is.R()

This is probably the coolest-looking thing I’ve figured out how to do with raster images in R. Similar to (although not quite as impressive as) these images by Jeff Clark, I alter the simple k-means approach described in the previous post to... [Read more...]

"Dominant" Color Palettes with k-means

November 27, 2012 | is.R()

The idea of deriving color palettes from images has long been an interest of mine. There are places you can do this online, but it’s at least plausible that you might want to identify dominant colors programatically, for a large number of image... [Read more...]

Image Manipulation in R, Part 1

November 26, 2012 | is.R()

So, you know how to load PNG files, access their innards, and plot them as points in a scatter plot. But, is it possible to use R to do some of the awesome things you can do with Mathematica? Well, in this series of posts, I’ll introduce just ... [Read more...]

Happy Thanksgiving from is.R()!

November 22, 2012 | is.R()

Today’s post is mostly to wish everyone a Happy Thanksgiving. We will be taking the rest of the week off, and will return on Monday. Below is some code to reproduce the adorable Turkey above; enjoy! https://gist.github.com/4122464 [Read more...]

Representing density in two dimensions

November 21, 2012 | is.R()

I’ll be subbing today for Chris, as we continue to explore some ggplot2 basics. Today, imagine that you have data distributed in two dimensions, and that you would like to convey differences in point density over space. As with many things, this... [Read more...]

Hjust and Vjust

November 16, 2012 | is.R()

So, when you’re setting the position of text in ggplot, you may have to use the hjust and vjust commands. Depending on your demands, and if you don’t understand what they’re doing, they might seem hard to use. I found one script that... [Read more...]

Textual Healing Part II

November 15, 2012 | is.R()

Yesterday’s post showed a number of quick coding options for changing text in a basic ggplot. Here’s another two tricks for fine-tuning faceted plots. Again, let’s load our made up data about tooth growth (a real dataset in R, ToothGr... [Read more...]

Textual Healing

November 14, 2012 | is.R()

While I know there are several awesome guides for how to make fine-tuning adjustments to plot labels/axes/ticks/text in ggplot, this is still the most common question I get from people new to ggplot: how do I change the size/font/color/position of (som... [Read more...]

Can’t a plot catch a break(s)?

November 13, 2012 | is.R()

This post continues with the theme of how to modify plots from within ggplot; today we will specifically looking at custom axis breaks. Plots later in the week will examine the commands to change text in the plot area. The various other shortcomings o... [Read more...]

Interactive color picker, using locator()

November 9, 2012 | is.R()

I mostly wrote this just to see how locator() works, and ended up making an HCL color picker, so you can make your own visually offensive rainbow color palettes! Or, you can make your own nice color palettes. It is up to you. Essentially, this script... [Read more...]

Five Thirty-Hate?

November 8, 2012 | is.R()

The last few days have been trying, mostly because folks keep asking me the same questions: have you voted? Who do you think will win the election? Do you think Nate Silver (http://fivethirtyeight.blogs.nytimes.com/)  is right? How confident are you ... [Read more...]

Make your own electoral map

November 7, 2012 | is.R()

You’ve already seen everyone else’s electoral map (see this amazing array of maps from 2008), how would you like to make your own? Today’s Gist allows you to do just that — input (manually!) state-by-state results, and output a... [Read more...]
1 2 3 4

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)