Dear R,

I have a vector, say a = c(1,2,4,5,6,8). Can I generate a vector or array
(2-by-3-by-3) of this form c(1,2,1,2,1,2,4,5,4,5,4,5,6,8,6,8,6,8), in which
every two elements in "a" have been repeated twice?

I am to stupid today and could not figure this simple question out...  Many
many thanks!

Feng


-- 
Feng Li
Department of Statistics
Stockholm University
106 91 Stockholm, Sweden
http://feng.li/

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to