My Review of Monogan’s Political Analysis Using R

The Journal of Statistical Software has published another review I wrote, this time of Monogan’s Political Analysis Using R: No Title No Description The book is a solid choice for a primary or supplementary text in a political or policy methodology class, at the level of advanced undergraduate or first-year graduate student. You can get more information from Springer’s website: Political Analysis Using R | James E. Monogan III | Springer This book provides a narrative of how R can be useful in the analysis of public administration, public policy, and political science data specifically, in…

Of Course NaN^0 = 1

David Smith and I are now talking to each other in blog posts and it is only a little weird. Also, I’ve been traveling and am a bit behind. In a comment on this post, he notes this: I suspect the reason why R Core adopted the 0^0=1 definition is because of the binomial justification, R being a stats package after all. I can’t think of any defense for NaN^0=1 though… Well, it turns out there’s a good reason. If we go back C, and try an experiment, we can observe the following example produces these results: Compiling and executing

NaN versus NA in R

R has two different ways of representing missing data and understanding each is important for the user. NaN means “not a number” and it means there is a result, but it cannot be represented in the computer. The second, NA, explains that the data is just missing for unknown reasons. These appear at different times when working with R and each has different implications. NaN is distinct from NA. NaN implies a result that cannot be calculated for whatever reason, or is not a floating point number. Some calculations that lead to NaN, other than , are attempting to take

waterfall 1.0.0 released

Sometime, approximately forever ago, I put together a small package to produce waterfall charts in R. It provided two functions, one using base graphics and one using lattice graphics. I planned to document this and also create a version in ggplot. I never got around to either and through bit rot, and an ever evolving packaging system within R, the project fell out of compliance and was kicked off CRAN. About a year ago, I converted the Mercurial repository to git and posted it to GitHub. As a part of this, I also introduced Git Flow into the tree. But