Re: [R] questions on adding reference line?

2006-11-19 Thread Prof Brian Ripley
Your example is incomplete (what is x?), but axis(1, at=0.5) may be what you are looking for. On Sun, 19 Nov 2006, zhijie zhang wrote: Dear Ruser, I use abline() function to add the reference line successfully, but i can't display the values corresponding to the reference line on the x/y

Re: [R] Files in EViews format

2006-11-19 Thread John C Frain
As far as I know official details of the EVIEWS data format are not available. Allin Cottrell (of GRETL fame) has done some reverse engineering on the format and details are available on http://www.ecn.wfu.edu/~cottrell/eviews_format/ . You will need some programming knowledge to implement this

[R] improving barplot output

2006-11-19 Thread Bob Green
Hello, I was hoping for some advice on improving a barplot. Below is the syntax I have used. I wanted to do two things differently How would I alter the syntax so that (a) the y-axis finishes at 25 and not 20, and (b) 'past ideation' and 'pastwk ideation' are coloured blue and 'past attempt'

Re: [R] stl and the relative scale data-seasonal

2006-11-19 Thread Spencer Graves
I'm not sure I understand what you want. However, I will suppose I wanted essentially the same image as plot(stl..) but with individual control over ylim for each of the 4 plots. In that case, I might make a local copy of the actual plot function using 'getAnywhere(plot.stl)' and

Re: [R] improving barplot output

2006-11-19 Thread Johan Sandblom
Sorry, that should be barplot(summarizedData,ylab=Percentage,col=c(dark blue,dark red), ylim=c(0,25)) 2006/11/19, Johan Sandblom [EMAIL PROTECTED]: 2006/11/19, Bob Green [EMAIL PROTECTED]: Hello, I was hoping for some advice on improving a barplot. Below is the syntax I have used. I

Re: [R] improving barplot output

2006-11-19 Thread Johan Sandblom
2006/11/19, Bob Green [EMAIL PROTECTED]: Hello, I was hoping for some advice on improving a barplot. Below is the syntax I have used. I wanted to do two things differently How would I alter the syntax so that (a) the y-axis finishes at 25 and not 20, and (b) 'past ideation' and 'pastwk

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Checkout the INSTALLATION - UNIX and TROUBLESHOOTING sections of the home page: http://code.google.com/p/ryacas/ I have just installed the package Ryacas, but getting the following: library(Ryacas) Loading required package: XML

Re: [R] improving barplot output

2006-11-19 Thread Chuck Cleland
Bob Green wrote: Hello, I was hoping for some advice on improving a barplot. Below is the syntax I have used. I wanted to do two things differently How would I alter the syntax so that (a) the y-axis finishes at 25 and not 20, and (b) 'past ideation' and 'pastwk ideation' are coloured

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
You might try posting your problem on the comp.os.linux.networking group since it appears to be a configuration problem with telnet on your machine. If all else fails, you can try using the system method of connecting to Ryacas discussed on the Ryacas home page.That is not ideal since it will

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: You might try posting your problem on the comp.os.linux.networking group since it appears to be a configuration problem with telnet on your machine. Thanks, Gabor. I am going to do that and I will let you know about the result. Paul

[R] posterior probability formula in predict.lda

2006-11-19 Thread Wade Wall
IHi all, have a dataset with rows as plots and environmental data as columns. I have predicted the values using the following ed.pred-predict(lda.ed,ed) #lda.ed the model, ed the env. variables used for the prediction plots I am wanting to know the formula used by predict.lda for calculating

Re: [R] Ryacas not working properly

2006-11-19 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: You might try posting your problem on the comp.os.linux.networking group since it appears to be a configuration problem with telnet on your machine. Thanks, Gabor. I am going to do that and I

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 19 Nov 2006 16:11:52 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Paul Smith [EMAIL PROTECTED] writes: On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: You might try posting your problem on the comp.os.linux.networking group since it appears to be a configuration problem

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
Sorry but there is not much else I can tell you. I don't have a UNIX system myself though I do know that others have used Ryacas on UNIX since the notes on the home page are based, in part, on their feedback of successfully using it on UNIX. I don't know if the responder is correct since one

[R] nlme

