HH (version 3.1-39)

HHscriptnames: Find absolute pathname of a script file for the HH book in the HH package.

Description

Find absolute pathname of a script file for the HH book in the HH package.

Usage

HHscriptnames(chapternumbers=NULL, edition=2)

WindowsPath(x, display=TRUE)

Arguments

chapternumbers

A number or letter name for a chapter in the HH book. For the Second edition, the valid values are from the set c(1:18, LETTERS[1:15]). For the First edition, the valid values are from the set c(1:18). The argument may be a vector of one or more items. The file basename for the corresponding chapter is also accepted. If the chapternumbers is NULL (the default) then the directory containing the script files for the edition is returned.

edition

Either 2 or 1, for the second or first edition of the book Statistical Analysis and Data Display.

x

A vector or matrix of pathnames as generated by R, with "/" as the separator character.

display

Logical. With the default TRUE, the WindowsPath function prints the pathname on the console with a single \ character as the separator suitable for copy and paste into a Windows program and returns its result invisibly. With FALSE the WindowsPath function does not print anything; it returns its result visibly.

Value

For HHscriptnames, matrix of full pathnames to script files in the HH package.

For WindowsPath, a vector or matrix of full pathnames with all "/" characters changed to "\\" (which displays as \ by the cat function). When display is TRUE the function also prints at the console the pathnames with a single \ character suitable for copy and paste into a Windows program.

References

Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R, Second Edition. Springer Texts in Statistics. Springer. ISBN 978-1-4939-2121-8. Heiberger, Richard M. and Holland, Burt (2004). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS, First Edition. Springer Texts in Statistics. Springer. ISBN 0-387-40270-5.

Examples

Run this code
# NOT RUN {
  ## All Operating Systems

  ## Second Edition
  HHscriptnames()
  HHscriptnames(6)
  HHscriptnames("6")
  HHscriptnames("oway")

  HHscriptnames("H")
  HHscriptnames("RApx")

  HHscriptnames(c(1:18, LETTERS[1:15]))

  ## with Windows pathname separators
  WindowsPath(HHscriptnames())
  WindowsPath(HHscriptnames(6))
  WindowsPath(HHscriptnames(6), display=FALSE)
  WindowsPath(HHscriptnames(6:8))
  WindowsPath(HHscriptnames(6:8), display=FALSE)

  ## First Edition
  HHscriptnames(6, edition=1)
# }

Run the code above in your browser using DataCamp Workspace