Tuesday, December 02, 2014

S4 methods with roxygen2

I thought that you need a .local() function internal to your S4 method in order to have non-standard arguments.

No, you just let the ... carry new ones.

For roxygen2 you need @name (to know which file.Rd it goes in), @aliases to make explicit the full method signature, and @export.


.big.extract <-  function (x, y,  ctstime = FALSE, fact = NULL, verbose = TRUE, ...) {
   ## etc.
##' @name extract
##' @export
##' @aliases extract,function,data.frame-method
setMethod("extract", signature(x = 'function', y = 'data.frame'), .big.extract)


Saturday, November 29, 2014

Yet more NetCDF garbage

Why is this always so broken?

  float time(time) ;
                time:long_name = "Time" ;
                time:standard_name = "time" ;
                time:units = "days since 1950-01-01 00:00:00 UTC" ;
                time:calendar = "julian" ;
 :comment = "Surface product; Seasonal Climatology of Sea Level Anomalies referenced to the [1993, 2012] period" ;

var.get.nc(nc, "time")

[1] 45

Right, 45 days since January 1 1950. I don't think so.

Saturday, November 01, 2014

Science Faction

Weird how some movies get labelled as "science fiction" rather than "fantasy", or "really crap" and how actual science fiction is technically not fantasy.

Anyway, Cowboys and Aliens.

Saturday, June 07, 2014

Nectar pain points

Summary of the process 

The crucial parts with Nectar are ensuring you have
  • a Nectar account
  • Security Rules for the right ports
  • a keypair set up for the initial admin login 
  • a Nectar allocation to launch the RStudio server against
  • somewhere to log into the virtual machine from (e.g. via SSH with MobaXTerm on Windows)
  • a tiny bit of Linux-fu to create a normal user

Pain points

  • You *must* create a Keypair before launching a machine, save the .pem file somewhere sensible so you can use it multiple times. 
  • Security Groups can be added / modified to suit *after* launching, so this is less critical. 
  • Note that the user for CentOS is "ec2-user" NOT "centos": 


Use this to logon, remembering to check the actual "user@" name you need (e.g. ec2-user not centos): 
 ssh ubuntu@[ip.number] -i [thekey].pem

OR use a client like MobaXTerm, this is easier than putty on Windows. (Moba can use the .pem directly). 

Saturday, April 12, 2014

That band, that time

It was Live. Throwing Copper.

Also funny:

The Tea Party
Crash Test Dummies

Saturday, January 11, 2014

Hooray for rmatio

Yay: https://github.com/stewid/rmatio

No more grinding to a halt with ridiculous memory over-allocation by that other package that reads .mat. . . . .