# NOT RUN {
## paste2 examples
v <- rep(list(state.abb[1:8], month.abb[1:8]) , 5)
n <- sample(5:10, 1)
paste(v[1:n]) #odd looking return
paste2(v[1:n])
paste2(v[1:n], sep="|")
paste2(mtcars[1:10,], sep="|")
paste(mtcars[1:10,], sep="|") #odd looking return
paste2(CO2[1:10,], sep="|-|")
## colpaste2df examples
A <- list(
a = c(1, 2, 3),
b = qcv(mpg, hp),
c = c("disp", "am")
)
B <- list(
c(1, 2, 3),
new.col = qcv(mpg, hp),
c("disp", "am")
)
E <- list(
c(1, 2, 3, 4, 5),
qcv(mpg, hp),
c("disp", "am")
)
colpaste2df(head(mtcars), A)
colpaste2df(head(mtcars), B)
colpaste2df(head(mtcars), E)
colpaste2df(head(mtcars), qcv(am, disp, drat), sep ="_", name.sep = "|")
colpaste2df(head(CO2), list(c(1, 2, 3, 4, 5), qcv("conc", "uptake")))
# }
Run the code above in your browser using DataLab