R: Read a List of Matrices from a File for Repeated Times to...

read.surv {rmutil} | R Documentation

## Read a List of Matrices from a File for Repeated Times to Events

### Description

`read.surv` reads sets of lines of data from a file. Each set may contain a series of duration times followed by a censor indicator for the last value (`all=FALSE`) or a series of pairs of times followed by their censor indicators (`all=TRUE`).

### Usage

    read.surv(file="", skip=0, nlines=1, cumulative=TRUE, all=TRUE)

### Arguments

`file` | Name of the file to read
`skip` | Number of lines to skip at the beginning of the file
`nlines` | Number of lines in each series of duration times
`cumulative` | If TRUE, the times are cumulative and differences are taken to obtain times between events. Otherwise, the times are used unchanged.
`all` | If TRUE, all times have accompanying censor indicators; otherwise, only the last one does.

### Value

A list containing a list of vectors with the series of times and a vector of censor indicators for the last time of each series is returned.

### Author(s)

J.K. Lindsey

### See Also

`lvna`, `read.list`, `read.rep`, `restovec`, `rmna`

### Examples

    ## Not run: y <- read.surv("test.dat")

[Package rmutil version 1.1.3 Index]