Posts

Showing posts from March 14, 2019

R Combine Multiple Rows of DataFrame by creating new columns and union values

1 1 $begingroup$ I have a dataframe in R that looks like this ID APPROVAL_STEP APPROVAL_STATUS APPROVAL_DATE APPROVER 1234 STEP_A APPROVED 23-Jan-2019 John Smith 1234 STEP_B APPROVED 21-Jan-2019 Jane Doe I need it to look like this ID STEP_A_STATUS STEP_A_APPROVAL_DATE STEP_A_APPROVER STEP_B_STATUS STEP_B_APPROVAL_DATE STEP_B_APPROVER 1234 APPROVED 23-Jan-2019 John Smith APPROVED 21-Jan-2019 Jane Doe And of course, with the original dataframe, any of APPROVAL_STATUS, APPROVAL_DATE, or APPROVER can be NA. What is the most elegant way to do this? I know how to do it by looping through the unique IDs, grabbing each row, creating new columns, etc.; but is there any way to do this in a more

How did Vader saving Luke turn him to the good side?

Image
52 7 Couldn't Vader save his son and continue being a Sith Lord? Couldn't he have let Luke go and basically become the Emperor and have the Galaxy to himself? I don't think killing the Emperor to save your son will automatically convert you to the light side. Enlighten me. star-wars darth-vader luke-skywalker return-of-the-jedi share | improve this question edited Jan 6 '16 at 0:55 Wad Cheber 43.6k 37 407 583 asked Aug 6 '15 at 23:46 Christopher Henderson Christo