<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">This is the mailing list for data.table package. Please ask again on the r-help list.</div> <br> <div id="bloop_sign_1457179407551937024" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Arun</div></div> <br><p class="airmail_on">On 5 March 2016 at 13:00:56, Alice Cooper (<a href="mailto:efresbr@gmail.com">efresbr@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hello,<br>I need help with some code.<br>Basically, I have experiments results which I need to process. <br><br>I have 2 dataframes with 3 columns<br>Df1 <- data.frame (Date, Cellline, Data)<br>Df2 <- data.frame (Date, Cellline, Control)<br><br>I want for the entire column Df1-Data to be subtracted by the corresponding<br>Df2-Controls which Columns Date and Cellline coincide through some type of<br>loop.<br>So the structure is:<br><br>Df1$Data <- Df1$Data – Df2$Control [when (Df1$Celline == Df2$Celline &<br>Df1$Date == Df2$Date])<br><br>Each Control has several dozen Data values which are linked through Data and<br>Celline. Of course, the data.frames are of different dimensions. <br><br>I’ve tried several approaches and failed miserably.<br>Any suggestions?<br><br>Thank you in advance for any.<br><br><br><br><br>--<br>View this message in context: http://r.789695.n4.nabble.com/Help-with-a-loop-search-function-tp4718273.html<br>Sent from the datatable-help mailing list archive at Nabble.com.<br>_______________________________________________<br>datatable-help mailing list<br>datatable-help@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</div></div></span></blockquote></body></html>