Re: [R] [FORGED] Re: Question on function "scatterplot3d"

2017-05-31 Thread Rolf Turner

On 01/06/17 13:17, Ismail SEZEN wrote:



On 1 Jun 2017, at 03:41, li li  wrote:

Hi all,
  I have a question with regard to making plots using function
"scatterplot3d".
Please see the example below. It looks like, for y axis, the tickmark text
was cutoff.
The number "10" does not show up completely. I tried to work with par(mpg).
It does not
seem to work. Hope to get some advice here. Thanks much!
   Hanna

C <- runif(30)
B <- rep(1:3, each=10)
A <- rep(1:10,3)
scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",  main =
"",
  grid=TRUE,  col.grid="lightgreen",
  xlab="x", ylab="y", zlab="z”)


Everything seems ok to me. Try to reset/clear all plots in your plotting window 
and try only to run the code above. Perhaps You changed par settings before in 
some point?



I tried the code given above, and after I replaced the deleted> incorrect double quote mark (after the final "z"), it ran and 
looked OK *except* for the positioning of the "y" axis label, which is 
at the "far end" of the y-axis rather than being at the "centre" of the 
y-axis.  (See attached.)


Is this a bug?

cheers,

Rolf Turner

P.S. I have also attached the code in the file "scatScript.txt", for 
convenience.


P^2. S.:

> sessionInfo()
R Under development (unstable) (2017-04-21 r72585)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_NZ.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_NZ.UTF-8LC_COLLATE=en_NZ.UTF-8
 [5] LC_MONETARY=en_NZ.UTF-8LC_MESSAGES=en_NZ.UTF-8
 [7] LC_PAPER=en_NZ.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] scatterplot3d_0.3-40 misc_0.0-16

loaded via a namespace (and not attached):
 [1] compiler_3.5.0   deldir_0.1-15Matrix_1.2-8
 [4] spatstat.utils_1.4-1 tools_3.5.0  mgcv_1.8-17
 [7] abind_1.4-5  spatstat_1.50-0  rpart_4.1-11
[10] nlme_3.1-131 grid_3.5.0   polyclip_1.6-1
[13] lattice_0.20-35  goftest_1.1-1tensor_1.5

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276


scat.pdf
Description: Adobe PDF document
library(scatterplot3d)
set.seed(42)
C <- runif(30)
B <- rep(1:3, each=10)
A <- rep(1:10,3)
scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",
  main = "", grid=TRUE,  col.grid="lightgreen",
  xlab="x", ylab="y", zlab="z")

__
R-help@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.

