[R] Maximum length for a -e argument to Rscript?

2017-04-21 Thread Ben Haller
Hi! I’m attempting to use Rscript to do some automated plotting. It is working well, except that I seem to be running into a maximum line length issue, and I’m wondering if it is a bug on your end. Here’s an example of the command I’m trying to run: /usr/local/bin/Rscript -e '{x <- c(-1.31

Re: [R] Maximum length for a -e argument to Rscript?

2017-04-21 Thread Ben Haller
> /Henrik > > On Fri, Apr 21, 2017 at 11:07 AM, Ben Tupper wrote: >> Hi, >> >> I suspect you are over the 10kb limit for the expression. See >> >> https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line >> >

[R] Confidence intervals and polynomial fits

2011-05-06 Thread Ben Haller
eems to be quite uncommon, so I've had trouble finding out how others have dealt with these sorts of issues that crop up only with higher powers. Ben Haller McGill University http://biology.mcgill.ca/grad/ben/ __ R-help@r-project.org mailing list ht

Re: [R] Confidence intervals and polynomial fits

2011-05-06 Thread Ben Haller
; > x_qt <- x^4 # shorter code-wise > and you can certain just enter a quartic term if the data is just > quartic and you are not really itnerested in the lower trends. Yep, for sure. Thanks! Ben Haller McGill University http://biology.mcgill.ca/grad/ben/ ___

Re: [R] Confidence intervals and polynomial fits

2011-05-06 Thread Ben Haller
On May 6, 2011, at 12:31 PM, David Winsemius wrote: > On May 6, 2011, at 11:35 AM, Ben Haller wrote: > >> Hi all! I'm getting a model fit from glm() (a binary logistic regression >> fit, but I don't think that's important) for a formula that contains powers

Re: [R] Confidence intervals and polynomial fits

2011-05-06 Thread Ben Haller
em easy to post an example, since my dataset is so large, but if either of you would be willing to look at this further, I could upload my dataset to a web server somewhere and post a link to it. In any case, thanks very much for your help; I'll look into the things you mentioned. Ben Halle

Re: [R] Confidence intervals and polynomial fits

2011-05-07 Thread Ben Haller
On May 6, 2011, at 4:27 PM, David Winsemius wrote: > On May 6, 2011, at 4:16 PM, Ben Haller wrote: >> > >> As for correlated coefficients: x, x^2, x^3 etc. would obviously be highly >> correlated, for values close to zero. > > Not just for x close to zero: &g

[R] Questions regrading the lasso and glmnet

2011-05-28 Thread Ben Haller
ry small coefficients? Or should I use the lasso, and just ignore, in my explanation of the model, terms with tiny coefficients? Or is there some other way of handling this problem? Thanks to anybody who has even read this far, and many many thanks to any responses! Ben Haller McGill University

[R] gam() (in mgcv) with multiple interactions

2011-06-07 Thread Ben Haller
te(slope, curvature) + te(slope, amplitude) + te(curvature, amplitude) + te(acl, dispersal) + te(amplitude, dispersal) + te(slope, curvature, amplitude), family=binomial, data=rla, method="REML") So. Any advice? How can I correctly do a gam() fit involving multiple inte

Re: [R] gam() (in mgcv) with multiple interactions

2011-06-10 Thread Ben Haller
think of ANOVA as involving discrete levels (factors) in the independent variables, like treatment groups. My independent variables are all continuous, so I would not have thought of this as ANOVA. Anyhow, OK. I will go get that book today, and see if I can figure all this out. Thanks for

[R] error in optim, within polr(): "initial value in 'vmmin' is not finite"

2011-02-16 Thread Ben Haller
arched Google and the R lists for information about this error, and while I did find a couple of other people asking about it, I didn't find any advice about what to do about it that I can apply to my situation. I'd be happy to share my dataset with anyone willing to help me on this,

[R] Evaluating model fits for ordinal multinomial regressions with polr()

2011-02-16 Thread Ben Haller
r the package (MASS) that defines polr(), but haven't discovered anything. Thanks! Ben Haller McGill University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

Re: [R] multi process support in R

2011-02-17 Thread Ben Haller
On Feb 17, 2011, at 11:40 AM, Alaios wrote: > ...Is it possible to split work in many cores in R and if yes how is this > library called? I'd recommend the "mclapply" function in the "multicore" package. The only drawback is that you can't run your code i

Re: [R] error in optim, within polr(): "initial value in 'vmmin' is not finite"

2011-02-18 Thread Ben Haller
quite nicely. Just in case anybody cares. :-> Ben Haller McGill University On Feb 16, 2011, at 5:41 PM, Ben Haller wrote: > Hi all. I'm just starting to explore ordinal multinomial regression. My > dataset is 300,000 rows, with an outcome (ordinal factor from 1 to 9) and

Re: [R] SPDEP Package, neighbours list for Moran's I on large grid dataset

2011-04-20 Thread Ben Haller
always interested in learning how to do things better. And of course this code is provided without warranty, may have bugs, etc. Enjoy! Ben Haller McGill University correlation_stats <- function(p, n_pairs=20) { # Compute Moran's I and Geary's C for the landscape p. T

Re: [R] SPDEP Package, neighbours list for Moran's I on large grid dataset

2011-04-22 Thread Ben Haller
looking at only points within a smaller window risks getting a value that is not representative of the larger context. But if it makes sense to you in your application, then more power to you. :-> Ben Haller McGill University __ R-help@r-project