5237 search results for "git"

Google Maps and ggmap

December 22, 2013
By
Google Maps and ggmap

The ggmap package can be used to access maps from the Google Maps API and there are a number of examples on various statistics related blogs. These include here, here and here. The ggmap package has a function get_map that can download maps from various sources including Google Maps. require(ggmap) The first example specifies the

Read more »

A new Oce coastline

December 22, 2013
By
A new Oce coastline

Part 1: coastal applications The oce package has a world coastline file that is visibly crude on a scale suitable for continental-shelf work.  At the cost of about 1 Mbyte of storage, a candidate for a replacement is a 1:10million scale version downloaded from naturalearthdata.com (full link below). As illustrated below with plots near two oceanographic centres, this candidate provides...

Read more »

Open PHACTS from R

December 21, 2013
By

Nothing much going to say about it, and just to report some progress:

Read more »

Analysis of experimental data with R

December 21, 2013
By

It's been a while since my last video, with good reason: I started a full time job as a senior statistician about 2 months ago! Not that I spend my entire day coding in R, but I wouldn't be nearly as useful if I didn't know how to use it. Anyway, whil...

Read more »

Moon phase calculation

December 21, 2013
By
Moon phase calculation

The illuminated fraction of the moon can be calculated with moonAngle() in the oce package, as illustrated graphically and in R code below. 1 2 3 4 5 6 7 library(oce) par(mar=c(3, 3, 1, 1), mgp=c(2, 0.7, 0)) # tighten margins t <- as.POSIXct("2013-12-1", tz="UTC") + seq(0, 28*24*3600, 3600) f <- moonAngle(t=t, longitude=-63.6, ...

Read more »

Solstice sunrise-sunset

December 21, 2013
By
Solstice sunrise-sunset

Introduction The sunAngle() function in the oce package provides a handy way to determine sunrise/sunset azimuth angles, and this is used to find alignments for the winter solstice in Halifax, NS. Methods First, set up the problem; these may be the only lines that need editing for other places or times. 1 2 3 t <- as.POSIXct("2013-12-21 17:11:00", tz="UTC") # winter solstice xy <- list(x=-63.60, y=44.65) ...

Read more »

Day length calculation

December 21, 2013
By
Day length calculation

The winter solstice has been on many minds lately. The days are about to start getting longer … but just how fast will they do that? This post provides R that calculates and graphs day length and its variation, using uniroot() to find sunrises and sunsets as indicated by solar altitude that is calculated with sunAngle() in the oce...

Read more »

24 Days of R: Day 20

December 20, 2013
By
24 Days of R: Day 20

Some time ago, I was doing some analysis and trying to determine whether or not there was a predictive variable for a binomial response. I ran logistic regressions for about half a dozen variables in different combinations and nothing showed a fit of any significance. Well, almost nothing. I had measured the response against date.

Read more »

New RcppEigen release 0.3.2.0.1 — and a new maintainer

December 19, 2013
By

In a recent email to the Rcpp and lme4 mailing lists, Doug Bates announced that was turning away from R, Rcpp, lme4 and hence also RcppEigen for which he had been both the primary author and maintainer. This is huge loss for the R community. I have...

Read more »

Converting graphs in pdf files to csv format

December 19, 2013
By
Converting graphs in pdf files to csv format

Looking at a graph displayed as part of a pdf document is so tantalizing; I want that data as a csv! One way to get the data is to email the author(s) and ask for it. I do this regularly and sometimes get the apologetic reply that the data is confidential. But I can see

Read more »