Articles by Patrick

Strange behavior from the cut function with dates in R

August 12, 2014 | Patrick

I recently encountered some strange behavior from R when using the cut.POSIXt method with “day” as the interval specification. This function isn’t working as I intended and I doubt that it is working properly. I’ll show you the behavior I’m seeing (and what I was expecting) ... [Read more...]

Insert random NAs in a vector in R

July 30, 2014 | Patrick

I was recently writing a function which was going to need to deal with NAs in some kind of semi-intelligent way. I wanted to test it with some fake data, meaning that I was going to need a vector with some random NAs sprinkled in. After a few disappointing google ... [Read more...]

GIS in R: Part 1

March 27, 2014 | Patrick

I messed around with R for years without really learning how to use it properly. I think it’s because I could always throw my hands up when the going got tough and run back and cling the skirts of Excel or JMP or Systat. I finally learned how to ... [Read more...]

Winter Solstice Survival Guide 2013

November 27, 2013 | Patrick

’tis the season to consume! But for this part of the year, as the Winter Solstice approaches, we consume not for ourselves, but for others, and that’s generally a good thing. Each year we here at Science… sort of like to put together a list of suggestions for the ... [Read more...]

Why are Birds Dinosaurs?

June 9, 2013 | Patrick

Month after month, one of the most popular posts on the Paleocave blog is the How to Read a Cladogram post I did some time ago. I always intended to follow it up with more cladistic fun. So, hold onto your butts, we’re going to let the dinosaurs loose. ... [Read more...]

Writing a for-loop in R

March 23, 2013 | Patrick

There may be no R topic that is more controversial than the humble for-loop. And, to top it off, good help is hard to find. I was astounded by the lack of useful posts when I googled “for loops in R” (the top return linked to a page that did ... [Read more...]

Science-y New Year’s Resolution: Learn to Code

December 26, 2012 | Patrick

In a 1995 interview Steve Jobs said he thought that computer programming should be a liberal art. In other words, he thought everyone’s education should include a year of learning a computer language, because it teaches you how to think in a certain way. If that was true in 1995, just ... [Read more...]

moRe

December 20, 2012 | Patrick

Hopefully my first R post whetted your apatite for open source data software.  I’m gearing up for more R posts regardless.  I thought I’d do a quick post about a couple of useful commands, ‘View’ and ‘fix’. When you first break the shackles of Excel one of the ... [Read more...]

R you ready for this? Statistics for free!

May 7, 2011 | Patrick

If you’ve listened to the show for a while or if you’ve been reading the paleocave blog from the beginning (like when we actually used to update it regularly), then you might know that I’m rather fascinated with statistics. Imagine my delight a few years ago when ... [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)