how to

Interacting with bioinformatics webservers using R

September 8, 2011 | nsaunders

In an ideal world, all bioinformatics tools would be made available via the Web as a web service with an API, as well as a standalone package to download for local use. This is rarely the case and sometimes, even where one or the other is available, factors such as ... [Read more...]

R: calculations involving months

July 7, 2011 | nsaunders

Ask anyone how much time has elapsed since September last year and they’ll probably start counting on their fingers: “October, November…” and tell you “just over 9 months.” So, when faced as I was today with a data frame (named dates) like this: How to add a 7th column, with ... [Read more...]

R 2.12 to 2.13 package upgrade

April 14, 2011 | nsaunders

If you: use Linux have just upgraded your R installation from 2.12 to 2.13 installed some/all of your packages in your home area (e.g. ~/R/i486-pc-linux-gnu-library/2.12) and… …are wondering why R can’t see them any more just do this: # at a shell prompt cp ~/R/i486-pc-linux-gnu-library/2.12 ~/R/... [Read more...]

Visualize NHL Play-by-Play using Tableau Public and R

February 13, 2011 | Brock

Nothing like a little Sunday morning data hacking before a big game!  I have been wanting to play with the NHL play-by-play event files for some time now.  The JSON datasets provide a wealth of information about each event in the game including the location, as defined by the fields ... [Read more...]

The Clipboard can be Your Friend

January 17, 2011 | --

One of the features I feel that I don’t leverage enough, particularly for ad-hoc questions, is the clipboard feature  in R. I know there are many ways to use it –  as I have been exposed to a few –  but the example below, even without context, should get you thinking ... [Read more...]

Remove all rows of an R dataframe

January 13, 2011 | --

I should have probably figured this out a long time ago, but as I get deeper into programming with R, I am finding the need to remove all rows from a dataframe.  I was making this alot harder than it had to be. your.df [Read more...]

Scrape Web data using R

August 13, 2010 | --

Plenty of people have been scraping data from the web using R for a while now, but I just completed my first project and I wanted to share the code with you.  It was a little hard to work through some of the “issues”, but I had some great help ... [Read more...]

Read Compressed Zip Files in R

June 25, 2010 | --

One of the great things that I am learning about R is that it is really powerful as a data management tool.  I just found how to unzip files.  I could use Python for this in SPSS, but it just feels like it is more natural to do in R.  ... [Read more...]

Plotting “time of day” data using ggplot2

April 14, 2010 | nsaunders

William asks: How can I make a graph that looks like this, “tweet density” style, showing time intervals? He then helpfully describes his input data: a CSV file with headers “time started, time finished, date”. Here’s a simple CSV file, tasks.csv: task,date,start,end task1,2010-03-05,09:00:00,13:00:00 ... [Read more...]

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)