{ "contents" : "#Copyright 2012 The Board of Regents of the University of Wisconsin System.\n#Contributors: Jason Shao, James McCurdy, Enhai Xie, Adam G.W. Halstead, \n#Michael H. Whitney, Nathan DiPiazza, Trey K. Sato and Yury V. Bukhman\n#\n#This file is part of GCAT.\n#\n#GCAT is free software: you can redistribute it and/or modify\n#it under the terms of the GNU Lesser General Public License as published by\n#the Free Software Foundation, either version 3 of the License, or\n#(at your option) any later version.\n#\n#GCAT is distributed in the hope that it will be useful,\n#but WITHOUT ANY WARRANTY; without even the implied warranty of\n#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#GNU Lesser General Public License for more details.\n#\n#You should have received a copy of the GNU Lesser General Public License \n#along with GCAT. If not, see .\n\n# Wrapper for sapply to use lapply over an array, conserving the dimensions.\naapply = function(x, FUN,...){\n dim.values = dim(x)\n\tdim.names = dimnames(x)\n\tx = lapply(x, function(x){FUN(x,...)})\n\tdim(x) = dim.values\n\tdimnames(x) = dim.names\n\treturn(x)\n\t}\n\n# A function to manually create an unchecked exception.\nexception = function(class, msg)\n{\n cond <- simpleError(msg)\n class(cond) <- c(class, \"MyException\", class(cond))\n stop(cond)\n}\n", "created" : 1425413273698.000, "dirty" : false, "encoding" : "UTF-8", "folds" : "", "hash" : "3044086993", "id" : "4E20D973", "lastKnownWriteTime" : 1424208963, "path" : "~/Documents/GCAT4/trunk/R/GCAT/R/misc.R", "project_path" : "R/misc.R", "properties" : { }, "source_on_save" : false, "type" : "r_source" }