Re: [R] replacing values of rows with identical row names in two dataframes

2016-05-06 Thread Jeff Newmiller
Please use reply-all to keep the mailing list in the loop, and use plain text rather than HTML to make sure the your message gets through uncorrupted. ?merge ?lapply # untested # align rows by date df1a <- merge( df1, df2, by="date", all.x=TRUE ) # like-named columns have .x or .y appended df1

Re: [R] replacing values of rows with identical row names in two dataframes

2016-05-06 Thread Jeff Newmiller
Why would you want to use a for loop? Is this homework? -- Sent from my phone. Please excuse my brevity. On May 6, 2016 4:15:09 PM PDT, Saba Sehrish via R-help wrote: > > >Hi > >I have two dataframes(df1, df2) with equal number of columns (1566) but >lesser rows in df2 (2772 in df1 and 40 in

[R] replacing values of rows with identical row names in two dataframes

2016-05-06 Thread Saba Sehrish via R-help
Hi I have two dataframes(df1, df2) with equal number of columns (1566) but lesser rows in df2 (2772 in df1 and 40 in df2). Row names are identical in both dataframes (date). I want to replace NAs of df1 with the values of df2 for all those rows having identical row names (date) but without