search for: preexisiting

Displaying 1 result from an estimated 1 matches for "preexisiting".

2006 Aug 30
4
Create a vector from another vector
...larger than x[1] even though it sums to 19. Ideally, the function would take as input the original vector, x, and the number that the new vector would sum to. In this example, the vector could sum to any number 5 through 20. For example, myFun <- function(x, sumto) ... details ... Is there a preexisiting function that would already do this? I have spent too much (unsuccessful) time trying to write a function of my own but can't seem to get this to work properly. Any hints would be greatly appreciated. Harold [[alternative HTML version deleted]]