from rstan package
flatnames(names, dims, col_major = FALSE)
A vector of characters
A positive integer
A logical
A vector of characters
# NOT RUN {
# flatnames(c("a","b"),3)
# [1] "a[1]" "a[2]" "a[3]" "b[1]" "b[2]" "b[3]"
# }
Run the code above in your browser using DataLab