Commit 711d4ccb authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 3042.84

parent d1f25f24
2013-03-15 wuertz
* DESCRIPTION: Updated version number.
2013-03-15 chalabi
* DESCRIPTION: Updated maintainer field, R version and version
......
Package: fImport
Version: 3000.82
Revision: 5455
Date: 2013-03-15
Title: Rmetrics - Economic and Financial Data Import
Author: Diethelm Wuertz and many others
Depends: R (>= 2.13.0), methods, timeDate, timeSeries
Title: Rmetrics - Importing Economic and Financial Data
Date: 2017-11-12
Version: 3042.84
Author: Diethelm Wuertz [aut],
Tobias Setz [cre],
Yohan Chalabi [ctb]
Maintainer: Tobias Setz <tobias.setz@live.com>
Description: Provides a collection of utility functions
to download and manage data sets from the Internet or from other
sources.
Depends: R (>= 2.15.1), timeDate, timeSeries
Imports: methods, utils
Suggests: RUnit
Maintainer: Yohan Chalabi <yohan.chalabi@rmetrics.org>
Description: Environment for teaching "Financial Engineering and
Computational Finance"
Note: Several parts are still preliminary and may be changed in the
future. this typically includes function and argument names, as
well as defaults for arguments and return values.
LazyData: yes
License: GPL (>= 2)
URL: http://www.rmetrics.org
Packaged: 2013-03-15 12:46:58 UTC; yankee
URL: https://www.rmetrics.org
NeedsCompilation: no
Packaged: 2017-11-16 17:28:28 UTC; Tobias Setz
Repository: CRAN
Date/Publication: 2013-03-15 14:54:11
Date/Publication: 2017-11-16 21:50:07 UTC
22709eaf431b727b40990525a60880ae *ChangeLog
2a5772be068edbee1f23387ff4cf5899 *DESCRIPTION
572c0bc4ab8114fe4564047da45f7704 *NAMESPACE
4943edaa3e07e213da1d4c4c2da250e4 *R/builtin-xlsGdata.R
ed967b1e07f635b23aee8e7903238314 *R/class-fWEBDATA.R
0dbf7b63f8b2e43bb2112051b09215a0 *R/import-fred.R
ddaeec726cb8aff6bde3bcd8bfbc1527 *R/import-oanda.R
f3b9a04d85d58852b66fedcdb943620d *R/import-yahoo.R
11f4e6a4fd1c685a1ac9306ce34e0ff8 *R/methods-show.R
5baefb04ff7e29ae4471721ab3516725 *R/read-download.R
c0682a94d00ee6e28919eed15c855f0a *R/read-lines.R
a2a223c51b49ca03c633c4f8c8c42384 *R/read-links.R
1fd90792d71f61eb71dfe8109572b629 *R/read-lynx.R
1f798e7678b97a660886a70a11a6f1f0 *R/read-split.R
741b8c0c29e515f559e312b8a1d5e207 *R/read-w3m.R
822d2b5aadb43ce2c8fe9e7f980f786f *R/read-xls.R
eeea1f3173a8922eb62c6b40c3d0a364 *R/utils-yahoo.R
4e1bef3c6ce229ac6f7e6719c16a1960 *R/zzz.R
eb67e9393d7b73a41874d38d88598379 *data/amexListing.csv.gz
ffb69a6101e6aeb8bc9c656037d7a5f9 *data/h15Listing.csv.gz
2ee3619a6ce1fa8543e4c4829162c6fa *data/nasdaqListing.csv.gz
94b8a57b94cb38e94b01ce3cd3c7f382 *data/nyseListing.csv.gz
c2811a28fad4bbe884d39897a563a91d *data/oandaListing.csv.gz
f6167196c2061461034160c4d5493a5e *data/stoxxListing.csv.gz
16fc9d7e85d555d07b975c3ed380a167 *data/swxListing.csv.gz
6042b9c5e5bec3ecc1b6959cd2858b64 *inst/COPYRIGHT.html
ac75910053903467dfeef65a5e8aee81 *inst/THANKS
f8109a53128f172d5199998a0774a982 *inst/perl/IO/AtomicFile.pm
cb8bf30e73340e4eba233c51dd8b2f34 *inst/perl/IO/InnerFile.pm
5886a657d7e49b133d23f7b2dbe30c21 *inst/perl/IO/Lines.pm
6be2f7b5899b83a897025caf868e2b8b *inst/perl/IO/Scalar.pm
aaa5b626b1467f10703f741377f48f45 *inst/perl/IO/Scalar.pm.html
520d9d810f5758f247727f8f2730d71e *inst/perl/IO/ScalarArray.pm
3e242abfa789aff62181bf299d9089e8 *inst/perl/IO/Stringy.pm
546777a943a0b90882709f2b10d317d1 *inst/perl/IO/Wrap.pm
3669bd450d4fc4e6b883fcd7ad604caf *inst/perl/IO/WrapTie.pm
ac02eb7b8f5a465ddfbffe3d6ae8e970 *inst/perl/OLE/Storage_Lite.pm
1f654a86fcfa94c11a7ca0727cb80a6b *inst/perl/Spreadsheet/ParseExcel.pm
5b9c925cbfd90af04f94bf79650d6c3d *inst/perl/Spreadsheet/ParseExcel/Dump.pm
a7b0e77e315ed0af93cf1eac2947bdf2 *inst/perl/Spreadsheet/ParseExcel/FmtDefault.pm
c290c305fc2c72319a7c5a03c9374413 *inst/perl/Spreadsheet/ParseExcel/FmtJapan.pm
022ec2be7c1a29b53b70e9b07e8ca1ca *inst/perl/Spreadsheet/ParseExcel/FmtJapan2.pm
15d505b239530e813c43a47994d7d1b6 *inst/perl/Spreadsheet/ParseExcel/FmtUnicode.pm
b4d38ac2cf0d31024032f6f26f312d91 *inst/perl/Spreadsheet/ParseExcel/SaveParser.pm
86f47d356ad68219465e21d9b283733f *inst/perl/Spreadsheet/ParseExcel/Utility.pm
c4341957b89bad277d02b806190398de *inst/perl/html-parser/html-ascii.pl
100863c8c612d7fe7a2538f0ee746d0f *inst/perl/html-parser/html-parser.html
dad0620a0e3d01b1c288528977cba43b *inst/perl/html-parser/html-to-ascii.pl
e3f98170141a84a3e33df38e24a5de0c *inst/perl/html-parser/html-to-rfc.pl
cabe6a21afaf40fc91875b4fae9fc1be *inst/perl/html-parser/parse-html.pl
04a1075156469440e0c963ca59c96ac7 *inst/perl/html-parser/rfc.pl
d2a8d2a6640daf41a2b1e1a5df9aa1bb *inst/perl/html-parser/tformat.pl
b6b727ff08caecfaddf318ca5c2493fd *inst/perl/xls2csv.pl
9bcce6a39d261460a19e94c9bfc098cd *man/00fImport-package.Rd
a63c89b8305a50f46451d3a2f8876cd5 *man/class-fWEBDATA.Rd
64d29a4ffc25b9d8d85f367b60739458 *man/import-fred.Rd
2c89294b2b051272583a180c609309fa *man/import-oanda.Rd
dfc610ee77657b9b59719300cc99c6d7 *man/import-yahoo.Rd
fcb25fbcbbfd5499a94ebe3f236bcf5f *ChangeLog
81b8fbbdd438446b80cef341762c57a3 *DESCRIPTION
5ea171770d61f38b1c7ee6a726b62ba4 *NAMESPACE
9fb5f1bd7663bba42fbf02739d3b2562 *NEWS
3d4e399e4839c80820502b1665443a56 *R/class-fWEBDATA.R
aee1aed302b04b5db15794c4aa782e78 *R/import-fred.R
a21cdac9f417754f3b7e5275647c5b5d *R/methods-show.R
ce96382e27aa2195df1c4d542ee83c60 *R/read-lines.R
38a9022acadd1f79da81e1048910e5b9 *R/read-links.R
b0558f82b124f37fc535bf7dd5abc231 *R/read-lynx.R
1195cf1567cd1b15c2972925cd1cef8f *R/read-w3m.R
339e19e5795c8fcd95defe017a486773 *R/utils-download.R
41911843e69ca95e0df5d932c6f586f6 *R/utils-split.R
3f285adc43c177ff837f67cc67b37400 *R/zzz.R
2d246c14751403494d4fa2babc604953 *data/amexListing.csv
92c87520a2e373ffb6f887f79e908147 *data/h15Listing.csv
bf0564338d2ccb8bf8921907e6996fea *data/nasdaqListing.csv
a859f418c9db543e407fe23f40a1fb7a *data/nyseListing.csv
df32cf07bc962e920cb6b8726696b2e7 *data/oandaListing.csv
31dce9b557f7fa922347ec455e928113 *data/stoxxListing.csv
9c9781a5f5b4304a8c0a73f75a820c64 *data/swxListing.csv
ed967b1e07f635b23aee8e7903238314 *inst/obsolete/class-fWEBDATA.R
cc4f44d2123d36f17af64ae048582a41 *inst/obsolete/import-oanda-loop.R
a43ee682faba5d0ad50f6240b473eb16 *inst/obsolete/import-oanda.R
aeef81a916035a3ca1bc15971cba4b82 *inst/obsolete/import-oanda.Rd
dfd9d1d17ca46ca47963fffd4e60ecd2 *inst/obsolete/import-yahoo.R
62ba802bf8cecee58c00354d9a594113 *inst/obsolete/import-yahoo.Rd
bfed86b132c77f1f2cd7e3edee857795 *inst/obsolete/utils-yahoo.R
22aa80553ad0389d779d690853fb0544 *inst/obsolete/utils-yahooBriefing.Rd
91e4a7d24ee19419502ce73e1297253a *inst/obsolete/utils-yahooKeystats.Rd
e6995e818c304fc9533bf9c632643a2c *man/00fImport-package.Rd
223867d5b934f9936868fff3e3730b2b *man/class-fWEBDATA.Rd
bfcfc6ff89286e1d60d48e9a1a5499b4 *man/import-fred.Rd
fe6a375d6c5413bc5469741f06452db6 *man/methods-show.Rd
e325f3ec995deb13ac213ab4b44dec70 *man/provider-listings.Rd
bd16550c8a030bc258981ab2e2af6244 *man/read-download.Rd
9cb21e1796b0455c2715351239b7e084 *man/provider-listings.Rd
33106f53a3ff7d47d6ea2b175eed8fce *man/read-lines.Rd
12d10df68a7b9470d4f29e783277b4f5 *man/read-links.Rd
71955874ff4b00b44e5b27e3e0e86d6c *man/read-lynx.Rd
9de6256e4bec4805cb4b626a1dbdbe60 *man/read-split.Rd
20c3c2c3e34105c554b70d266231355b *man/read-w3m.Rd
fc1901177e700d181c41c7c69422e402 *man/read-xls.Rd
d106cbf104f1fbbfcb884cc44d663a2e *man/utils-yahooBriefing.Rd
1d07ef9438d49a70fde8d3fadf9c956a *man/utils-yahooKeystats.Rd
a4d7bff296b3b05dee62dd592863c853 *man/read-links.Rd
340932e5f67321d0c79c6ea4290fb295 *man/read-lynx.Rd
37a5d1e6c019be9f4041f432b4c5ba3a *man/read-w3m.Rd
16195a0adfe519032f93fbdd94a4eeaf *man/utils-download.Rd
21d6951ccd32c8b290dddfacdb0e3272 *man/utils-split.Rd
################################################
## import name space
## fImport
################################################
import("methods")
import("timeDate")
import("timeSeries")
################################################
## S4 classes
## import name space
################################################
import("timeDate")
import("timeSeries")
exportClasses("fWEBDATA" )
exportMethods("$",
"$<-",
"+",
"-",
"[",
"[<-",
"cummax",
"cummin",
"cumprod",
"cumsum",
"dim",
"dim<-",
"dimnames",
"dimnames<-",
"is.na",
"names",
"names<-",
"show" )
################################################
## S3 classes
################################################
importFrom("methods", new)
importFrom("utils", download.file, write.table)
################################################
## functions
################################################
export(
".dQuote.ascii",
".getYahooData",
".read.xls",
".xls2csv",
"charvecSplit",
"composeURL",
"dataSplit",
"fredImport",
"fredSeries",
"indexGrep",
"oandaImport",
"oandaSeries",
"read.lines",
"read.links",
"read.lynx",
"read.w3m",
"read.xls",
"yahooBriefing",
"yahooImport",
"yahooKeystats",
"yahooSeries" )
exportPattern(".")
NEWS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
# .dQuote.ascii Creates a temporary function to quote a string
# .xls2csv Converts a xls file into acsv file
# .read.xls reads low level a xls files
################################################################################
# Package: gdata
# Title: Various R programming tools for data manipulation
# Description: Various R programming tools for data manipulation
# Version: 2.4.2
# Date: 2008-05-12
# Author: Gregory R. Warnes and Gregor Gorjanc.
# Maintainer: Gregory Warnes <gregory_warnes@urmc.rochester.edu>
# License: GPL-2
.dQuote.ascii <-
function(x)
{
# Borrowed from contributed Package 'gdata'
# FUNCTION:
# Creating a temporary function to quote the string
paste('"', x,'"', sep = '')
}
#-------------------------------------------------------------------------------
.xls2csv <-
function(xls, sheet = 1, verbose = FALSE, ..., perl = "perl")
{
# Borrowed from contributed Package 'gdata'
# FUNCTION:
# Directories:
package.dir <- path.package('fImport')
perl.dir <- file.path(package.dir,'perl')
# Files:
tf <- NULL
if (substring(xls, 1, 7) == "http://") {
tf <- paste(tempfile(), "xls", sep = ".")
if(verbose)
cat("Downloading",
.dQuote.ascii(xls), " to ",
.dQuote.ascii(tf), "...\n")
else
cat("Downloading...\n")
download.file(xls, tf, mode = "wb")
cat("Done.\n")
xls <- tf
}
if(file.access(xls, 4)!=0)
stop("Unable to read xls file '", xls, "'." )
.xls2csv <- file.path(perl.dir,'xls2csv.pl')
csv <- paste(tempfile(), "csv", sep = ".")
# Execution command
cmd <- paste(perl, .xls2csv, .dQuote.ascii(xls), .dQuote.ascii(csv),
sheet, sep=" ")
if(verbose)
{
cat("\n")
cat("Converting xls file\n")
cat(" ", .dQuote.ascii(xls), "\n")
cat("to csv file \n")
cat(" ", .dQuote.ascii(csv), "\n")
cat("... \n\n")
}
else
cat("Converting xls file to csv file... ")
# Do the translation
if(verbose) cat("Executing ", cmd, "... \n\n")
results <- system(cmd, intern=!verbose)
if (verbose) cat("Done.\n\n")
if(file.access(csv, 4)!=0)
stop("Unable to read translated csv file '", csv, "'." )
cat("Done.\n")
# Prepare for cleanup now, in case of error reading file
file(csv)
}
# ------------------------------------------------------------------------------
.read.xls <-
function(xls, sheet = 1, verbose = FALSE, pattern, ..., perl = "perl")
{
# Borrowed from contributed Package 'gdata'
# FUNCTION:
# Connection:
con <- tfn <- NULL
on.exit({
if (inherits(con, "connection") && isOpen(con)) close(con)
if (file.exists(tfn)) file.remove(tfn)})
# Expand file path, translating ~ to user's home directory, etc.
xls <- path.expand(xls)
# Translate from xls to csv format (returns csv file name)
con <- .xls2csv(xls, sheet, verbose=verbose, ..., perl = perl)
# Load the csv file
open(con)
tfn <- summary(con)$description
if (missing(pattern)) {
if(verbose)
cat("Reading csv file ", .dQuote.ascii(tfn), "...\n")
else
cat("Reading csv file... ")
retval <- read.csv(con, ...)
cat("Done.\n")
} else {
cat("Searching for lines containing pattern ", pattern, "... ")
idx <- grep(pattern, readLines(con))
if (length(idx) == 0) {
warning("pattern not found")
return(NULL)
}
cat("Done.\n")
seek(con, 0)
if(verbose)
cat("Reading csv file ", .dQuote.ascii(tfn), "...\n")
else
cat("Reading csv file... ")
retval <- read.csv(con, skip = idx[1]-1, ...)
cat("Done.\n")
}
# Return Value:
retval
}
################################################################################
......@@ -14,10 +14,6 @@
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
......
This diff is collapsed.
......@@ -14,10 +14,6 @@
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
......
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received A copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
# read.lines A synonyme function call to readLines
################################################################################
# wrapper function of read.lines to have consistent function names as
# described in ebook.
read.lines <- function(con = stdin(), n = -1L, ok = TRUE, warn = FALSE,
encoding = "unknown")
readLines(con = con, n = n, ok = ok, warn = warn, encoding = encoding)
################################################################################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received A copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
################################################################################
# FUNCTION: DESCRIPTION:
# read.lines A synonyme function call to readLines
################################################################################
# wrapper function of read.lines to have consistent function names as
# described in ebook.
read.lines <-
function(con = stdin(), n = -1L, ok = TRUE, warn = FALSE,
encoding = "unknown")
{
readLines(con = con, n = n, ok = ok, warn = warn, encoding = encoding)
}
################################################################################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received A copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
# read.lynx Uses the links browser to read from a web page
################################################################################
read.links <-
function (url, intern = TRUE, bin = NULL, pipe = FALSE, ...)
{
# A function implemented by Diethelm Wuertz and Yohan Chalabi
# Description:
# Uses the links browser to read from a web page
# Example:
# read.lynx("www.rmetrics.org", bin = "C:/cygwin/bin/lynx.exe")
# FUNCTION:
# Paste Arguments:
ldots <- list(...)
args <- if (length(ldots))
paste(paste("-", names(ldots), "=", sep = ""), ldots,
sep = "", collapse = " ")
else ""
cmd <- if (is.null(bin))
paste("links", args, "-dump", shQuote(url))
else paste(bin, args, "-dump", shQuote(url))
ans <- if (pipe)
pipe(cmd)
else
system(cmd, intern = intern)
ans
}
################################################################################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received A copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
###############################################################################
# FUNCTION: DESCRIPTION:
# read.links Uses the links browser to read from a web page
###############################################################################
read.links <-
function (url, intern = TRUE, bin = NULL, pipe = FALSE, ...)
{
# A function implemented by Diethelm Wuertz and Yohan Chalabi
# Description:
# Uses the links browser to read from a web page
# Example:
# read.lynx("www.rmetrics.org", bin = "C:/cygwin/bin/lynx.exe")
# FUNCTION:
# Paste Arguments:
ldots <- list(...)
args <- if (length(ldots))
paste(paste("-", names(ldots), "=", sep = ""), ldots,
sep = "", collapse = " ")
else ""
cmd <- if (is.null(bin))
paste("links", args, "-dump", shQuote(url))
else paste(bin, args, "-dump", shQuote(url))
ans <- if (pipe)
pipe(cmd)
else
system(cmd, intern = intern)
ans
}
################################################################################
......@@ -14,15 +14,11 @@
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
###############################################################################
# FUNCTION: DESCRIPTION:
# read.lynx Uses the lynx browser to read from a web page
################################################################################
###############################################################################
read.lynx <-
......
......@@ -14,19 +14,15 @@
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
###############################################################################
# FUNCTION: DESCRIPTION:
# read.w3m Uses the w3m browser to read from a web page
################################################################################
###############################################################################
read.w3m <-
function(url, intern = TRUE, bin = NULL, pipe = FALSE, ...)
function(url, intern = TRUE, bin = NULL, pipe = FALSE, ...)
{
# A function implemented by Diethelm Wuertz and Yohan Chalabi
......
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received A copy of the GNU Library General
# Public License along with this library; if not, write to the
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
# Copyrights (C) for this R-port:
# 1999 - 2012 Diethelm Wuertz, Zurich, <wuertz@itp.phys.ethz.ch>
# 2009 - 2012 Rmetrics Association, Zurich, www.rmetrics.org
################################################################################
# FUNCTION: DESCRIPTION:
# composeURL Compose URL from partial strings
# indexGrep Greps Lines given a pattern
################################################################################
composeURL <-
function(..., prefix = "http://")
{
# A function implemented by Diethelm Wuertz
# Description:
# Compose URL from partial strings
# FUNCTION:
# Return Value:
paste(prefix, ..., sep = "")
}
# ------------------------------------------------------------------------------
indexGrep <-
function(pattern, x, ...)
{
# A function implemented by Diethelm Wuertz
# Description:
# Greps Lines given a pattern
# FUNCTION:
# Return Value:
x[grep(pattern, x, ...)]
}
################################################################################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the