Monthly Archives: May 2013

RPostgreSQL (R) versus psycopg (Python)

Here’s a rather simplistic comparison of the performance of R and Python in getting data from PostgreSQL. R: Time taken: 26-27 seconds. Python: Time taken: Around 6 seconds. I’m impressed. I’ve never really been bothered by performance in getting data … Continue reading

Posted in PostgreSQL, R | Tagged , , | Leave a comment

Running SAS from Python on WRDS

Suppose I have a SAS macro that I call using a parameter, is there a way to pass that parameter from a Python program? Turns out the answer is “yes!” Suppose I want SAS to operate on every daily TAQ … Continue reading

Posted in Uncategorized | Leave a comment

Calculating fog using PostgreSQL and Perl

A measure of the complexity of text that has become popular in accounting research is “fog”; this equals (number of words per sentence + percentage of words that are complex) * 0.4. The following function run in PostgreSQL gives access … Continue reading

Posted in Perl, PostgreSQL | Tagged , , | 1 Comment

Making tables with RStudio and LaTeX

The following uses two approaches to make tables in LaTeX. The issue I’ve seen with many solutions is that the examples provided are “toy” examples without the kinds of requirements of real papers (e.g., notes explaining the contents of tables, … Continue reading

Posted in Uncategorized | Leave a comment

RStudio Server on Mac OS X

In an earlier post, I have a link to an approach to installing RStudio Server on Mac OS X suggested by Matt Furia. A more streamlined approach (though essentially that suggested by Matt) builds on MacPorts¬†or Homebrew. The following assumes … Continue reading

Posted in Uncategorized | Tagged , , | 63 Comments