search for: tfdata

Displaying 2 results from an estimated 2 matches for "tfdata".

Did you mean: fdata
2008 Jun 05
7
Improving data processing efficiency
...imilar to this, so it's somewhat important to up the efficiency of this. Maybe some of you R-fu masters can clue me in? :) I would appreciate any help, tips, tricks, tweaks, you name it! :) ========== my function below =========== fcn_create_nonissuing_match_by_quarterssinceissue = function(tfdata, quarters_since_issue=40) { result = matrix(nrow=0, ncol=ncol(tfdata)) # rbind for matrix is cheaper, so typecast the result to matrix colnames = names(tfdata) quarterends = sort(unique(tfdata$DATE)) for (aquarter in quarterends) { tfdata_quarter = tfdata[tfdata$D...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.