Re: [R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions

2017-05-31 Thread Nelly Reduan
Thank you very much Rob for your answer. I have some difficulties to understand 
how to apply my agent-based model to each parameter combination generated by 
the LHS, in particular when parameters are defined by probability 
distributions. Indeed, I have multiple parameters in my model: parameters which 
are defined by a single value (like “temperature", "pressure”) and parameters 
which are defined by probability distributions (like “dispersal distance”). 
It’s correct for me to treat distance as a class. When all parameters are 
defined by a single value, I need first to create a data frame in which each 
column represents a different parameter, and each row represents a different 
combination of parameter values. Then, I apply my model to each row of the data 
frame. But, it’s not clear for me how to do this when parameters are defined 
from probability distributions? In particular, how can I use your code to apply 
my model to each of the 50 rows of the data frame “tabLHS”? Given that one row 
corresponds to one model simulation, I should have a value generated by the LHS 
for all distance classes at the first line of the data frame.



library(pse)
q <- list("qexp", "qunif", "qunif")
q.arg <- list(list(rate=exponential_rate), list(min=0, max=1),
list(min=0, max=1))
uncoupledLHS <- LHS(model=model_function, input_parameters, N, q, q.arg)
hist(uncoupledLHS$data$dispersal_distance, breaks=10)

tabLHS <- get.data(uncoupledLHS)



Sorry, it’s the first time that I perform a sensitivity analysis using the LHS.


Thank you very much for your time.

Have a nice day

Nell



De : Rob C 
Envoyé : mardi 30 mai 2017 16:26:08
À : Nelly Reduan
Cc : r-help@r-project.org
Objet : Re: [R] Latin Hypercube Sampling when parameters are defined according 
to specific probability distributions

Nell,

I still might not be interpreting your question correctly, but I will try.

When you say that the sum of the probabilities of all distance classes
must equal one, I am going to treat distance as a class, instead of as a
continuous variable.

distance_class_probabilities <- c(9, 11, 10, 8.9, 8, 7, 6, 5.8, 5.1,
4, 3.9, 3.7, 3.4, 3.1, 2, 1.9, 1.6, 1.4, 1, 0.9, 0.8, 0.7, 0.4, 0.3,
0.1)/100
sum(distance_class_probabilities)
distance_classes <- factor(paste0("d", 1:25), ordered = TRUE,
levels=paste0("d", 1:25))
input_parameters <- c("dispersal_distance", "temperature", "pressure")
N <- 1000

plot(1:25, distance_class_probabilities, type="h", lwd=5)

set.seed(1)
require(lhs)
X <- randomLHS(N, length(input_parameters))
dimnames(X) <- list(NULL, input_parameters)
Y <- X
Y[,"dispersal_distance"] <-
approx(x=cumsum(distance_class_probabilities), y=1:25,
xout=X[,"dispersal_distance"], method="constant", yleft=0)$y + 1

hist(Y[,"dispersal_distance"], breaks=c(seq(0.5, 25.5, by=1)))
plot(table(distance_classes[Y[,"dispersal_distance"]]))


Is it still a Latin hypercube?

This is a more difficult question.  In some ways, the sample is still a Latin
hypercube since it was drawn that way.  But once the sample has been discretized
into the distance classes, then it loses the latin property of having only one
sample per "row".  It might be close enough for your purposes though.

Rob



On Tue, May 30, 2017 at 10:59 AM, Nelly Reduan  wrote:
> Thanks a lot Rob for your answer. I need to add a condition for the
> parameter “dispersal distance”. The sum of the probabilities of all distance
> classes must be equal to 1:
>
> y <- c(9, 11, 10, 8.9, 8, 7, 6, 5.8, 5.1, 4, 3.9, 3.7, 3.4, 3.1, 2, 1.9,
> 1.6, 1.4, 1, 0.9, 0.8, 0.7, 0.4, 0.3, 0.1)
>
> x <- seq(1, 25, by = 1)
>
> barplot(y/100, names.arg=x, ylab="Probability", xlab="Distance (km)")
>
>
>
> With this condition, is it possible to perform a LHS?
>
> Thanks a lot for your time.
>
> Nell
>
>
> 
> De : R-help  de la part de Rob C
> 
> Envoyé : samedi 27 mai 2017 13:32:23
> À : r-help@r-project.org
> Objet : Re: [R] Latin Hypercube Sampling when parameters are defined
> according to specific probability distributions
>
>>May 26, 2017; 11:41am  Nelly Reduan Latin Hypercube Sampling when
>> parameters are >defined according to specific probability distributions
>>Hello,
>> I would like to perform a sensitivity analysis using a Latin Hypercube
>> Sampling (LHS).
>>Among the input parameters in the model, I have a parameter dispersal
>> distance which is defined according to an exponential probability
>> distribution.
>
>>In the model, the user thus sets a default probability value for each
>> distance class.
>
>>For example, for distances ([0  2]; ]2  4]; ]4  6]; ]6  8]; ]8  10];; ]48
>> 50],
>
>>respective probabilities are 0.055; 0.090; 0.065; 0.035; 0.045;; 0.005.
>
>  >Here is the code to represent an exponential probability
> distribution for the parameter dispersal distance:
>
>>set.seed(0)
>>foo <- rexp(100, rate = 1/10)
>>hist(foo, 

[R] Post for R

2017-05-31 Thread carrie wang via R-help

Hello, 
I want to split the dataframe into 1000 groups based on two column values(max 
value and second max value). First, I made two lists L1 and L2.  L1 is the list 
divided into 100 groups based on the range of max value and L2 is divided into 
10 groups based on the second max values. Now I want to do the combinations 
based on L1 and L2. I want to do a for loop for L1 and for each element in L1, 
I split it into 10 groups based on L2. I tried to write the code, but it does 
not work.

L1<-split(df,cut(df$max,seq(0,1,by=0.01)))L2<-split(df,cut(df$submax,seq(0,0.2,by=0.02)))
Z<-list()G<-list()for (i in length(L1)){  Z=data.frame(L1[i])  G <- 
split(Z$submax,"0.02")  print(G)  }
Thanks so much!Carrie
[[alternative HTML version deleted]]

__
R-help@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.

[R] installed.packages() does not work properly

2017-05-31 Thread Anil Dabral
Hi,

I tried executing the following statement multiple times on R 3.4 and it worked 
only the first time. In older versions of R it seems to have worked. Am I doing 
anything wrong?


In R 3.4 (works only the first time)

tmp <- installed.packages()  #this works

tmp <- installed.packages() ## See error below


Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) &&  :
  missing value where TRUE/FALSE needed



in R 3.3.3 works well when executed multiple times.

tmp <- installed.packages() #this works

tmp <- installed.packages() #this works

tmp <- installed.packages() #this works


Thanks and Regards,

Anil

Sent from Outlook

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Question on function "scatterplot3d"

2017-05-31 Thread Ismail SEZEN

> On 1 Jun 2017, at 03:41, li li  wrote:
> 
> Hi all,
>  I have a question with regard to making plots using function
> "scatterplot3d".
> Please see the example below. It looks like, for y axis, the tickmark text
> was cutoff.
> The number "10" does not show up completely. I tried to work with par(mpg).
> It does not
> seem to work. Hope to get some advice here. Thanks much!
>   Hanna
> 
> C <- runif(30)
> B <- rep(1:3, each=10)
> A <- rep(1:10,3)
> scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",  main =
> "",
>  grid=TRUE,  col.grid="lightgreen",
>  xlab="x", ylab="y", zlab="z”)

Everything seems ok to me. Try to reset/clear all plots in your plotting window 
and try only to run the code above. Perhaps You changed par settings before in 
some point?

__
R-help@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.

[R] Question on function "scatterplot3d"

2017-05-31 Thread li li
Hi all,
  I have a question with regard to making plots using function
"scatterplot3d".
Please see the example below. It looks like, for y axis, the tickmark text
was cutoff.
The number "10" does not show up completely. I tried to work with par(mpg).
It does not
seem to work. Hope to get some advice here. Thanks much!
   Hanna




