asID | R Documentation |
A block-format
ID is constructed from one or more atomic vectors. If more
than one atomic vector is supplied, then a compound ID is constructed by concatenating
the values together.
asID(id, ..., sep="|")
id |
An atomic vector. |
... |
More atomic vectors. |
sep |
A character to use as a separator when forming a compound ID. |
A valid block format ID, i.e. a factor x
such that is.unsorted(x)
is FALSE
.
Benjamin Rich <mail@benjaminrich.net>
block-format
require(nlme)
data(Phenobarb)
dat <- Phenobarb[1:56,] # First 4 subjects
attach(dat)
is.unsorted(Subject) # TRUE - the original column is NOT sorted
is.unsorted(asID(Subject)) # FALSE - the ID is sorted
all(as.character(Subject) == as.character(asID(Subject))) # TRUE - textually they are the same
cbind(ID=asID(Subject), dat)
detach(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.