[R] List funtion

André Luis Neves andrluis at ualberta.ca
Mon Mar 14 23:20:42 CET 2016


I have the following data:

v1 <- c(8,4,9,12)
v2 <- c(7, 8, 11)
my_list <- list(v1,v2)
rep (my_list,3)

My question is how I can modify my command line to create a list called my_list
containing two copies of the first vector (v1) and three copies of the vector
2 (v2).

The above command line creates 3 copies of both vectors, but I would like
to create 2 copies of one and 3 from the other, and return these results
within my_list object.



	[[alternative HTML version deleted]]

More information about the R-help mailing list