C <- runif(30)
B <- rep(1:3, each=10)
A <- rep(1:10,3)
scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",  main =
"",
  grid=TRUE,  col.grid="lightgreen",
  xlab="x", ylab="y", zlab="z")

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] seek non-black box alternative to randomForest

2017-05-31 Thread Bert Gunter
On Tue, May 30, 2017 at 12:11 PM, Don McKenzie  wrote:
> Though off-topic for this list, your question (complaint?) comes up a lot in 
> discussions of analytical methods, and has generated hundreds of papers 
> (Google is your friend here).
> You can start with
>
> https://www.quora.com/What-are-the-pros-and-cons-of-GLM-vs-Random-forest-vs-SVM
>  
> 
>
> for some of the controversies.  It looks to me as if your editor stated 
> (poorly) the problem that some models that are good at pattern-matching (RF) 
> are less useful for predicting new observations.
>
> Others n the list who are more erudite than I may choose to comment, amplify, 
> or refute...

... But hopefully will not, as this could quickly devolve into endless
opining that would clog up this list, as you have yourself noted.

-- Bert


>
>
>> On May 30, 2017, at 11:54 AM, Barry King  wrote:
>>
>> I've recently had a research manuscript rejected by an editor. The
>> manuscript showed
>> that for a real life data set, random forest outperformed multiple linear
>> regression
>> with respect to predicting the target variable. The editor's objection was
>> that
>> random forest is a black box where the random assignment of features to
>> trees was
>> intractable. I need to find an alternative method to random forest that
>> does not
>> suffer from the black box label. Any suggestions? Would caret::treebag be
>> free of
>> random assignment of features? Your assistance is appreciated.
>>
>> --
>>
>>   [[alternative HTML version deleted]]
>>
>> __
>> R-help@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.
>
>
>
> __
> R-help@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.

__
R-help@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.


Re: [R] Error in readRDS(dest) (was Re: Error with installed.packages with R 3.4.0 on Windows)

2017-05-31 Thread Martin Morgan

On 05/31/2017 04:38 AM, Patrick Connolly wrote:

On Tue, 23-May-2017 at 12:20PM +0200, Martin Maechler wrote:

[...]

|>
|> Given the above stack trace.
|> It may be easier to just do
|>
|> debugonce(available.packages)
|> install.packages("withr")
|>
|> and then inside available.packages, (using 'n') step to the
|> point _before_ the tryCatch(...) call happens; there, e.g. use
|>
|>   ls.str()
|>
|> which gives an str() of all your local objects, notably 'dest'
|> and 'method'.
|> but you can also try other things once inside
|> available.packages().

