chain.read {tripEstimation}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

chain.read(filename)

Arguments

filename ~~Describe filename here~~

Note

~~further notes~~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(filename) {
  con <- file(filename,open="rb")
  ## Read the dimensions of the array
  seek(con,0,origin="start",rw="r")
  dm <- readBin(con,"integer",3)
  ## Read the data and set dimensions
  n <- dm[1]*dm[2]*dm[3]
  A <- readBin(con,"double",n)
  if(length(A)!=n) stop("Read Error\n")
  close(con)
  array(A,dm)
  }

[Package tripEstimation version 0.0-24 Index]