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

View source: R/HHscriptnames.R

HHscriptnamesR Documentation

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.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

References

Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R. Second Edition. Springer-Verlag, New York. https://link.springer.com/book/10.1007/978-1-4939-2122-5

Examples

## 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)

## End(Not run)

HH documentation built on May 29, 2024, 6:24 a.m.

Related to HHscriptnames in HH...