I couldn't see any differences between R-3.3.3 (which works) and
R-3.4.0 (which doesn't) until I got to here, a few lines before the
download.file line:

Browse[2]>
debug: dest <- file.path(tempdir(), paste0("repos_", URLencode(repos,
 TRUE), ".rds"))
Browse[2]>

When I check out those directories in a terminal, there's a big diffrence:

With R-3.4.0
~ > ll /tmp/RtmpFUhtpY
total 4
drwxr-xr-x 2 hrapgc hrapgc 4096 May 31 10:45 downloaded_packages/
-rw-r--r-- 1 hrapgc hrapgc0 May 31 10:56 
repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds




The file repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds 
was likely created earlier in your R session. Likely the download a few 
lines down


download.file(url = paste0(repos, "/PACKAGES.rds"),
  destfile = dest, method = method,
  cacheOK = FALSE, quiet = TRUE, mode = 
"wb")


'succeeded' but created a zero-length file.

You could try to troubleshoot this with something like the following, 
downloading to a temporary location


  dest = tempfile()
  url = "http://cran.stat.auckland.ac.nz/src/contrib/PACKAGES.rds;
  download.file(url, dest)
  file.size(dest)

If this succeeds (it should download a file of several hundred KB), then 
try adding the options method, cacheOK, quiet, mode to the 
download.file() call. 'method' can be determined when you are in 
available.packages while debugging; if R says that it is missing, then 
it will be assigned, in download.file, to either 
getOption("download.file.method") or (if the option is NULL or "auto") 
"libcurl".


If the download 'succeeds' but the temporary file created is 0 bytes, 
then it would be good to share the problematic command with us.


Martin Morgan


With R-3.3.3
~ > ll /tmp/RtmpkPgL3A
total 380
drwxr-xr-x 2 hrapgc hrapgc   4096 May 31 11:01 downloaded_packages/
-rw-r--r-- 1 hrapgc hrapgc   8214 May 31 11:01 libloc_185_3165c7f52d5fdf96.rds
-rw-r--r-- 1 hrapgc hrapgc 372263 May 31 11:01 
repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds

So, if I could figure out what makes *that* difference I could get
somewhere.  I see there's considerably extra code in the newer of the
two versions of available.packages() but being a bear with a small
brain, I can't figure out what differences should be expected.  I have
no idea what populates those 'dest' directories.

TIA




This email message may contain legally privileged and/or...{{dropped:2}}

__
R-help@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.


Re: [R] [FORGED] deviance in GLM vs. summary.glm

2017-05-31 Thread Rolf Turner

On 31/05/17 16:53, array chip via R-help wrote:

Hi, I am running a logistic regression on a simple dataset (attached) using glm:

dat<-read.table("dat.txt",sep='\t',header=T)

If I use summary() on a logistic model:

summary(glm(y~x1*x2,dat,family='binomial'))

Coefficients:Estimate Std. Error z value Pr(>|z|)(Intercept)
19.575377.01   0.0040.997x1-18.595377.01  -0.003
0.997x2B   -19.575377.01  -0.0040.997x1:x2B 38.15
7604.24   0.0050.996
As you can see, the interaction term is very insignificant (p = 0.996)!
But if I use a anova() to compare a full vs reduced model to evaluate the 
interaction term:

anova(glm(y~x1+x2,dat,family='binomial'), 
glm(y~x1*x2,dat,family='binomial'))Analysis of Deviance Table

Model 1: y ~ x1 + x2Model 2: y ~ x1 * x2  Resid. Df Resid. Dev Df Deviance1 
   22 27.067221 21.209  1   5.8579
This follows a chi-square distribution with 1 df, so the corresponding p value 
is:

1-pchisq(5.8679,1)[1] 0.01541944

So I get very different p value on the interaction term, can someone share 
what's going wrong here?


(1) To re-emphasize Berwin Turlach's exhortation, ***PLEASE*** do not 
post in html; your results are nearly impossible to read.


(2) To add a tiny bit to Berwin's comments:

There is something a bit weird about your data; note that if you look at 
the fitted values from your fit, you get only *three* distinct values 
--- whereas there should be four, since there are four distinct
treatment combinations, (0,A), (0,B), (1,A) and (1,B).  And all possible 
treatment combinations do indeed occur.


The deficiency occurs because the last three of your coefficients (the 
non-intercept terms) sum to (effectively) 0.  Thus you get the same 
fitted value from the (1,B) combination as from the (0,A) combination.


It is not clear to me what the implications of all this are --- 
particularly since it's getting on for my bed time :-) --- but it seems 
clear that this sort of "degeneracy" is going to mess things up.
And perhaps contribute to the Hauck-Donner effect that Berwin told you 
about.


I would also advise you to try experimenting with simulated data.  (When 
in doubt, simulate.  Even when not in doubt, simulate.  That is my 
guiding principle.)  I.e. try to simulate y-values from a coefficient 
vector that does not suffer from the "degeneracy", fit a model to the 
simulated y-values, and compare the two tests.  They still won't agree, 
but they will (surely?) be less wildly discrepant.


cheers,

Rolf Turner

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
R-help@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.


[R] Locale changed after an RODBC connection on Linux

2017-05-31 Thread François Morneau

Dear helpeRs,

When connecting to a PostgreSQL database (via the RODBC functions 
odbcConnect or odbcDriverConnect), my locale are redefined from:

 [1] LC_CTYPE=fr_FR.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=fr_FR.UTF-8LC_COLLATE=fr_FR.UTF-8
 [5] LC_MONETARY=fr_FR.UTF-8LC_MESSAGES=fr_FR.UTF-8
 [7] LC_PAPER=fr_FR.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

to:
[1] fr_FR.UTF-8

Loading RODBC does not affect the locale. It happens only after opening 
a first connection:


> ch <- odbcConnect(dsn = "Inv_Exp")

After that the Sys.localeconv() is changed and among others, the 
"decimal_point" is modified from "." to ",", which as an impact on my R 
script which was previously running.


I am running an Linux Mint computer. The rest of my sessionInfo() is:

R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

attached base packages:
[1] stats graphics  grDevices utils datasets  methods base

other attached packages:
[1] RODBC_1.3-15

loaded via a namespace (and not attached):
[1] compiler_3.4.0

We observed the same behaviour on my colleague's computer (also on the 
same Linux Mint version) but not on Windows (7) or on a more recent 
Ubuntu 16 with sessionInfo() :


R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=fr_FR.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=fr_FR.UTF-8LC_COLLATE=fr_FR.UTF-8
 [5] LC_MONETARY=fr_FR.UTF-8LC_MESSAGES=fr_FR.UTF-8
 [7] LC_PAPER=fr_FR.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods base

other attached packages:
[1] RODBC_1.3-15

loaded via a namespace (and not attached):
[1] compiler_3.4.0

Going back to previous versions (even old ones) of RODBC does not solve 
the issue. I certainely miss something obvious but can not find out what.


Regards,

François Morneau

__
R-help@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.

Re: [R] Error in readRDS(dest) (was Re: Error with installed.packages with R 3.4.0 on Windows)

2017-05-31 Thread Patrick Connolly
On Tue, 23-May-2017 at 12:20PM +0200, Martin Maechler wrote:

[...]

|> 
|> Given the above stack trace. 
|> It may be easier to just do
|> 
|> debugonce(available.packages)
|> install.packages("withr")
|> 
|> and then inside available.packages, (using 'n') step to the
|> point _before_ the tryCatch(...) call happens; there, e.g. use
|> 
|>   ls.str()
|> 
|> which gives an str() of all your local objects, notably 'dest'
|> and 'method'.
|> but you can also try other things once inside
|> available.packages().

