Skip to content

Commit

Permalink
Added 'optional = TRUE' to column coercion to prevent make.names() fr…
Browse files Browse the repository at this point in the history
…om being used on non-syntactically correct column names prior to export. Bumping to 3.2.2 and submitting to CRAN.
  • Loading branch information
marcschwartz committed Nov 12, 2013
1 parent 310bf5a commit 1aab9fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: WriteXLS
Version: 3.2.1
Date: 2013-08-08
Version: 3.2.2
Date: 2013-11-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
4 changes: 3 additions & 1 deletion R/WriteXLS.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ WriteXLS <- function(x, ExcelFileName = "R.xls", SheetNames = NULL, perl = "perl
# Everything is going to be output via write.table() as character anyway.
# Preserve the rownames from the original DF.LIST, lest they get
# re-named to numbers by default.
# Set 'optional = TRUE' so that make.names() is not used on non-syntactially
# correct column names.
DF.LIST[[i]] <- as.data.frame(lapply(DF.LIST[[i]], as.character),
stringsAsFactors = FALSE,
stringsAsFactors = FALSE, optional = TRUE,
row.names = rownames(DF.LIST[[i]]))

# Pre-pend "WRITEXLS COMMENT:" to each comment so that we can differentiate
Expand Down

0 comments on commit 1aab9fb

Please sign in to comment.