https://github.com/cran/SoDA
Revision abb11e53fd1d4cd6d80e90fa5a000adda65fe209 authored by jmc on 14 July 2008, 00:00:00 UTC, committed by Gabor Csardi on 14 July 2008, 00:00:00 UTC
1 parent 9e5b9bb
Tip revision: abb11e53fd1d4cd6d80e90fa5a000adda65fe209 authored by jmc on 14 July 2008, 00:00:00 UTC
version 1.0-3
version 1.0-3
Tip revision: abb11e5
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) {
if(tryRequire("RSPerl")) {
.hasRSPerl <<- TRUE
perlFiles <- readLines(system.file("Perl/perlFiles.txt", package = "SoDA"))
for(file in perlFiles) {
ex <- try(.PerlFile(system.file("Perl", file, package = "SoDA")))
if(inherits(ex, "try-error"))
warning("error in running Perl file ", file, "; some Perl subroutines may be missing")
}
}
}
Computing file changes ...