I couldn't see any differences between R-3.3.3 (which works) and
R-3.4.0 (which doesn't) until I got to here, a few lines before the
download.file line:

Browse[2]> 
debug: dest <- file.path(tempdir(), paste0("repos_", URLencode(repos, 
TRUE), ".rds"))
Browse[2]> 

When I check out those directories in a terminal, there's a big diffrence:

With R-3.4.0
~ > ll /tmp/RtmpFUhtpY
total 4
drwxr-xr-x 2 hrapgc hrapgc 4096 May 31 10:45 downloaded_packages/
-rw-r--r-- 1 hrapgc hrapgc0 May 31 10:56 
repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds


With R-3.3.3
~ > ll /tmp/RtmpkPgL3A
total 380
drwxr-xr-x 2 hrapgc hrapgc   4096 May 31 11:01 downloaded_packages/
-rw-r--r-- 1 hrapgc hrapgc   8214 May 31 11:01 libloc_185_3165c7f52d5fdf96.rds
-rw-r--r-- 1 hrapgc hrapgc 372263 May 31 11:01 
repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds

So, if I could figure out what makes *that* difference I could get
somewhere.  I see there's considerably extra code in the newer of the
two versions of available.packages() but being a bear with a small
brain, I can't figure out what differences should be expected.  I have
no idea what populates those 'dest' directories.

TIA
-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
R-help@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.


Re: [R] deviance in GLM vs. summary.glm

2017-05-31 Thread Berwin A Turlach
Dear Yi,

On Wed, 31 May 2017 04:53:25 + (UTC)
array chip via R-help  wrote:

> Hi, I am running a logistic regression on a simple dataset (attached)
> using glm: [...] As you can see, the interaction term is very
> insignificant (p = 0.996)! 

Well, all terms are not significant (actually, AFAIK, the phrase "very
insignificant" does not exist; and if it does, than it ought not).  

But look at the estimates and the standard errors too (might be easier
if you had formatted your e-mail in a way that was readable)!  What
does an estimate for the intercept of 19.57 on the linear predictor
scale mean?  What it the estimated probability if you transform back?

Perhaps the following command

R> xtabs(~x1+x2+y,dat)

will shed some more light on what is going on in your data set, and why
the interaction term is highly significant.

> But if I use a anova() to compare a full
> vs reduced model to evaluate the interaction term:
> > anova(glm(y~x1+x2,dat,family='binomial'),
> > glm(y~x1*x2,dat,family='binomial'))

To you know about the (optional) argument 'test="ChiSq"' for the
anova() command if you use it to compare models fitted by glm()? (see
help(anova.glm))

> So I get very different p value on the interaction term, can someone
> share what's going wrong here?

Data separation, aka Hauck-Donner phenomenon, discussed in any good
book on logistic regression.

Best wishes,

Berwin

== Full address 
A/Prof Berwin A Turlach, Director Tel.: +61 (8) 6488 3338 (secr)
Centre for Applied Statistics   +61 (8) 6488 3383 (self)
School of Maths and Stats (M019)  FAX : +61 (8) 6488 1028
The University of Western Australia 
35 Stirling Highway e-mail: berwin.turl...@gmail.com
Crawley WA 6009  http://staffhome.ecm.uwa.edu.au/~00043886/
Australiahttp://www.researcherid.com/rid/A-4995-2008

__
R-help@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.


Re: [R] Differentiate values in a plot by colour or symbol

2017-05-31 Thread Tobias Christoph
wuhu, the plot is running now;)

I had to put three brackets instead of two at the end of the formula.

Thank you!




Am 30.05.2017 um 21:29 schrieb Ismail SEZEN:
>
>> On 30 May 2017, at 21:44, Tobias Christoph > > wrote:
>>
>> Okay;)
>>
>> First of all many thanks to you, Ismail, that you really try to help 
>> me. I am really not an expert with R and try to learn.
>>
> You’re welcome.
>
>> I just checked: All columns in my data frame are numeric. The range 
>> of years is from 2005 to 2016.
>>
>> Please find attached the result of "data.frame(data)". I also 
>> attached it as Excel-file
>>
>> >data.frame(data)town year  revenue stations
>> 1   Bremen 2005 39.910361
>> 2   Bremen 2006 43.342651
>> 3   Bremen 2007 44.036141
>> 4   Bremen 2008 43.199451
>> 5   Bremen 2009 39.052301
>> 6   Bremen 2010 44.246261
>> 7   Bremen 2011 46.19309   35
>> 8   Bremen 2012 48.59513  101
>> 9   Bremen 2013 48.15778  181
>> 10  Bremen 2014 48.83199  323
>> 11  Bremen 2015 48.68549  463
>> 12  Bremen 2016 50.0  614
>> 13 Dresden 2005 42.278581
>> 14 Dresden 2006 50.396061
>> 15 Dresden 2007 48.732991
>> 16 Dresden 2008 42.690101
>> 17 Dresden 2009 40.811741
>> 18 Dresden 2010 47.096752
>> 19 Dresden 2011 49.16900   43
>> 20 Dresden 2012 48.13645  151
>> 21 Dresden 2013 48.13645  284
>> 22 Dresden 2014 49.77309  511
>> 23 Dresden 2015 51.51515  773
>> 24 Dresden 2016 51.0 1057
>> 25  Düsseldorf 2005 44.232271
>> 26  Düsseldorf 2006 46.709281
>> 27  Düsseldorf 2007 51.240081
>> 28  Düsseldorf 2008 61.590581
>> 29  Düsseldorf 2009 45.700211
>> 30  Düsseldorf 2010 57.170968
>> 31  Düsseldorf 2011 60.60122  115
>> 32  Düsseldorf 2012 65.50992  339
>> 33  Düsseldorf 2013 64.06870  636
>> 34  Düsseldorf 2014 71.56474 1117
>> 35  Düsseldorf 2015 68.20119 1622
>> 36  Düsseldorf 2016 80.0 2117
>> 37   Essen 2005 37.710291
>> 38   Essen 2006 44.611271
>> 39   Essen 2007 41.399261
>> 40   Essen 2008 49.347921
>> 41   Essen 2009 38.491371
>> 42   Essen 2010 51.578441
>> 43   Essen 2011 48.38058   29
>> 44   Essen 2012 50.17066   42
>> 45   Essen 2013 49.26759   90
>> 46   Essen 2014 50.20367  162
>> 47   Essen 2015 47.89430  258
>> 48   Essen 2016 58.0  370
>> 49   Frankfurt 2005 47.973551
>> 50   Frankfurt 2006 50.372231
>> 51   Frankfurt 2007 49.112921
>> 52   Frankfurt 2008 49.653161
>> 53   Frankfurt 2009 44.538893
>> 54   Frankfurt 2010 54.02567   15
>> 55   Frankfurt 2011 56.29475   80
>> 56   Frankfurt 2012 59.10949  223
>> 57   Frankfurt 2013 62.30140  488
>> 58   Frankfurt 2014 62.67521  836
>> 59   Frankfurt 2015 66.93712 1319
>> 60   Frankfurt 2016 66.0 1744
>> 61Hannover 2005 39.824721
>> 62Hannover 2006 41.258411
>> 63Hannover 2007 40.804561
>> 64Hannover 2008 42.191921
>> 65Hannover 2009 36.960121
>> 66Hannover 2010 45.830555
>> 67Hannover 2011 49.86364   35
>> 68Hannover 2012 51.11023  167
>> 69Hannover 2013 52.69465  351
>> 70Hannover 2014 56.22519  983
>> 71Hannover 2015 56.95612 1413
>> 72Hannover 2016 61.0 1864
>> 73 Leipzig 2005 29.059821
>> 74 Leipzig 2006 34.523061
>> 75 Leipzig 2007 35.973031
>> 76 Leipzig 2008 40.037981
>> 77 Leipzig 2009 37.675742
>> 78 Leipzig 2010 44.193653
>> 79 Leipzig 2011 44.72397   53
>> 80 Leipzig 2012 49.55416  223
>> 81 Leipzig 2013 52.92384  488
>> 82 Leipzig 2014 53.50600  918
>> 83 Leipzig 2015 54.62963 1517
>> 84 Leipzig 2016 59.0 2037
>> 85Nürnberg 2005 43.518851
>> 86Nürnberg 2006 49.132781
>> 87Nürnberg 2007 46.921811
>> 88Nürnberg 2008 52.036281
>> 89Nürnberg 2009 43.450301
>> 90Nürnberg 2010 55.442585
>> 91Nürnberg 2011 57.21674   48
>> 92Nürnberg 2012 62.36625  145
>> 93Nürnberg 2013 61.49312  297
>> 94Nürnberg 2014 66.22809  505
>> 95Nürnberg 2015 63.38028  813
>> 96Nürnberg 2016 72.0 1101
>> 97 Rostock 2005 32.566401
>> 98 Rostock 2006 30.710111
>> 99 Rostock 2007 33.719701
>> 100Rostock 2008 34.259221
>> 101Rostock 2009 34.601811
>> 102Rostock 2010 40.172701
>> 103Rostock 2011 42.060823
>> 104Rostock 2012 42.43937   15
>> 105

