## Examples for vectors
fail.time <- c(10,20)
# set attributes
label(fail.time) <- 'Failure Time'
SASformat(fail.time) <- 'Numeric2'
SASiformat(fail.time) <- 'Numeric2'
# display individual attributes
label(fail.time)
SASformat(fail.time)
SASiformat(fail.time)
# display all attributes
attributes(fail.time)
## SAStype only applies to data frames
df <- data.frame( fail.time, day=c("Mon","Tue") )
label(df) <- "Data frame object"
SAStype(df) <- "USER"
label(df)
SAStype(df)
## Example showing specification of default return value
a <- 70
label(a, default="no label")
# Hmisc packages functions label attributes for annotating tables and plots:
library(Hmisc)
label(fail.time)
describe(fail.time)Run the code above in your browser using DataLab