Joel Stewart
2016-Sep-23 18:42 UTC
[R] R freezing issue when checking to see if variable belongs to two different vectors
I often find myself trying to get a quick assessment of how much of one vector is inside of another vector. I almost always try this with variables that are some sort of identifier, like a client id number or an SSN. I typically do this: table( DF1$Identifier %in% DF2$Identifier) This will return a count of True and False logical responses. However, sometimes when I try to do this my computer will freeze and I am unable to stop or escape the process, requiring me to shutdown R via the task manager. I was wondering if anybody else experiences this and, if so, why this might be happening. Thanks in advance, Joel [[alternative HTML version deleted]]
Bert Gunter
2016-Sep-23 21:40 UTC
[R] R freezing issue when checking to see if variable belongs to two different vectors
It might help if you specify your hardware, OS (presumably Windows?) and version, and your R version. Also possibly how large your vectors are and what other processes you have running. Other than that, I have no clue, of course. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Sep 23, 2016 at 11:42 AM, Joel Stewart <jstewart at provplan.org> wrote:> I often find myself trying to get a quick assessment of how much of one vector is inside of another vector. I almost always try this with variables that are some sort of identifier, like a client id number or an SSN. I typically do this: > > table( DF1$Identifier %in% DF2$Identifier) > > This will return a count of True and False logical responses. However, sometimes when I try to do this my computer will freeze and I am unable to stop or escape the process, requiring me to shutdown R via the task manager. I was wondering if anybody else experiences this and, if so, why this might be happening. > > Thanks in advance, > > Joel > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Duncan Murdoch
2016-Sep-23 22:30 UTC
[R] R freezing issue when checking to see if variable belongs to two different vectors
On 23/09/2016 2:42 PM, Joel Stewart wrote:> I often find myself trying to get a quick assessment of how much of one vector is inside of another vector. I almost always try this with variables that are some sort of identifier, like a client id number or an SSN. I typically do this: > > table( DF1$Identifier %in% DF2$Identifier) > > This will return a count of True and False logical responses. However, sometimes when I try to do this my computer will freeze and I am unable to stop or escape the process, requiring me to shutdown R via the task manager. I was wondering if anybody else experiences this and, if so, why this might be happening.No, I've never seen that. If you ever find a reproducible example to trigger that, please post it to the bug list. (This might be a little hard if you've never posted there before; due to abuse by spammers, we need to authorize each user manually. But at least we only need to do that once per user.) If you can't make this happen reproducibly, it probably won't get investigated. Duncan Murdoch