Re: [R] Simulation from discrete uniform

2011-10-26 Thread BSanders
If you wanted a discrete uniform from 1-10 use: ceiling(10*runif(1)) if you wanted from 0-12, use: ceiling(13*runif(1))-1 -- View this message in context: http://r.789695.n4.nabble.com/Simulation-from-discrete-uniform-tp3434980p3939694.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] help with multi-objective program using lpSolve API

2011-08-17 Thread BSanders
I'd be interested in seeing a solution to this as well. How do you add in extra constraints for a transportation problem? All that is given in the lpsolve documentation is how to solve the most basic transportation problem. -- View this message in context: http://r.789695.n4.nabble.com/help-

Re: [R] lpSolve constraints don't seem to have an effect

2011-08-17 Thread BSanders
"2x^2 + 3y^2 <= 6" My guess is because lpsolve doesn't handle non linear programs. -- View this message in context: http://r.789695.n4.nabble.com/lpSolve-constraints-don-t-seem-to-have-an-effect-tp898253p3751751.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] autocorrelaltion function plots

2011-02-13 Thread BSanders
I believe it's actually 2/sqrt(n) where n is the sample size... Interesting.. -- View this message in context: http://r.789695.n4.nabble.com/autocorrelaltion-function-plots-tp3303966p3304490.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Newb Prediction Question using stepAIC and predict(), is R wrong?

2011-02-13 Thread BSanders
"So do not use '$' or '[..]' terms in model formulae - this is going to cause problems when it comes to predict, because your formula will not associate with the names it has in its formula in the new data frame. When you think about it, this is obvious. " I really don't understand why this is o

[R] Newb Prediction Question using stepAIC and predict(), is R wrong?

2011-02-09 Thread BSanders
I'm using stepAIC to fit a model. Then I'm trying to use that model to predict future happenings. My first few variables are labeled as their column. (Is this a problem?) The dataframe that I use to build the model is the same as the data I'm using to predict with. Here is a portion of what is

Re: [R] How to Plot Two Curves Into One Page

2011-01-31 Thread BSanders
abline() or lines() -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250568.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.e

Re: [R] How to Plot Two Curves Into One Page

2011-01-31 Thread BSanders
par(mfrow=c(3,2)) ## will get you 3 rows and 2 columns -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250567.html Sent from the R help mailing list archive at Nabble.com. __ R-h

[R] How can I index multiple linear models? (Without getting a warning.)

2011-01-31 Thread BSanders
My code looks like this: lin = NA for(i in 1:15){ lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) } For which I'm given 15 warning messages which say : "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : number of items to replace is not a multiple of replacement length" I'm am abl

[R] Newb Question : How do I load the Rsymphony Library, and How do I get Symphony Running on my windows Vista?

2011-01-23 Thread BSanders
Hi, I'm new to R, and at this phase, I don't really even know how to learn how to use R. I want to use R and Symphony together. CAn I use Symphony on a windows based machine? I downloaded Symphony 5.2.0, and when I hit to install it, I'm getting an error that I can't get past. "Bad end of cen