I'm trying to write an R function to calculate the number of weekdays between two dates. For example, Nweekdays('01/30/2011','02/04/2011') would equal 5.
Similar to this question. Thanks!
/edit: @J. Winchester's answer is great, but I was wondering if anyone could think of a way to vectorize this, so that it'll work on 2 columns of dates. Thanks! /edit 2: Thanks again!
See Question&Answers more detail:os