Importing date data into R from Excel

If you’re importing dates from Excel into R with the gdata package, you might get some funny numbers instead of the dates you’re expecting. These numbers represent the number of days from January 1, 1904 (or 1900) depending on what version of Excel the dates were entered in.

This StackOverflow question helped me get numbers like 40693 looking more like dates. So something like

as.Date(40693, origin="1899-12-30")

worked for me. I don’t really know why I had to use 1899-12-30 for the origin – I thought  should use 1900-01-01, but that was off by a couple days. 1899-12-30 gave me the right dates, so I won’t argue. I will, however, be double checking the other dates for weirdness.

Women just don’t like doing research, right?

Lockwood et al. report that, for ecologists,

The sources of [career] satisfaction for men and women are notably different. Women report that they obtain substantially greater satisfaction from classroom teaching (20% of females listed this as a source of satisfaction, as compared to 13% of males), while men derive significantly greater satisfaction from data analysis and written communication.

Might that be because a paper is considered lower quality when written by a woman? If women are rewarded less for their papers than men, it makes sense that they’d get less satisfaction from writing them.

——————————————————

Jeffrey A Lockwood, Derek S Reiners, and William A Reiners 2013. The future of ecology: a collision of expectations and desires? Frontiers in Ecology and the Environment 11: 188–193. http://dx.doi.org/10.1890/120271

The Matilda Effect in Science Communication: An Experiment on Gender Bias in Publication Quality Perceptions and Collaboration Interest,” Science Communication, Silvia Knobloch-Westerwick, Carroll J. Glynn and Michael Huge, DOI: 10.1177/1075547012472684

Making R go faster

If you need more than your for loops speeded up in R, you might want to see Noam Ross’s FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People. It’s super practical and easy to understand.

An additional challenge for parentage analysis is that it requires exhaustive sampling and so is practical only over small spatial scales (less than 10 km) and low densities. Even extraordinary examples of this type of work include only about 1000 trees in isolated populations (Lesser & Jackson 2013). The continental distributions of dense coniferous forests do not lend themselves to these methods.

In which I master the art of scientific understatement