hh {HH} | R Documentation |
The pathnames in the HH package for all the datasets referenced in
Heiberger and Holland (2004) are given relative to
the options()$HH.ROOT.DIR
directory.
The pathnames for all the executable files in the online
files accompanying Heiberger and Holland (2004) are given relative to
the options()$HHfile.ROOT.DIR
directory.
hh(file) hh.file(file) hh.file.DOS(file, displayForCutAndPaste=TRUE)
file |
Character string giving the pathname of a file.
For hh , the file is in the HH package and the pathname is
relative to options()$HH.ROOT.DIR , the installed
location of the HH package. The option is set automatically when the HH package is loaded by
library or require . This function is normally used to
access
the datasets that come with the HH book and package.
For hh.file and hh.file.DOS , the file is in the HH online
files which need to be independently downloaded from the HH book's
website http://springeronline.com/0-387-40270-5.
The pathname is relative to options()$HHfile.ROOT.DIR ,
which must be set by the user to correspond to the location where the HH
online files are stored on the specific computer. The file argument to these
two functions is the relative pathname exactly as specified in the
captions of figures and tables in Heiberger and Holland (2004).
|
displayForCutAndPaste |
Logical value. When TRUE (the
default) the function hh.file.DOS prints the full pathname with
the "\" file separator convention so it can be picked up and
pasted into an editor that
uses the MS DOS convention for file paths. The function
hh.file.DOS always returns a value
with the full pathname using the "\\" convention so it could be
used as an argument to an R or S-Plus function.
|
The datasets from the Heiberger and Holland (2004) online files are
all given paths relative to the beginning of the hh
directory,
which must be stored as options()$HH.ROOT.DIR
.
If you installed the HH datasets as part of the R or S-Plus HH package, then
option options()$HH.ROOT.DIR
is set automatically.
The code listings in Heiberger and Holland (2004) are
all given paths relative to the beginning of the hh.file
directory,
which must be stored as options()$HHfile.ROOT.DIR
.
Most of the files are designed to be entered at the command line, and
are not designed to be sourced. The primary use of the hh.file
functions
is to display the pathname of the file so it can be opened for use in an editor.
The online files must be independently downloaded from the book's web site
http://springeronline.com/0-387-40270-5.
The HHfile.ROOT.DIR
option must be set by the user to correspond
to the location where the files are stored. The book recommends
options(HHfile.ROOT.DIR="c:/HOME/hh")
in Windows or
options(HHfile.ROOT.DIR="/usr/users/hh")
in Unix.
See Appendix B of Heiberger and Holland (2004) for further details.
The options(HHfile.ROOT.DIR="something"
statement
may need to be modified to match the location of the online files directory on
your machine. If you use more than one computer, you may need a
different value for the HHfile.ROOT.DIR
option on each machine. This
is the only change you will need to make in order to run any of our
software or examples. The hh
, hh.file
, and
hh.file.DOS
functions are not changed.
Fully expanded, absolute pathname for the input filename.
hh
and hh.file
use the separator convention of
the file.path
function. hh.file.DOS
returns the pathname using the
"\\" separator convention. When displayForCutAndPaste
is TRUE
, hh.file.DOS
prints the full pathname with
the "\" convention, so it can be picked up and pasted into an editor that
uses the MS DOS convention for file paths.
Richard M. Heiberger <rmh@temple.edu>
Heiberger, Richard~M. and Holland, Burt (2004b). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS. Springer Texts in Statistics. Springer. ISBN 0-387-40270-5.
hotdog <- read.table(hh("datasets/hotdog.dat"), header=TRUE) ## Not run: ## Define the HHfile.ROOT.DIR option first. ## Define ## options(HHfile.ROOT.DIR="c:/HOME/hh") ## value recommended in Appendix B ## before using the hh.file() functions. hh.file("relativefilepath") hh.file.DOS("relativefilepath") hh.file.DOS("relativefilepath", displayForCutAndPaste=FALSE) ## End(Not run)