search for: printdonor

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

Did you mean: printcolor
2006 May 04
0
Eliminating For Loop in Comparison and Replacement
...part of a larger Monte Carlo simulation involving the reliability of equipment and customers. for (i in 1:length(Fails$CustID)){ j<-1 while (j <= length(Refurb$CustID)){ if (Refurb$FailTimes[j] < Fails$FailTimes[i]){ CustReceiver<-c(CustReceiver,Fails$CustID[i]) PrintDonor<-c(PrintDonor,Refurb$EquipID[j]) Refurb<-Refurb[j!=1:length(Refurb$EquipID),] j<-1 } j<-j+1 } } What this loop does is compare the Fails dataframe to the Refurb dataframe and if the fail time of one of the Refurb items is less than the fa...