[R] bug in closing gzfile-opened connections?

2007-07-03 Thread David Reiss
Hi, I am making multiple calls to gzfile() via read.table(), e.g. x - read.table( gzfile( xxx.gz ) ) After i do this many times (I haven't counted, but probably between 50 and 100 times) I get the error message: Error in open.connection(file, r) : unable to open connection In addition: Warning

[R] Function to do multiple named lookups faster?

2007-02-27 Thread David Reiss
Hi, I apologize if this topic has been discussed - I could not figure out a good search phrase for this question. I have a named vector x, with multiple (duplicate) names, and I would like to obtain a (shorter) vector with non-duplicate names in which the values are the means of the values of the

[R] has anyone implemented LARS with the positive lasso?

2007-01-06 Thread David Reiss
Hi, I am interested in a modification to LARS that allows for positive-only constraints in the variables (with details about how to implement this as described in section 3.4 of the Efron et al (2003) LARS paper). Before I dive into the lars package code myself, I was wondering if anyone knew of

[R] saving (and loading) environment to/from a connection?

2006-11-14 Thread David Reiss
Hi, I apologize if this is an FAQ but I could not find references to it anywhere. I am trying to send the entire environment from one R session to another (on a remote machine) using socketConnections. However, I cannot get around this error: On host machine:

Re: [R] Fitting generalized additive models with constraints?

2006-09-05 Thread David Reiss
I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) + s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1) have to each always be 0. From the library documentation and a search of the R-site and R-help archives I have not been able to decipher whether

[R] Fitting generalized additive models with constraints?

2006-09-04 Thread David Reiss
Hello, I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) + s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1) have to each always be 0. From the library documentation and a search of the R-site and R-help archives I have not been able to decipher