Re: [R] [FORGED] Q re: logical indexing with is.na

2019-03-10 Thread PIKAL Petr
Hi Do you want something like this? > x <- c(1,2,NA, 3, 4, 5, NA, 6,7,8, NA, NA, 9,10) > y <- c(1,2,NA, NA, 3, 4, 5, 6, NA, 7,8, NA, NA, 9,10) > identical(x[which(!is.na(x))], y[which(!is.na(y))]) [1] TRUE If I expect NA and want to extract or compare something, I tend to use which to select onl

Re: [R] How to change the number of bins?

2019-03-10 Thread Bert Gunter
You are asking the wrong question. The right question is, "why are so many values missing?" Is it because they were censored, not reported for some reason, due to instrument failure,...? Until you answer that question, any analysis you do is garbage. I strongly recommend you consult a competent

Re: [R] How to change the number of bins?

2019-03-10 Thread Jim Lemon
Hi Bowie, As David suggested, you can substitute the R missing value (NA) for 999 (probably an SPSS missing value). If you don't want to change it, you could probably just subset your data like this: V<-create_infotables(data=Test[Test[n] != 999,-1],y="class",bins=10) where "n" is the column num

Re: [R] How to change the number of bins?

2019-03-10 Thread David Winsemius
On 3/10/19 5:29 PM, wong bowie wrote: > You are right. Actually this variable represents the number of day > passed after contacting a client, 999 means the client has never been > contacted. > > But I am not supposed to change the value, am I? I certainly would. SAS allows one to specify a v

Re: [R] [R-sig-eco] AIC in Biomod 2

2019-03-10 Thread David L Carlson
I searched the manual for package biomed2 and found 6 references to "AIC". Perhaps that is your answer. David L. Carlson Department of Anthropology Texas A&M University -Original Message- From: R-sig-ecology [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Lara Silva Sent: Satu

Re: [R] How to change the number of bins?

2019-03-10 Thread wong bowie
You are right. Actually this variable represents the number of day passed after contacting a client, 999 means the client has never been contacted. But I am not supposed to change the value, am I? David Winsemius 於 2019年3月10日 週日 下午10:48寫道: > Seems rather likely that 999 is not really a measured

Re: [R] How to change the number of bins?

2019-03-10 Thread David Winsemius
Seems rather likely that 999 is not really a measured value but rather is a missing value indicator. -- David. On 3/10/19 1:54 PM, wong bowie wrote: I wish to calculate the weight of evidence of a variable x, which is positively skewed, with over 6000 of the observations are 999 but only 200

[R] How to change the number of bins?

2019-03-10 Thread wong bowie
I wish to calculate the weight of evidence of a variable x, which is positively skewed, with over 6000 of the observations are 999 but only 200 range from 1-27. I used the code, “IV<-create_infotables(data=Test[,-1],y="class",bins=10)” However, no matter what number I used in bins parameter, I ca

Re: [R] rgl.postscript hang

2019-03-10 Thread Duncan Murdoch
I suspect it isn't actually hung, it is just very, very slow. If I change the line x <- (-100:100)/5 to x <- (-20:20)/5 then it works almost instantly. At x <- (-50:50)/5 it is slow (16 seconds); replacing the 50 with 60, 70 or 80 yields 29, 46, or 120 seconds respectively. So far I have

[R] rgl.postscript hang

2019-03-10 Thread J C Nash
I've found some other reports that resemble this, but none seem to have a clear indication of the source of the hangup. This post raises a non-critical issue, but it would be nice to understand the problem and possibly fix it, or else have an error message generated. As Duncan has posted in one of

Re: [R] [FORGED] Q re: logical indexing with is.na

2019-03-10 Thread Duncan Murdoch
On 10/03/2019 1:15 a.m., David Goldsmith wrote: Thanks, all. I had read about recycling, but I guess I didn't fully appreciate all the "weirdness" it might produce. :/ With this explained, I'm going to ask a follow-up, which is only contextually related: the impetus for this discovery was check

Re: [R] [FORGED] Q re: logical indexing with is.na

2019-03-10 Thread David Goldsmith
Thanks, all. I had read about recycling, but I guess I didn't fully appreciate all the "weirdness" it might produce. :/ With this explained, I'm going to ask a follow-up, which is only contextually related: the impetus for this discovery was checking "corner cases" to determine if all(x[!is.na(x)