search for: _separately_

Displaying 3 results from an estimated 3 matches for "_separately_".

Did you mean: _separate_
2012 Mar 08
1
binning dates by decade for simulated data
I have a simulated matrix of dates that I generated from a probability function. Each column represents a single iteration. I would like to bin each run _separately_ by decades and dump them into a new matrix where each column is the length of all decades a single run with the number dates binned by decade. I have successfully done this for a single vector of dates, but not for a matrix: "dates" is a vector of observed data representing when certai...
2007 Apr 09
3
do.call vs. lapply for lists
Hi All, I'm trying to understand the difference between do.call and lapply for applying a function to a list. Below is one of the variations of programs (by Marc Schwartz) discussed here recently to select the first and last n observations per group. I've looked in several books, the R FAQ and searched the archives, but I can't find enough to figure out why lapply doesn't do what
2012 Oct 10
3
practical to loop over 2million rows?
New to R and having issues with loops. I am aware that I should use vectorization whenever possible and use the apply functions, however, sometimes a loop seems necessary. I have a data set of 2 million rows and have tried run a couple of loops of varying complexity to test efficiency. If I do a very simple loop such as add every item in a column I get an answer quickly. If I use a nested ifelse