Re: [R] Need Help - R Programming - Using iteration value to change field names for processing for every iteraion

2017-05-31 Thread Jeff Newmiller
That is not possible... this is just a thread of emails. The closest you can 
get is to clearly indicate what solution worked for you so that people 
following along now it in the archives later know how your question was 
answered. 
-- 
Sent from my phone. Please excuse my brevity.

On May 30, 2017 9:24:45 PM PDT, Vijaya Kumar Regati 
 wrote:
>Thanks very much.
>
>Can someone suggest me how I can close this qn, since I have the
>solution now ?
>
>
>With Regards,
>Vijaya Kumar Regati
>Technical Lead, M3bi India Private Ltd
>Work: 040-67064732
>
>
>From: David L Carlson 
>Sent: Wednesday, May 31, 2017 3:35:19 AM
>To: Vijaya Kumar Regati; Manjusha Joshi
>Cc: r-help@R-project.org; vijaykr@gmail.com
>Subject: RE: [R] Need Help - R Programming - Using iteration value to
>change field names for processing for every iteraion
>
>Refer to columns by position rather than name and everything is
>simpler:
>
>for (i in 2:4 ) {
>test[, i] <- test[, i] + test[, i-1]
>}
>
>Note your approach fails on the first line since you start with i=1 and
>there is no Day0. Another approach that is simpler:
>
>t(apply(test, 1, cumsum))
>
>
>David L. Carlson
>Department of Anthropology
>Texas A University
>
>-Original Message-
>From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Vijaya
>Kumar Regati
>Sent: Tuesday, May 30, 2017 3:44 AM
>To: Manjusha Joshi 
>Cc: r-help@R-project.org; vijaykr@gmail.com
>Subject: Re: [R] Need Help - R Programming - Using iteration value to
>change field names for processing for every iteraion
>
>Hi Manjusha,
>
>
>Thank you for the response. That surely helps.
>
>
>But the major issue in my case is not how we can apply sum fn, but how
>we can  change field names based on iteration number.
>
>I cant skip loop in my case, because in real situation I have to deal
>with say around 100 fields, the only thing that changes is Day number
>in field name and the iteration number should be able to handle that.
>
>
>With Regards,
>Vijaya Kumar Regati
>Technical Lead, M3bi India Private Ltd
>Work: 040-67064732
>
>
>From: Manjusha Joshi 
>Sent: Tuesday, May 30, 2017 1:42:10 PM
>To: Vijaya Kumar Regati
>Cc: r-help@R-project.org; vijaykr@gmail.com
>Subject: Re: [R] Need Help - R Programming - Using iteration value to
>change field names for processing for every iteraion
>
>Hello Vijaya,
>
>On Tue, May 30, 2017 at 12:32 PM, Vijaya Kumar Regati
>>
>wrote:
>Hi,
>
>I am new to R programming, I am trying to work on below requirement.
>But could not achieve desired result.
>Appreciate if someone can help me on this :
>
>test dataframe :
>  Day1.balc Day2.balc Day3.balc Day4.balc
>x   100203040
>y   100101010
>> class(test)
>[1] "data.frame"
>
>My Goal is to accomplish :
>Day2.balc <- Day2.balc + Day1.balc
>Day3.balc <- Day3.balc + Day2.balc
>.
>.
>.
>Day30.balc <- Day30.balc + Day29.balc
>
># Testing for first 4 days
>for (i in 1:4 ) {
>test$Day[i].balc <- test$Day[i].balc + test$Day[i-1].balc
>}
>
>I identified the line I have written inside the loop is not the correct
>one, can someone help me how I can use iteration value(i), for every
>iteration, as a basis for changing field names since field consists of
>1,2,3... for each different day( Day1.balc Day2.balc Day3.balc
>Day4.balc etc.,).
>
>​
>​There are many built in functions in R which will help to avoid loops.
>Try 'cumsum' to add entries in a row to get cumulative sum. Use 'apply'
>to avoid loops.
>
>df is the dataframe in which your data has been stored.
>
>t(apply,df,1,cumsum)
>
>will give you the required results.
>Please check help of  'apply' for more details.
>Best wishes,
>
>
>
>​
>
>​
>
>__
>R-help@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.
>
>
>
>--
>Manjusha S. Joshi
>Mobile:  09822 319328
>Pune, India
>blog:http://manjushajoshi.wordpress.com/
>
>
>Disclaimer: IMPORTANT NOTICE: This e-mail (including any attachments)
>are confidential, may contain proprietary or privileged information and
>is intended for the named recipient(s) only. If you are not the
>intended recipient, any disclosures, use, review, distribution,
>printing or copying of the information contained in this e-mail message
>and/or attachments to it are strictly prohibited. If you have received
>this email in error, please notify the sender by return e-mail or
>telephone immediately and permanently delete the message and any
>attachments.
>
>[[alternative HTML version deleted]]
>