2006-11-19 Thread Fluss
Hello! I am trying to fit a mixed non-linear model using nlme. How can I constrain the fixed parameter space (add bounds) as in nls. Thank you Ronen [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Sorry but there is not much else I can tell you. I don't have a UNIX system myself though I do know that others have used Ryacas on UNIX since the notes on the home page are based, in part, on their feedback of successfully using it on

Re: [R] nlme

2006-11-19 Thread Douglas Bates
On 11/19/06, Fluss [EMAIL PROTECTED] wrote: Hello! I am trying to fit a mixed non-linear model using nlme. How can I constrain the fixed parameter space (add bounds) as in nls. By rewriting the nlme function, an option I wouldn't recommend. :-) __

[R] matching coordinates

2006-11-19 Thread sethlatimer
I am trying to implement the so called pivot algorithm for a markov chain monte carlo simulation of self avoiding random walks. There must be a simple method of checking to see if the pivoted portion of the random walk intersects with the previous section? In other words I have a list of

Re: [R] nlme

2006-11-19 Thread Spencer Graves
A more sensible option in my experience would be to transform the parameter space to send the boundaries to +/-Inf. Suggested reading for 'nlme' includes Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer) and Bates and Watts (1988) Nonlinear Regression Analysis

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
On 11/19/06, Paul Smith [EMAIL PROTECTED] wrote: On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Sorry but there is not much else I can tell you. I don't have a UNIX system myself though I do know that others have used Ryacas on UNIX since the notes on the home page are based, in

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Sorry but there is not much else I can tell you. I don't have a UNIX system myself though I do know that others have used Ryacas on UNIX since the notes on the home page are based, in part, on their feedback of successfully

[R] The most common row in a matrix?

2006-11-19 Thread kone
Hi, How do you get the most common row from a matrix? If I have a matrix like this array(1:3,dim=c(4,5)) [,1] [,2] [,3] [,4] [,5] [1,]12312 [2,]23123 [3,]31231 [4,]12312 in which rows 1 and 4 are similar, I

Re: [R] Need help in nlmeODE

2006-11-19 Thread Spencer Graves
I've never used nlmeODE, but this post is almost 3 days old, so I'll offer some comments. I didn't see an example in the 'nlmeODE' help file, but I did find a reference to 'PKPDmodels', and the help file for 'PKPDmodels' includes several examples. Have you worked through those? If you

[R] problems with axis

2006-11-19 Thread nelson -
hi list! i'm plotting a probit plot .On x axis i have value of a statistical variable. on y axis the corresponding normalized representation. I have this code plot(vals,perc,axes=F,col=red,pch=19,cex=0.25) probit.scale.values -

Re: [R] matching coordinates

2006-11-19 Thread Don MacQueen
If the pivoted portion and the previous section can be viewed as sets of line segments, there is a function in one of the spatial packages that tests for intersections between sets of line segments. crossing.psp() in spatstat if I remember correctly. -Don At 10:26 AM -0800 11/19/06,

Re: [R] The most common row in a matrix?

2006-11-19 Thread Dimitrios Rizopoulos
try this: mat - array(1:3, dim = c(4, 5)) # ind - table(apply(mat, 1, paste, collapse = /)) ind - which.max(ind) as.numeric(strsplit(names(ind), /)[[1]]) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic

Re: [R] The most common row in a matrix?

2006-11-19 Thread Gabor Grothendieck
Try this: a - matrix(1:3, 4, 5) a.ag - aggregate(1:nrow(a), as.data.frame(a), length) a.ag[which.max(a.ag$x), 1:ncol(a)] On 11/19/06, kone [EMAIL PROTECTED] wrote: Hi, How do you get the most common row from a matrix? If I have a matrix like this array(1:3,dim=c(4,5)) [,1] [,2]

[R] Speeding up small functions

2006-11-19 Thread Wee-Jin Goh
Greetings list, In my code, I have a few small functions that are called very very frequently. An example of one such function is the following : sigmoid-function(x) 1/(1+exp(-x)) Now, is there anyway to make this go faster? For example, in C++ we could make it inline. Is there a

Re: [R] deriv when one term is indexed

