ARPeters / SurvivalExercises

0 stars 0 forks source link

6.3 test question coding of Time1, Time2, Time3 #3

Open DavidBard opened 9 years ago

DavidBard commented 9 years ago

Just synced new code that solved that problem we experienced Tuesday. The fix we tried in class was correct, but I didn't realize we were replacing a data.frame name (ptProcessChemo) with itself after the looping code (cautionary tale: not best practice to continually write over an old dataset if you ever submit code line by line like I do). Thus, I was applying the correct code to an already corrupted data.frame. I should have created the data.frame anew and then applied the code. Anyway, it works now, although we still can't replicate K&K's table b/c our sample size is different from theirs.

Finally, I rewrite the Time1-Time3 variable code to make it more efficient. Probably worth browsing when you get a second (I commented out the old method).