[datatable-help] What is going on with R 3.1 ?
Michele
carrieromichele at gmail.com
Thu Apr 24 14:58:42 CEST 2014
Hi,
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
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.
Thank you a lot
Michele
On 24 April 2014 11:09, Michael Nelson [via R] <
ml-node+s789695n4689370h58 at n4.nabble.com> wrote:
> See Simon Urbanek's answer here (and Matt Dowle's Comments)
>
> http://stackoverflow.com/questions/15195220/assigning-by-reference-into-loaded-package-datasets/15208059#15208059
> ________________________________________
> From: [hidden email]<http://user/SendEmail.jtp?type=node&node=4689370&i=0>[[hidden
> email] <http://user/SendEmail.jtp?type=node&node=4689370&i=1>] on behalf
> of Steve Lianoglou [[hidden email]<http://user/SendEmail.jtp?type=node&node=4689370&i=2>]
>
> Sent: Friday, 18 April 2014 4:37 AM
> To: Michele
> Cc: [hidden email] <http://user/SendEmail.jtp?type=node&node=4689370&i=3>
> Subject: Re: [datatable-help] What is going on with R 3.1 ?
>
> Hi,
>
> On Thu, Apr 17, 2014 at 10:15 AM, Michele <[hidden email]<http://user/SendEmail.jtp?type=node&node=4689370&i=4>>
> wrote:
>
> > If I try to copy() the tables to re-create the pointers all the tables
> get
> > the same one, always ending in 788 (opening another R session I get the
> same
> > result, same pointers accross the table, ending in 788):
> >
> >> dt <- readRDS("dt.RDS")
> >> dt1 <- readRDS("dt1.RDS")
> >> dput(copy(dt))
> > structure(list(id = 1:5, var = c(-0.626453810742332, 0.183643324222082,
> > -0.835628612410047, 1.59528080213779, NA)), .Names = c("id",
> > "var"), row.names = c(NA, -5L), class = c("data.table", "data.frame"
> > ), .internal.selfref = <pointer: 0x00000000003e0788>)
> >> dput(copy(dt1))
> > structure(list(id = 1:10, var2 = c(9.56605515060971, 9.83445938796679,
> > 9.14481066107107, 10.5308762543727, NA, NA, 9.45024506381369,
> > 10.0544601882071, 10.7019565371199, 9.60325830155958), var3 =
> > c(99.6542887323489,
> > 100.659231456233, 100.282028460177, 101.423474800432, 98.4134121985332,
> > NA, 98.0406472259105, 100.253194731594, 100.759881151841,
> 99.7930775536395
> > )), .Names = c("id", "var2", "var3"), row.names = c(NA, -10L), class =
> > c("data.table",
> > "data.frame"), sorted = "id", .internal.selfref = <pointer:
> > 0x00000000003e0788>)
>
> Is this actually causing a problem for you somewhere?
>
> For instance, if you modify-by-reference "dt", like `dt[, z := 1]`, is
> `dt1` modified as well (it shouldn't be)?
>
> Let's try another experiment. Forget loading from an *.rds and just
> create a brand new data.table and look at its .internal.selfref:
>
> R> a <- data.table(a=1:10)
> R> b <- data.table(a=1:10)
> R> attributes(a)$.internal.selfref
> R> attributes(b)$.internal.selfref
>
> What do you see?
>
> Also, your initial post referenced two errors that both mentioned
> something about a missing logical value ("missing value where
> TRUE/FALSE needed"), but it's not clear what triggered the error. Have
> you been able to reproduce this?
>
> Next time this happens, can you call "traceback()" and provide the
> stack trace here?
>
> Also, your original post also said:
>
> > It's very unstable and I get different results time to time
>
> What is very unstable? And what results are different? What exact
> operations are you performing that are producing different results
> when you run them more than once?
>
> If you could provide a more precise explanation of what the problem is
> you are actually encountering via some piece of code that is producing
> the unexpected behavior you are observing, that would be most helpful.
>
> Thanks,
> -steve
>
> --
> Steve Lianoglou
> Computational Biologist
> Genentech
> _______________________________________________
> datatable-help mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4689370&i=5>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
> _______________________________________________
> datatable-help mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4689370&i=6>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689370.html
> To unsubscribe from What is going on with R 3.1 ?, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4689002&code=Y2Fycmllcm9taWNoZWxlQGdtYWlsLmNvbXw0Njg5MDAyfC0xODQ3MzY2NTIz>
> .
> NAML<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>
>
--
*PRIVATE**T:* +44 (0)77 3248 1517 *|* * E:*
carrieromichele at gmail.com<http://@gmail.com>
*OFFICET:* +44 (0)20 8236 8992 *|* * E:*
michele.carriero at evolve-analytics.com
*T:* www.evolve-analytics.com
<http://www.evolve-analytics.com>
--
View this message in context: http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689382.html
Sent from the datatable-help mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140424/e9ff5c2b/attachment.html>
More information about the datatable-help
mailing list