2006-11-19 Thread Spencer Graves
You ask whether there would be a way to adapt the deriv and deriv3 functions to deal with formulas that have an indexed term, effectively allowing differentiation with respect to a vector. As Simon Blomberg famously said, This is R. There is no if. Only how.(*) The implementation,

Re: [R] Speeding up small functions

2006-11-19 Thread Gabor Grothendieck
Try a test in which you replace the function calls with inline code and compare the two speed-wise. You may very well find that the difference is inconsequential. On 11/19/06, Wee-Jin Goh [EMAIL PROTECTED] wrote: Greetings list, In my code, I have a few small functions that are called very

Re: [R] deriv when one term is indexed

2006-11-19 Thread Ken Knoblauch
I have found a way to approach the question that I posed, that is having deriv and deriv3 deal with an indexed term in the formula. Unless, there is a more direct approach (and my minimal investigation of the code involved suggested that it would not be simple to implement, for me at least), this

Re: [R] Ryacas not working properly

2006-11-19 Thread Marc Schwartz
OK, after digging around for a couple of hours on this, thinking that this might be a firewall/SELinux/On Demand Services problem, I have, I think, nailed it down to two key things on FC6: 1. It requires the use of the '--enable-server' configure option for yacas itself. 2. There is a directory

Re: [R] The most common row in a matrix?

2006-11-19 Thread Atte Tenkanen
Hi Gabor, Your version works with the small sample matrix but I didn't get it to work with a larger 675x8 -matrix. I don't know why. I don't know the command aggregate if there is something. I got this one from Peter Alspach which.max(table(paste(data.frame(t(MATRIX)), sep=','))) and it seems

Re: [R] deriv when one term is indexed

2006-11-19 Thread Ken Knoblauch
A slight glitch got-in during the copy and past. The part below that says, ms.curv(dd.nls.d4) Parameter effects: c^theta x sqrt(F) = 0.0123 Intrinsic: c^iota x sqrt(F) = 0.0068 should read, rms.curv(dd.nls.d4) Parameter effects: c^theta x sqrt(F) = 0.0123 Intrinsic: c^iota x

Re: [R] Speeding up small functions

2006-11-19 Thread Christos Hatzis
Wee-Jin, The other option that you have is to set up your function as an expression and then evaluate the expression for each new value of x. This might be faster in some cases. sigmoid.fun - function(x) 1/(1+exp(-x)) sigmoid.expr - expression( 1/(1+exp(-x)) ) x - runif(10^6) # non-vectorized

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
Thanks, Marc. I have placed a link to your post on the Ryacas home page. Also, Ryacas 0.2-3 is now on Omegahat (as well as google groups). On 11/19/06, Marc Schwartz [EMAIL PROTECTED] wrote: OK, after digging around for a couple of hours on this, thinking that this might be a

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Marc Schwartz [EMAIL PROTECTED] wrote: OK, after digging around for a couple of hours on this, thinking that this might be a firewall/SELinux/On Demand Services problem, I have, I think, nailed it down to two key things on FC6: 1. It requires the use of the '--enable-server'

Re: [R] Ryacas not working properly

2006-11-19 Thread Paul Smith
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Thanks, Marc. I have placed a link to your post on the Ryacas home page. Also, Ryacas 0.2-3 is now on Omegahat (as well as google groups). Apparently, the link HowTo - Enable Telnet on Linux at Ryacas site is misleading, as it suggests

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
I don't have a UNIX box but my reading of it is that it is telling one how to enable telnet on the machine -- not how to install a server -- and that once telnet is enabled then the Ryacas package can make use of sockets whereas without that such use of sockets is disabled. Is that not right? On

Re: [R] Ryacas not working properly

2006-11-19 Thread Gabor Grothendieck
I had an offline discussion with the Debian user and he indicated that the yacas invocation string was his problem and not telnet at all so I will remove that HowTo as it is indeed misleading. On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: I don't have a UNIX box but my reading of it

Re: [R] Ryacas not working properly

2006-11-19 Thread Marc Schwartz
Gabor, From what I can tell, telnet service is not actually required to run yacas. This is what confused me for some time and what raised the spectre of the concerns that had I for yacas to be dependent on telnet, as opposed to say ssh. On FC6 (and I suspect many other distros), telnet (plus or