Blog Archives

Forming Formulas

April 29, 2011
By
Forming Formulas

One of the first functions a new R user learns how to use is the lm() command, which involves stating the model formula.lm(y~x1+x2, data=mydata)After a while, this just becomes a natural way to say "I want a regression of y on x1 and x2 using mydata." ...

Read more »

Automatically Save Your Plots to a Folder

April 26, 2011
By
Automatically Save Your Plots to a Folder

Suppose you're working on a problem that involves a loop for calculations. At each iteration inside the loop, you want to construct a plot. Not only do you want to see the plot, but you would like to save each plot for a presentation, report or paper...

Read more »

Automatically Save Your Plots to a Folder

April 26, 2011
By
Automatically Save Your Plots to a Folder

Suppose you're working on a problem that involves a loop for calculations. At each iteration inside the loop, you want to construct a plot. Not only do you want to see the plot, but you would like to save each plot for a presentation, report or paper...

Read more »

R Bloggers

April 26, 2011
By
R Bloggers

I recently found a great resource for R in the blogosphere, the R Bloggers Blog Aggregator. Basically, the site aggregates posts from a bunch of blogs about R (like this one!) into a giant feed of uses for R. If you are interested in learning more ab...

Read more »

R Bloggers

April 26, 2011
By
R Bloggers

I recently found a great resource for R in the blogosphere, the R Bloggers Blog Aggregator. Basically, the site aggregates posts from a bunch of blogs about R (like this one!) into a giant feed of uses for R. If you are interested in learning more ab...

Read more »

Merging Data Video Tutorial

April 25, 2011
By
Merging Data Video Tutorial

Here's a video tutorial where I walk through some code that does what the previous post describes.The FRED data is used extensively for macroeconomics. You might these data useful for joining in graph fights in the blogosphere.

Read more »

Merging Data Video Tutorial

April 25, 2011
By
Merging Data Video Tutorial

Here's a video tutorial where I walk through some code that does what the previous post describes.The FRED data is used extensively for macroeconomics. You might these data useful for joining in graph fights in the blogosphere.

Read more »

Merging Multiple Data Files into One Data Frame

April 24, 2011
By
Merging Multiple Data Files into One Data Frame

We often encounter situations where we have data in multiple files, at different frequencies and on different subsets of observations, but we would like to match them to one another as completely and systematically as possible. In R, the merge() comma...

Read more »

Merging Multiple Data Files into One Data Frame

April 24, 2011
By
Merging Multiple Data Files into One Data Frame

We often encounter situations where we have data in multiple files, at different frequencies and on different subsets of observations, but we would like to match them to one another as completely and systematically as possible. In R, the merge() comma...

Read more »

Dates in R and the First Day of the Month

April 23, 2011
By
Dates in R and the First Day of the Month

I spent some time this morning learning about how R thinks about dates in R. I found this website to be a useful guide.Imagine that your data are dates in a standard format and you want a vector o...

Read more »