powered by
Print the chosen few (the first and the last) items of a long vector
chosenFew(vec, start = 3, end = 1, collapse = ",")
A vector of characters or other types that can be cast into characters
Integer, how many elements at the start shall be printed
Integer, how many elements at the end shall be printed
Character used to separate elements
A character string ready to be printed
# NOT RUN { lvec1 <- 1:100 chosenFew(lvec1) chosenFew(lvec1, start=5, end=3) svec <- 1:8 chosenFew(svec) chosenFew(svec, start=5, end=4) # }
Run the code above in your browser using DataLab