language: R
license: GPL 2

Code for Snippet:

aplDecode<-function(cell,dims) {
if (any(cell>dims) || any(cell<1)) stop("No such cell")
aplEncode<-function(ind,dims) {
n<-length(dims); cell<-integer(n)
if ((ind < 1) || (ind > prod(dims))) stop("No such cell")
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 585
Date Added: 2013-03-07 16:53:57
Last Modified: 2013-04-17 22:12:19

Web Analytics