swh:1:snp:a4c99a50dc49f82b591f268001b320f8c3ca0041
Tip revision: dc000f2a5f006d137f66716b086025d618bf8306 authored by John M Chambers on 14 July 2008, 00:00:00 UTC
version 1.0-5
version 1.0-5
Tip revision: dc000f2
zzz.R
.hasRSPerl <- FALSE
.getMarsData <- function() {
if(file.exists("mars.csv"))
eval.parent(quote(mars <- read.csv("mars.csv", skip = 5, as.is = TRUE)))
else if(file.exists("Examples/mars.csv"))
eval.parent(quote(mars <- read.csv("Examples/mars.csv", skip = 5, as.is = TRUE)))
else if(file.exists("Examples/mars.Rdata"))
eval.parent(quote(load("Examples/mars.Rdata")))
else
stop("To run this example, you must download or construct the file \"mars.csv\"; see page 176 in the book")
}
.onLoad <- function(libname, pkgname) {
## .hasRSPerl <<- !inherits(tryCatch(loadNamespace("RSPerl"), error = function(e)e), "error")
## if(.hasRSPerl) {
## perlFiles <- readLines(system.file("Perl/perlFiles.txt", package = "SoDA"))
## for(file in perlFiles) {
## ex <- tryCatch(RSPerl::.PerlFile(system.file("Perl", file, package = "SoDA")), error = function(e)e)
## if(inherits(ex, "error"))
## warning("error in running Perl file ", file, "; some Perl subroutines may be missing")
## }
## }
}