Notes

Mangel group talk

  • Presented nonparametric-bayes slides
  • ADP introduction / trouble-shooting (see yesterday’s entry), html5 slides

Notes

  • Decent convergence in the forward algorithm is hard. Consider basis function representation of value function to decrease the search space in the backwards-algorithm first. Also consider searching for policy function (under appropriate piecewise constraints).
  • Starts to sound more and more similar to POMDP

Misc

R packages state licenses in the DESCRIPTION file, which automatically recognizes standard licenses rather than distributing a copy of the license. This seems sensible but it’s not like we don’t have a few bits to spare for a million duplicate copies of license files, so I suppose I could add this in explicitly.

Clearly my own thinking on licenses has evolved ahead of my adaptation:

$ grep "License" code/*/DESCRIPTION

AdaptiveDynamics/DESCRIPTION:License: GPL (>= 2)
earlywarning/DESCRIPTION:License: BSD
fluctuationDomains/DESCRIPTION:License: CC ZERO 1.0 + file LICENSE
knitcitations/DESCRIPTION:License: CC0
mcmcTools/DESCRIPTION:License: BSD
multiple_uncertainty/DESCRIPTION:License: BSD
nonparametric-bayes/DESCRIPTION:License: BSD
OUwie/DESCRIPTION:License: GPL (>= 2)
pdg_control/DESCRIPTION:License: BSD
pmc/DESCRIPTION:License: CC0
populationdynamics/DESCRIPTION:License: BSD
prosecutors-fallacy/DESCRIPTION:License: BSD
socialR/DESCRIPTION:License: GPL (>= 2)
structured-populations/DESCRIPTION:License: GPL (>= 3)
warningsignals/DESCRIPTION:License: GPL (>= 2)
wrightscape/DESCRIPTION:License: GPL-2

Looks like it’s time for a little

sed -i "s/License: .*/License: CC0/" */DESCRIPTION

Yeehaw!

Just for the sake of being pendantic,

wget https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
mv legalcode.txt LICENSE
echo */R/.. | xargs -n 1 cp LICENSE 

RCurl query from Scott

Translate a cURL command’s -d flag to RCurl, e.g.

curl -H "X-Gauges-Token: <token>" \
     -d "title=Example" \
     -d "tz=Eastern Time (US %26 Canada)" \
     https://secure.gaug.es/gauges

I proposed

httpPOST("https://secure.gaug.es/gauges", 
         postfields="title=Example&tz=Eastern Time (US %26 Canada)", 
         httpHeader=c("X-Gauges-Token"="<token>"), verbose=TRUE)

Though here is an SO example with slightly more elegant construction of postfields.

Two column layout with longtable

Pandoc now uses the longtable package to generate tables. Annoyingly, these insist on being single-column objects and are not handled properly by elsarticle two-column layouts. To get around this, I edit the latex Pandoc creates, wrapping the table in a float environment (\begin{figure}), followed by a toggle to \onecolumn. After the longtable envirnoment block ends, I include the caption, then toggle back to \twocolumn layout. I also have to tune the width of the minipage objects used by longtable, and change its alignment option to left-align (\begin{longtable}[l]). After these modifications I have a nice floating table in the width of a single column, embedded in my two-column layout.

Brilliantly, arXiv has no trouble with the scores of extra package dependencies introduced by pandoc, as long as the document is pdflatex compatible (no xelatex, hence non-ascii UTF-8, or custom fonts, sorry). Still far ahead of my experience submitting the same document to the acutal journal…

This nicely formatted tex is in the repository as arxiv-copy.tex. Should be generated from source with make fancy, since default make builds the 1980s plaintex format for the journal. I need to add make commands to automatically wrap the longtable as described above, hopefully a few lines of sed should do this…

So, arXiv copy sumbmitted… stay tuned on Thursday.