Download raw MODIS L1 data and plot in R.
See the code using raster and rgdal on Linux here:
https://github.com/mdsumner/MODISL1B/blob/master/exampleL1.R
Sunday, April 26, 2015
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.
EG:
.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)
https://stat.ethz.ch/R-manual/R-devel/library/methods/html/setMethod.html
Saturday, November 29, 2014
Yet more NetCDF garbage
Why is this always so broken?
Right, 45 days since January 1 1950. I don't think so.
print.nc(nc)
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.
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":
Notes
Use this to logon, remembering to check the actual "user@" name you need (e.g. ec2-user not centos):
OR use a client like MobaXTerm, this is easier than putty on Windows. (Moba can use the .pem directly).
Saturday, April 12, 2014
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. . . . .
No more grinding to a halt with ridiculous memory over-allocation by that other package that reads .mat. . . . .
Subscribe to:
Posts (Atom)