# NOT RUN {
## Checking out burst_() and burst() (which itself calls burst_())
## burst_()
A <- matrix(1:12, ncol = 3)
burst_(A) # no labels given => generate them with default 'V'
burst_(A, labs = LETTERS[1:3]) # use letters
colnames(A) <- LETTERS[1:3] # alternatively, use column names
burst_(A)
## Unnamed list of (some named, some unnamed) valid components
x <- list(A, 1:4, as.data.frame(A))
burst(x, labs = list(group = "G", var = "V", sep = ", "))
burst(x) # the same defaults as above
burst(x, labs = list(sep = " ")) # only changing the separator
## Note: - No group labels are given in 'x' and thus they are constructed
## - The variable names are only constructed if not given
burst(x, labs = list(group = ""))
burst(x, labs = list(group = NULL)) # no group labels
burst(x, labs = list(var = NULL)) # no variable labels
burst(x, labs = list(group = NULL, var = NULL)) # neither one
burst(x, labs = NULL) # similarly, without any labels at all
## Named list
x <- list(mat = A, vec = 1:4, df = as.data.frame(A))
burst(x)
## Note: - The given group labels are used
## - The variable names are only constructed if not given
## Partially named list
x <- list(mat = A, vec = 1:4, as.data.frame(A))
burst(x)
burst(x, labs = list(group = NULL)) # no group labels
burst(x, labs = list(var = NULL)) # no variable labels
burst(x, labs = list(group = NULL, var = NULL)) # neither one
# }
Run the code above in your browser using DataLab