Displaying 1 result from an estimated 1 matches for "xrecycl".
Did you mean:
recycle
2010 Oct 19
1
Implementing R's recycling rule
Hi
I want to use R's recycling rule. At the moment I am using the following:
x <- c(1, 2, 3)
n <- 10
## so using the recycling rules, I would like to get from FUN(x, n)==1
## I am doing:
xRecycled <- rep(x, length.out=n)[n]
This works, but it seems to me that I am missing something really basic here
- is there more straightforward way of doing this?
Cheers,
Rainer
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Ph...