<div dir="ltr">Hi,<div><br></div><div>that's very helpful. My problem, however, happens also when loading .RData created in 3.0.1 (or 3.0.2) into R 3.1 </div><div><br></div><div>So it is not related to serialization issues I guess. I noticed that it happens with tables containing NA values. I suspect R3.1 treats NA in a different way internally, because without missing values all is fine! I'll make a reproducible example this weekend when I'm back from my holiday. In the meantime sorry for leaving this thread like this.</div>
<div><br></div><div>Thank you a lot</div><div><br></div><div>Michele</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 April 2014 11:09, Michael Nelson [via R] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4689382&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
See Simon Urbanek's answer here (and Matt Dowle's Comments)
<br><a href="http://stackoverflow.com/questions/15195220/assigning-by-reference-into-loaded-package-datasets/15208059#15208059" rel="nofollow" link="external" target="_blank">http://stackoverflow.com/questions/15195220/assigning-by-reference-into-loaded-package-datasets/15208059#15208059</a><br>
________________________________________
<br></div>From: <a href="http://user/SendEmail.jtp?type=node&node=4689370&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a> [<a href="http://user/SendEmail.jtp?type=node&node=4689370&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>] on behalf of Steve Lianoglou [<a href="http://user/SendEmail.jtp?type=node&node=4689370&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>]
<br><div class="">Sent: Friday, 18 April 2014 4:37 AM
<br>To: Michele
<br></div>Cc: <a href="http://user/SendEmail.jtp?type=node&node=4689370&i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>Subject: Re: [datatable-help] What is going on with R 3.1 ?
<br><br>Hi,
<br><div><div class="h5"><br>On Thu, Apr 17, 2014 at 10:15 AM, Michele <<a href="http://user/SendEmail.jtp?type=node&node=4689370&i=4" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
<div><div class='shrinkable-quote'><br>> If I try to copy() the tables to re-create the pointers all the tables get
<br>> the same one, always ending in 788 (opening another R session I get the same
<br>> result, same pointers accross the table, ending in 788):
<br>>
<br>>> dt <- readRDS("dt.RDS")
<br>>> dt1 <- readRDS("dt1.RDS")
<br>>> dput(copy(dt))
<br>> structure(list(id = 1:5, var = c(-0.626453810742332, 0.183643324222082,
<br>> -0.835628612410047, 1.59528080213779, NA)), .Names = c("id",
<br>> "var"), row.names = c(NA, -5L), class = c("data.table", "data.frame"
<br>> ), .internal.selfref = <pointer: 0x00000000003e0788>)
<br>>> dput(copy(dt1))
<br>> structure(list(id = 1:10, var2 = c(9.56605515060971, 9.83445938796679,
<br>> 9.14481066107107, 10.5308762543727, NA, NA, 9.45024506381369,
<br>> 10.0544601882071, 10.7019565371199, 9.60325830155958), var3 =
<br>> c(99.6542887323489,
<br>> 100.659231456233, 100.282028460177, 101.423474800432, 98.4134121985332,
<br>> NA, 98.0406472259105, 100.253194731594, 100.759881151841, 99.7930775536395
<br>> )), .Names = c("id", "var2", "var3"), row.names = c(NA, -10L), class =
<br>> c("data.table",
<br>> "data.frame"), sorted = "id", .internal.selfref = <pointer:
<br>> 0x00000000003e0788>)
</div></div>Is this actually causing a problem for you somewhere?
<br><br>For instance, if you modify-by-reference "dt", like `dt[, z := 1]`, is
<br>`dt1` modified as well (it shouldn't be)?
<br><br>Let's try another experiment. Forget loading from an *.rds and just
<br>create a brand new data.table and look at its .internal.selfref:
<br><br>R> a <- data.table(a=1:10)
<br>R> b <- data.table(a=1:10)
<br>R> attributes(a)$.internal.selfref
<br>R> attributes(b)$.internal.selfref
<br><br>What do you see?
<br><br>Also, your initial post referenced two errors that both mentioned
<br>something about a missing logical value ("missing value where
<br>TRUE/FALSE needed"), but it's not clear what triggered the error. Have
<br>you been able to reproduce this?
<br><br>Next time this happens, can you call "traceback()" and provide the
<br>stack trace here?
<br><br>Also, your original post also said:
<br><br>> It's very unstable and I get different results time to time
<br><br>What is very unstable? And what results are different? What exact
<br>operations are you performing that are producing different results
<br>when you run them more than once?
<br><br>If you could provide a more precise explanation of what the problem is
<br>you are actually encountering via some piece of code that is producing
<br>the unexpected behavior you are observing, that would be most helpful.
<br><br>Thanks,
<br>-steve
<br><br>--
<br>Steve Lianoglou
<br>Computational Biologist
<br>Genentech
<br></div></div><div class="">_______________________________________________
<br>datatable-help mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=4689370&i=5" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br></div><div class=""><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" rel="nofollow" link="external" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br>
_______________________________________________
<br>datatable-help mailing list
<br></div><div class=""><a href="http://user/SendEmail.jtp?type=node&node=4689370&i=6" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" rel="nofollow" link="external" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br>
<br>
<br>
<hr noshade size="1" color="#cccccc">
</div><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
</div><a href="http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689370.html" target="_blank" rel="nofollow" link="external">http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689370.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from What is going on with R 3.1 ?, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></blockquote></div><br><br clear="all"><div><br></div>-- <br><p><b><span style="font-size:10.0pt;color:#f00235">PRIVATE<br></span></b><b><span style="font-size:10.0pt;color:#f00235">T:</span></b><span style="font-size:10.0pt;color:gray"> </span><span style="font-size:10.0pt;color:#595959"><span style="color:rgb(102,102,102)"><a value="+447732481517" target="_top" rel="nofollow" link="external">+44 (0)77 3248 1517</a></span> </span><b><span style="font-size:10.0pt;color:#f00235">|</span></b><span style="font-size:10.0pt;color:gray"> </span><b><span style="font-size:10.0pt;color:#f00235"> E:</span></b><span style="font-size:10.0pt;color:gray"> <a href="/user/SendEmail.jtp?type=node&node=4689382&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a></span><a href="http://@gmail.com" target="_blank" rel="nofollow" link="external"><span style="color:rgb(102,102,102)"><span style="font-size:10pt"></span></span></a></p>
<p><b><span style="font-size:10.0pt;color:#f00235">OFFICE<br>T:</span></b><span style="font-size:10.0pt;color:gray"> </span><span style="font-size:10.0pt;color:#595959"><span style="color:rgb(102,102,102)"><a value="+442082368992" target="_top" rel="nofollow" link="external">+44 (0)20 8236 8992</a></span> </span><b><span style="font-size:10.0pt;color:#f00235">|</span></b><span style="font-size:10.0pt;color:gray"> </span><b><span style="font-size:10.0pt;color:#f00235"> E:</span></b><span style="font-size:10.0pt;color:gray"> </span><span style="color:rgb(102,102,102)"><span style="font-size:10pt"><a href="/user/SendEmail.jtp?type=node&node=4689382&i=2" target="_top" rel="nofollow" link="external">[hidden email]</a></span><u><span style="font-size:10pt"><br>
</span></u></span><b><span style="font-size:10.0pt;color:#f00235">T:</span></b><span style="color:rgb(102,102,102)"><span style="font-size:10pt"> <a href="http://www.evolve-analytics.com" target="_blank" rel="nofollow" link="external">www.evolve-analytics.com</a></span></span></p>
<p><span style="color:rgb(102,102,102)"><span style="font-size:10pt"><a href="http://www.evolve-analytics.com" target="_blank" rel="nofollow" link="external"><br></a></span></span></p>
</div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689382.html">Re: What is going on with R 3.1 ?</a><br/>
Sent from the <a href="http://r.789695.n4.nabble.com/datatable-help-f2315188.html">datatable-help mailing list archive</a> at Nabble.com.<br/>