[R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

Kevin Wamae KWamae at kemri-wellcome.org
Sun Jul 3 21:13:38 CEST 2016


Thanks Jeff, let me try it on the larger dataset.

Regards
-------------------------------------------------------------------------------
Kevin Wame 
 

On 7/3/16, 10:09 PM, "Jeff Newmiller" <jdnewmil at dcn.davis.ca.us> wrote:

result <- (   result0 
          %>% select( -admin_period1 )
          %>% inner_join( result0 %>% select( ID, admin_period1, end=start )
                       , by = c( ID="ID", admin_period ="admin_period1" )
                        )
          %>% mutate( ddays = end - start )
          )


______________________________________________________________________

This e-mail contains information which is confidential. It is intended only for the use of the named recipient. If you have received this e-mail in error, please let us know by replying to the sender, and immediately delete it from your system.  Please note, that in these circumstances, the use, disclosure, distribution or copying of this information is strictly prohibited. KEMRI-Wellcome Trust Programme cannot accept any responsibility for the  accuracy or completeness of this message as it has been transmitted over a public network. Although the Programme has taken reasonable precautions to ensure no viruses are present in emails, it cannot accept responsibility for any loss or damage arising from the use of the email or attachments. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of KEMRI-Wellcome Trust Programme.
______________________________________________________________________


More information about the R-help mailing list