[R] deviance in GLM vs. summary.glm

2017-05-31 Thread array chip via R-help
Hi, I am running a logistic regression on a simple dataset (attached) using glm:
> dat<-read.table("dat.txt",sep='\t',header=T)
If I use summary() on a logistic model:
> summary(glm(y~x1*x2,dat,family='binomial'))
Coefficients:            Estimate Std. Error z value Pr(>|z|)(Intercept)    
19.57    5377.01   0.004    0.997x1            -18.59    5377.01  -0.003    
0.997x2B           -19.57    5377.01  -0.004    0.997x1:x2B         38.15    
7604.24   0.005    0.996
As you can see, the interaction term is very insignificant (p = 0.996)!
But if I use a anova() to compare a full vs reduced model to evaluate the 
interaction term:
> anova(glm(y~x1+x2,dat,family='binomial'), 
> glm(y~x1*x2,dat,family='binomial'))Analysis of Deviance Table
Model 1: y ~ x1 + x2Model 2: y ~ x1 * x2  Resid. Df Resid. Dev Df Deviance1     
   22     27.067            2        21     21.209  1   5.8579
This follows a chi-square distribution with 1 df, so the corresponding p value 
is:
> 1-pchisq(5.8679,1)[1] 0.01541944
So I get very different p value on the interaction term, can someone share 
what's going wrong here?
Thanks!
Yi

"y" "x1""x2"
"R" 1   "B"
"NR"1   "A"
"R" 0   "B"
"R" 1   "B"
"R" 1   "A"
"R" 1   "A"
"R" 0   "A"
"R" 1   "A"
"R" 0   "B"
"R" 0   "B"
"NR"0   "B"
"NR"0   "B"
"R" 1   "A"
"R" 1   "A"
"NR"1   "A"
"R" 0   "A"
"R" 0   "A"
"NR"0   "B"
"R" 0   "A"
"R" 1   "A"
"NR"1   "A"
"R" 1   "B"
"R" 1   "A"
"R" 1   "B"
"R" 1   "A"
__
R-help@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.

Re: [R] seek non-black box alternative to randomForest

