rtweet with Premium to search the archive

The R package rtweet does a great job to connect R to Twitter. Unless you’re looking at the past 7 days, Twitter offers two additional API (with different syntax).

If you access Twitter archives with rtweet and have a Premium subscrption on Twitter, the current version of rtweet sends requests in batches of n=100, but Premium (currently) allows batches up n=500. This means, you use 5 requests where 1 would suffice. Kevin Taylor has provided a fix for this, which he also mentioned in the issues of rtweet. Using the fix is easy (much easier than the description in issues thread suggests):

library(devtools)
install_github("kevintaylor/rtweet")

This will replace any installed version fo rtweet. You probably want this version if you’re on Twitter Premium; for the free Sandbox, n=100 is correct. Perhaps this is why rtweet has not implemented the fix yet?

Image credit: CC-by-nc by diarnst

How to Add References in Footnotes in SciFlow

SciFlow is an exciting platform for collaborative academic writing. Perhaps similar to Authorea, SciFlow comes with no restrictions. One limitation I faced was that it seemed impossible to add reference in footnotes. If you enter a footnote, and add a reference there, the reference is added after the footnote. That’s not what we want. Let’s walk through the workaround:

You can add references in footnotes, though, if you copy the text (with the reference) into a footnote. To do so, write the text of the footnote on a new line, select the entire paragraph, and click on the “footnote” symbol (or cut and paste).

It turns out, there is a bug in the way references in footnotes are displayed (which the developers expect to iron out very soon), which made me believe that you cannot add references in footnotes. You get a “NO RENDERER SUPPLIED” error instead of the reference field.

Here’s your reference:

2018-09-01-121125_752x166_scrot

And this is what it looks like when you export the document:

updated on 1 September to reflect bug fix!