chain.read {tripEstimation} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
chain.read(filename)
filename |
~~Describe filename here~~ |
~~further notes~~
~~who you are~~
~put references to the literature/web site here ~
##---- 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) }