2017-05-31 Thread Don McKenzie
Though off-topic for this list, your question (complaint?) comes up a lot in 
discussions of analytical methods, and has generated hundreds of papers (Google 
is your friend here).
You can start with

https://www.quora.com/What-are-the-pros-and-cons-of-GLM-vs-Random-forest-vs-SVM 


for some of the controversies.  It looks to me as if your editor stated 
(poorly) the problem that some models that are good at pattern-matching (RF) 
are less useful for predicting new observations.

Others n the list who are more erudite than I may choose to comment, amplify, 
or refute...


> On May 30, 2017, at 11:54 AM, Barry King  wrote:
> 
> I've recently had a research manuscript rejected by an editor. The
> manuscript showed
> that for a real life data set, random forest outperformed multiple linear
> regression
> with respect to predicting the target variable. The editor's objection was
> that
> random forest is a black box where the random assignment of features to
> trees was
> intractable. I need to find an alternative method to random forest that
> does not
> suffer from the black box label. Any suggestions? Would caret::treebag be
> free of
> random assignment of features? Your assistance is appreciated.
> 
> --
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@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.



__
R-help@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.


Re: [R] Need Help - R Programming - Using iteration value to change field names for processing for every iteraion

2017-05-31 Thread Vijaya Kumar Regati
Thanks very much.

Can someone suggest me how I can close this qn, since I have the solution now ?


With Regards,
Vijaya Kumar Regati
Technical Lead, M3bi India Private Ltd
Work: 040-67064732


From: David L Carlson 
Sent: Wednesday, May 31, 2017 3:35:19 AM
To: Vijaya Kumar Regati; Manjusha Joshi
Cc: r-help@R-project.org; vijaykr@gmail.com
Subject: RE: [R] Need Help - R Programming - Using iteration value to change 
field names for processing for every iteraion

Refer to columns by position rather than name and everything is simpler:

for (i in 2:4 ) {
test[, i] <- test[, i] + test[, i-1]
}

Note your approach fails on the first line since you start with i=1 and there 
is no Day0. Another approach that is simpler:

t(apply(test, 1, cumsum))


David L. Carlson
Department of Anthropology
Texas A University

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Vijaya Kumar 
Regati
Sent: Tuesday, May 30, 2017 3:44 AM
To: Manjusha Joshi 
Cc: r-help@R-project.org; vijaykr@gmail.com
Subject: Re: [R] Need Help - R Programming - Using iteration value to change 
field names for processing for every iteraion

Hi Manjusha,


Thank you for the response. That surely helps.


But the major issue in my case is not how we can apply sum fn, but how we can  
change field names based on iteration number.

I cant skip loop in my case, because in real situation I have to deal with say 
around 100 fields, the only thing that changes is Day number in field name and 
the iteration number should be able to handle that.


With Regards,
Vijaya Kumar Regati
Technical Lead, M3bi India Private Ltd
Work: 040-67064732


From: Manjusha Joshi 
Sent: Tuesday, May 30, 2017 1:42:10 PM
To: Vijaya Kumar Regati
Cc: r-help@R-project.org; vijaykr@gmail.com
Subject: Re: [R] Need Help - R Programming - Using iteration value to change 
field names for processing for every iteraion

Hello Vijaya,

On Tue, May 30, 2017 at 12:32 PM, Vijaya Kumar Regati 
> wrote:
Hi,

I am new to R programming, I am trying to work on below requirement. But could 
not achieve desired result.
Appreciate if someone can help me on this :

test dataframe :
  Day1.balc Day2.balc Day3.balc Day4.balc
x   100203040
y   100101010
> class(test)
[1] "data.frame"

My Goal is to accomplish :
Day2.balc <- Day2.balc + Day1.balc
Day3.balc <- Day3.balc + Day2.balc
.
.
.
Day30.balc <- Day30.balc + Day29.balc

# Testing for first 4 days
for (i in 1:4 ) {
test$Day[i].balc <- test$Day[i].balc + test$Day[i-1].balc
}

I identified the line I have written inside the loop is not the correct one, 
can someone help me how I can use iteration value(i), for every iteration, as a 
basis for changing field names since field consists of 1,2,3... for each 
different day( Day1.balc Day2.balc Day3.balc Day4.balc etc.,).

​
​There are many built in functions in R which will help to avoid loops.
Try 'cumsum' to add entries in a row to get cumulative sum. Use 'apply' to 
avoid loops.

df is the dataframe in which your data has been stored.

t(apply,df,1,cumsum)

will give you the required results.
Please check help of  'apply' for more details.
Best wishes,



​

​

__
R-help@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.



--
Manjusha S. Joshi
Mobile:  09822 319328
Pune, India
blog:http://manjushajoshi.wordpress.com/


Disclaimer: IMPORTANT NOTICE: This e-mail (including any attachments) are 
confidential, may contain proprietary or privileged information and is intended 
for the named recipient(s) only. If you are not the intended recipient, any 
disclosures, use, review, distribution, printing or copying of the information 
contained in this e-mail message and/or attachments to it are strictly 
prohibited. If you have received this email in error, please notify the sender 
by return e-mail or telephone immediately and permanently delete the message 
and any attachments.

[[alternative HTML version deleted]]

__
R-help@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.
Disclaimer: IMPORTANT NOTICE: This e-mail (including any attachments) are 
confidential, may contain proprietary or privileged information and is intended 
for the named recipient(s) only. If you are not the