Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Ramnik Bansal
Taking this question further. If I use a complex number or a numeric as an operand in logical operations, to me it APPEARS that these two types are first coerced to LOGICAL internally and then THIS logical output is further used as the operand. For eg. > x <- 4+5i; c(x & F, x & T, x | F, x | T)

Re: [R] train function in caret package

2017-05-19 Thread Elahe chalabi via R-help
Any answer?! On Friday, May 19, 2017 6:33 AM, Elahe chalabi via R-help wrote: Hi all, I'm running train function from caret package on my data set patientdata:     model=train(type~., data=patientdata, method="lvq", preProcess="scale", trControl=control) and I

Re: [R] [EXTERNAL] Re: had non-zero exit status

2017-05-19 Thread Pramod Anugu
I tried using latest R-3-4.0. ./configure works but when I type make it does not work. From: William Dunlap [mailto:wdun...@tibco.com] Sent: Friday, May 19, 2017 4:27 PM To: Pramod Anugu Cc: r-help@R-project.org Subject: [EXTERNAL] Re: [R] had non-zero exit status Try using a

Re: [R] had non-zero exit status

2017-05-19 Thread William Dunlap via R-help
Try using a more recent version of R - 3.4.0 is the current version and 3.1.0 is considered pretty old now. 'R_DoubleColonSymbol' is in RHOME/include/Rinternals.h in R-3.3.0 but not in R-2.15.0. I don't know exactly when it was added. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, May

[R] had non-zero exit status

2017-05-19 Thread Pramod Anugu
Hi , When installing a tidyr package. I get an error message to install rlang package and I try to install rlang I get "installation of package 'rlang' had non-zero exit status" Please advise. Ran install.packages("tidyr", dependencies=TRUE) getting below error message. Please advise. R

Re: [R] [FORGED] p-value=0 running log-rank test

2017-05-19 Thread William Dunlap via R-help
This is a minor problem with the print method for "survdiff" objects. It acts like it computes the p-value with 1 - pchisq( chisq, df) instead of pchisq( chisq, df, lower.tail = FALSE) The former will give zero when the latter gives a number less than about 10^-16. Most people would

