Skip to content

Commit

Permalink
Modified the code to use system.file() rather than path.package() to …
Browse files Browse the repository at this point in the history
…enable the use of WriteXLS() when the package is not loaded. Bumping to v3.4.0.
  • Loading branch information
marcschwartz committed Feb 12, 2014
1 parent 9c746bc commit 9bc3c61
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: WriteXLS
Version: 3.3.1
Date: 2014-01-20
Version: 3.4.0
Date: 2014-02-12
Title: Cross-platform Perl based R function to create Excel 2003 (XLS) and Excel 2007 (XLSX) files
Description: Cross-platform Perl based R function to create Excel 2003 (XLS) and Excel 2007 (XLSX)
files from one or more data frames. Each data frame will be
Expand Down
2 changes: 1 addition & 1 deletion R/WriteXLS.R
Expand Up @@ -128,7 +128,7 @@ WriteXLS <- function(x, ExcelFileName = "R.xls", SheetNames = NULL, perl = "perl
}

# Get path to WriteXLS.pl or WriteXLSX.pl
Perl.Path <- file.path(path.package("WriteXLS"), "Perl")
Perl.Path <- system.file("Perl", package = "WriteXLS")

PerlScript <- ifelse(XLSX, "WriteXLSX.pl", "WriteXLS.pl")

Expand Down
2 changes: 1 addition & 1 deletion R/testPerl.R
Expand Up @@ -14,7 +14,7 @@ testPerl <- function(perl = "perl", verbose = TRUE)
require(WriteXLS)

# Get path to WriteXLS Perl tree
Perl.Path <- file.path(path.package("WriteXLS"), "Perl")
Perl.Path <- system.file("Perl", package = "WriteXLS")

# Check For Perl first
res <- Sys.which(perl)
Expand Down
3 changes: 1 addition & 2 deletions man/WriteXLS.Rd
Expand Up @@ -155,8 +155,7 @@
directory) for additional details on meeting the requirements for Perl and the
additional Perl modules that are necessary for this function to work properly. The file
includes platform specific recommendations for common scenarios. The path to the package
installation directory can be located using \code{path.package("WriteXLS")} after using
\code{library(WriteXLS)}.
installation directory can be located using \code{system.file(package = "WriteXLS")}.

A working installed version of Perl must be present in the current
system searchpath or the exact path of the perl executable
Expand Down
3 changes: 1 addition & 2 deletions man/testPerl.Rd
Expand Up @@ -24,8 +24,7 @@
directory) for additional details on meeting the requirements for Perl and the
additional Perl modules that are necessary for \code{WriteXLS} to work properly. The file
includes platform specific recommendations for common scenarios. The path to the package
installation directory can be located using \code{path.package("WriteXLS")} after using
\code{library(WriteXLS)}.
installation directory can be located using \code{system.file(package = "WriteXLS")}.

A working installed version of Perl must be present in the current
system searchpath or the exact path of the perl executable
Expand Down

0 comments on commit 9bc3c61

Please sign in to comment.