[R-gregmisc-users] SF.net SVN: r-gregmisc:[1423] trunk/gdata
Brought to you by:
warnes
From: <ggr...@us...> - 2010-02-21 17:12:37
|
Revision: 1423 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1423&view=rev Author: ggrothendieck2 Date: 2010-02-21 17:12:30 +0000 (Sun, 21 Feb 2010) Log Message: ----------- isOpen problems fixed (isOpen must have changed in R since this worked in earlier versions). Also nba.xls link in read.xls.Rd disappeared. Replaced with similar link. Modified Paths: -------------- trunk/gdata/R/read.xls.R trunk/gdata/man/read.xls.Rd Modified: trunk/gdata/R/read.xls.R =================================================================== --- trunk/gdata/R/read.xls.R 2010-02-20 11:32:43 UTC (rev 1422) +++ trunk/gdata/R/read.xls.R 2010-02-21 17:12:30 UTC (rev 1423) @@ -5,7 +5,11 @@ { con <- tfn <- NULL on.exit({ - if (inherits(con, "connection") && isOpen(con)) close(con) + err <- FALSE + if (inherits(con, "connection")) { + tryCatch(op <- isOpen(con), error = function(x) err <<- TRUE) + if (!err && op) close(con) + } if (file.exists(tfn)) file.remove(tfn) }) Modified: trunk/gdata/man/read.xls.Rd =================================================================== --- trunk/gdata/man/read.xls.Rd 2010-02-20 11:32:43 UTC (rev 1422) +++ trunk/gdata/man/read.xls.Rd 2010-02-21 17:12:30 UTC (rev 1423) @@ -86,7 +86,7 @@ iris <- read.xls(xlsfile, perl="/usr/bin/perl") # read xls file from net - nba.url <- "http://lcb1.uoregon.edu/sergiok/DSC330HSP04/week5/NBA.xls" + nba.url <- "http://mgtclass.mgt.unm.edu/Bose/Excel/Tutorial.05/Cases/NBA.xls" nba <- read.xls(nba.url) # read xls file ignoring all lines prior to first containing State This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |