All posts filed under: Main

On the use and abuse of weasels in science journalism

comment 1
Main

Dean Burnett writes a column in Guardian, sometimes about science but more entertainingly on pseudo-, wannabe-, and not-actually- science. Most of the time this is good BS-shovelling fun and I recommend it. Unfortunately today we get some ill-considered overreach under the guise of shovelling. The subject is a silly equation purporting to define how depressing any day of the year is, and thereby to identify the most depressing one. It is sufficiently silly that it […]

Constants in Logit scales

Leave a comment
Main

A little while ago I got a query about the calculation of the logit policy scales from Lowe et al. (2011). I thought it might be useful to repeat the answer slightly more publicly, in case anybody else was wondering. The pesky constants in that paper confuse people. Anyway, here’s the question: In the article you give the formula as . I had assumed that in the formula that ‘R’ and ‘L’ were the total […]

Unicode in R packages (not)

Leave a comment
Main

Perhaps you are trying to add your nice new object as data for an R package. But wait. It has [gasp] foreign letters in its dimnames, so ‘R CMD check’ will certainly complain. What you need is something to turn R’s natural Unicode-processing goodness into a relic from the early days of computing without inadvertently aliasing any words that differ only by non-ASCII element. Here’s a handy iconv-invoking function to do that…

A conversion to Yoshikoder format

Leave a comment
Main

A couple of months ago somebody asked how to convert a new dictionary file so that it would run in the Yoshikoder. The format of the original file had two parts: the first half looked like: % 1 funct 2 pronoun 3 ppron 4 i 5 we ... which assigns identifiers to category labels, and a second half that looked like: % a 1 10 abandon* 125 127 130 131 137 abdomen* 146 147 abilit* […]