RpadUtil: Rpad utilities

Description Usage Arguments Value Author(s) See Also Examples

Description

Rpad utilities to generate filenames or URL's

Usage

1
2
3
4
5
  RpadEnv()
  RpadURL(filename = "")
  RpadBaseURL(filename = "")
  RpadBaseFile(filename = "")
  RpadIsLocal()

Arguments

filename

the name of a file.

Value

RpadEnv returns the (non-exported) environment “.RpadEnv”. Useful for peeking inside the environment for debugging purposes.

RpadURL returns the URL for the given filename: "./filename" for the local version of Rpad and "/Rpad/server/dd????????/filename" for the server version. Use this to output HTML links for the user.

RpadBaseURL returns the base URL: "filename" for the local version and "/Rpad/filename" for the client-server version. Use this to point the user to data files or other links on the server that is somewhere permanent. (The current R working directory is not permanent in the client-server version.)

RpadBaseFile returns the file name relative to the base R directory: "filename" for the local version and "../../filename" for the client-server version. Use this in R to read in data files or save data files somewhere permanent.

Author(s)

Tom Short, EPRI Solutions, Inc., (tshort@eprisolutions.com)

See Also

Rpad, RpadHTML

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  # make some data
  x <- 1:10
  y2 <- x^3
  save(x, y2, file = RpadBaseFile("testdata.RData"))
  # output a link to the user:
  HTMLon()
  cat("<a href='", RpadBaseURL("testdata.RData"), sep="")
  cat("'>Click</a> to download the test data.")
  unlink(RpadBaseFile("testdata.RData"))

## End(Not run)

Rpad documentation built on May 2, 2019, 4:43 p.m.