Re: [R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Patrick Casimir
Thanks Jeff. I will try elsewhere. Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: Jeff Newmiller Sent: Friday, May 19, 2017 11:04:22 AM To: r-help@r-project.org;

Re: [R] mixed Model: asreml-r versus nmle,lme4 or coxme

2017-05-19 Thread Brigitte Mangin
Thank's Thierry, but as i mentioned, it is not a constant depending only of the data, since with the same observed trait: the difference (between asreml and R packages) is equal to 29.40 in the model with a fixed effect (Type) and the difference is equal to 32.16 in the model with only mu.

Re: [R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Jeff Newmiller
Considering the deafening silence after three repeats, one explanation could be that you are asking the wrong group of people. It is also possible that your failure to follow the Posting Guide with regard to using plain text email and a reproducible example [1][2] means that readers who are not

[R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Patrick Casimir
Dear Members & Experts, Since the Dictionary () function is no longer available with the tm package. How do I use other functions to do the same as below? I want to capture a list of specific terms from a corpus. By example, if my corpus has 102 files. I want to see a list with occurrences of

Re: [R] Problem with choose.files(default=..., multi=FALSE)

2017-05-19 Thread Duncan Murdoch
On 10/05/2017 6:46 AM, Keith Jewell wrote: Thanks for confirming that I wasn't being stupid :-} When using default=pathlong I get the _correct_ starting directory... (M:\test\Averyveryveryveryverylongfoldername\Averyveryveryveryverylongfoldername\Averyveryveryveryverylongfoldername) ... both

[R] train function in caret package

2017-05-19 Thread Elahe chalabi via R-help
Hi all, I'm running train function from caret package on my data set patientdata: model=train(type~., data=patientdata, method="lvq", preProcess="scale", trControl=control) and I get this error: Error in comp(expr, env = envir, options = list(suppressUndefined = TRUE)) : could

[R] mixed Model: asreml-r versus nmle,lme4 or coxme

2017-05-19 Thread Brigitte Mangin
Hi, Did somebody know why asreml does not provide the same REML loglikehood as coxme, lme4 or lmne. Here is a simple example showing the differences: ### library(lme4) library(coxme) library(asreml) library(nlme)

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Ted Harding
[I unadvertently sent my reply below to Jeremie, instead of R-help. Also, I havve had an additional thought which may clarify things for R users]. [Original reply]: The point about this is that (as Rolf wrote) FALSE & (anything) is FALSE, provided logical NA is either TRUE ot FALSE but, because

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Jeff Newmiller
FALSE & FALSE -> FALSE FALSE & TRUE -> FALSE Why do you need to know what the second value is? It doesn't matter what it is... the answer is FALSE. -- Sent from my phone. Please excuse my brevity. On May 19, 2017 5:24:06 AM PDT, "Jérémie Juste" wrote: >My apologies if

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Duncan Murdoch
On 19/05/2017 8:48 AM, S Ellison wrote: SQL, for example, generally takes the view that any expression involving 'missing' is 'missing'. Well, then SQL gets it wrong. Well, that's a view. But paraphrasing an R Turner from a few lines away in the same email: One should be very, very

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread peter dalgaard
> On 19 May 2017, at 14:24 , Jérémie Juste wrote: > > My apologies if I was not clear enough, > > TRUE & NA could be either TRUE or FALSE and consequently is NA. > why is FALSE & NA = FALSE? NA could be TRUE or FALSE, so FALSE & NA > should be NA? > At the risk of

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread S Ellison
> > SQL, for example, generally takes the view that any > > expression involving 'missing' is 'missing'. > > Well, then SQL gets it wrong. Well, that's a view. But paraphrasing an R Turner from a few lines away in the same email: > One should be very, very circumspect about presuming to know

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Jérémie Juste
My apologies if I was not clear enough, TRUE & NA could be either TRUE or FALSE and consequently is NA. why is FALSE & NA = FALSE? NA could be TRUE or FALSE, so FALSE & NA should be NA? On Fri, May 19, 2017 at 2:13 PM, Rolf Turner wrote: > On 20/05/17 00:01,

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Rolf Turner
On 20/05/17 00:01, Jérémie Juste wrote: Hello, Rolf said, TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be either TRUE or FALSE and consequently is NA. OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE. According to this logic why is FALSE & NA [1] FALSE

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Rolf Turner
On 19/05/17 23:38, S Ellison wrote: TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be either TRUE or FALSE and consequently is NA. OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE. As I said *think* about it; don't just go with your immediate knee-jerk (simplistic)

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Jérémie Juste
Hello, Rolf said, TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be either TRUE or FALSE and consequently is NA. OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE. According to this logic why is > FALSE & NA > [1] FALSE ? Best regards, Jeremie On Fri, May 19, 2017

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread S Ellison
> TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be > either TRUE or FALSE and consequently is NA. > > OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE. > > As I said *think* about it; don't just go with your immediate knee-jerk > (simplistic) reaction. Hmm... not sure

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Rolf Turner
On 19/05/17 21:48, Ramnik Bansal wrote: Hi, I need to understand the inconsistent behaviour of & and I operators when used with NA. The code below explains this inconsistency TRUE & NA [1] NA FALSE & NA [1] FALSE TRUE & NA [1] NA FALSE | NA [1] NA TRUE | NA [1] TRUE TRUE ==

Re: [R] Logical Operators' inconsistent Behavior

2017-05-19 Thread Thierry Onkelinx
& -> AND -> results only TRUE if both inputs are TRUE. Hence: FALSE AND unknown = FALSE, TRUE AND unknown = unknown | -> OR -> results in TRUE as soon as one of the inputs is TRUE. Hence FASE or unknown = unknown, TRUE or unknown = TRUE TRUE == NA and FALSE == NA compares TRUE/FALSE against

[R] Logical Operators' inconsistent Behavior

2017-05-19 Thread Ramnik Bansal
Hi, I need to understand the inconsistent behaviour of & and I operators when used with NA. The code below explains this inconsistency > TRUE & NA [1] NA > FALSE & NA [1] FALSE > TRUE & NA [1] NA > FALSE | NA [1] NA > TRUE | NA [1] TRUE > TRUE == NA [1] NA > FALSE == NA [1] NA