blk.sequentialID | R Documentation |
A new ID that numbers individuals sequentially starting at 1 is generated from an existing ID.
blk.sequentialID(id)
id |
A valid |
An ID is a factor that designates blocks in a
block-format
data set. This function takes an
existing ID and generates a new one that preserves the same
structure but is numeric and sequential starting at 1.
Thus, this is a means of transforming an ID that is desciptive and
alphanumeric into one that can be used with NONMEM.
A valid block-format
ID.
Benjamin Rich <mail@benjaminrich.net>
block-format
require(nlme)
data(Phenobarb)
dat <- Phenobarb[1:56,] # First 4 subjects
attach(dat)
cbind(dat, newID=blk.sequentialID(asID(Subject)))
detach(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.