Re: [R] problem with the assignment function

2005-11-05 Thread Patrick Burns
Since you are on Linux, I suggest that you use valgrind: http://www.valgrind.org/ Download it, build it, then do: R -d valgrind and run your function as usual. It is hard to emphasize enough how useful this is for tracking down problems in C code. When developing on Windows, it would often be

[R] Stochastic Volatility

2005-11-05 Thread Phineas Campbell
Has anybody implemented or tried to implement a stochastic volatility model using the Kalman filter following a series of papers by Harvey, Ruiz and Shepard? This is a sophisticated approach for estimating an important class of models, so I am surprised that no implementation exists, is this

[R] (no subject)

2005-11-05 Thread Erez
Hi I need an advise if any one can help me. i have mass of data in 2 array A and B: A = 0 1 0 0 1 1 0 0 B = 0 0 0 1 0 1 1 1 and i have 3 rules to merge them into 3rd array C: if A[i] + B[i] == 0 then C[i]=0 if A[i] + B[i] == 1 then C[i]=1 if A[i] + B[i] == 2 then C[i]=2 it looks easy but with

[R] Problem executing C code in R

2005-11-05 Thread Robert Roig
Hi!!! I have a problem... I have C functions that I wan execute from R. I'm using WindowsXP. I've compiled with gcc and then execute RCMD SHLIB qnorm.c. In this moment I've got qnorm.dll. In R console execute dyn.load(c:\\r\\rw2011\\src\\gnuwin32\\qnorm.dll) and message error don't appears. Then I

Re: [R] (no subject)

2005-11-05 Thread Ted Harding
On 01-Nov-05 Erez wrote: Hi I need an advise if any one can help me. i have mass of data in 2 array A and B: A = 0 1 0 0 1 1 0 0 B = 0 0 0 1 0 1 1 1 and i have 3 rules to merge them into 3rd array C: if A[i] + B[i] == 0 then C[i]=0 if A[i] + B[i] == 1 then C[i]=1 if A[i] + B[i] == 2

Re: [R] (no subject)

2005-11-05 Thread John Fox
Dear Erez, How about C - A + B ? Regards, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL

Re: [R] Adding Two Vectors (was: no subject)

2005-11-05 Thread Marc Schwartz
On Tue, 2005-11-01 at 12:39 +0200, Erez wrote: Hi I need an advise if any one can help me. i have mass of data in 2 array A and B: A = 0 1 0 0 1 1 0 0 B = 0 0 0 1 0 1 1 1 and i have 3 rules to merge them into 3rd array C: if A[i] + B[i] == 0 then C[i]=0 if A[i] + B[i] == 1 then C[i]=1

Re: [R] Hypatia?? [Was: Adding Two Vectors (was: no subject)]

2005-11-05 Thread Ted Harding
On 05-Nov-05 Marc Schwartz wrote: On Tue, 2005-11-01 at 12:39 +0200, Erez wrote: Hi I need an advise if any one can help me. i have mass of data in 2 array A and B: A = 0 1 0 0 1 1 0 0 B = 0 0 0 1 0 1 1 1 and i have 3 rules to merge them into 3rd array C: if A[i] + B[i] == 0 then C[i]=0

Re: [R] Hypatia?? [Was: Adding Two Vectors (was: no subject)]

2005-11-05 Thread Marc Schwartz
On Sat, 2005-11-05 at 15:15 +, Ted Harding wrote: On 05-Nov-05 Marc Schwartz wrote: On Tue, 2005-11-01 at 12:39 +0200, Erez wrote: Hi I need an advise if any one can help me. i have mass of data in 2 array A and B: A = 0 1 0 0 1 1 0 0 B = 0 0 0 1 0 1 1 1 and i have 3 rules

[R] nlme, predict.nlme, levels not allowed

2005-11-05 Thread Patrick Giraudoux
Dear listers, I am trying to fit a nlme model with age and pds as reals, and zone a factor with two levels Annaba and Boumalek . The best model found is the following: modm3 Nonlinear mixed-effects model fit by maximum likelihood Model: pds ~ Asym/(1 + exp((xmid - age)/scal)) Data:

[R] sort table

2005-11-05 Thread Claus Atzenbeck
Hi, I have a data frame named questions that I use to get a subset and then a table: failcondonly - subset(questions, errorreason==condition) failcondtab - table(failcondonly$type, failcondonly$qid, exclude=c(ORGA, skipped)) The failcondtab looks like this: 6 11 12 13 14 15 17 26 30

Re: [R] Hypatia?? [Was: Adding Two Vectors (was: no subject)]

2005-11-05 Thread Martin Maechler
Marc == Marc Schwartz [EMAIL PROTECTED] on Sat, 05 Nov 2005 09:20:40 -0600 writes: Marc On Sat, 2005-11-05 at 15:15 +, Ted Harding wrote: On 05-Nov-05 Marc Schwartz wrote: On Tue, 2005-11-01 at 12:39 +0200, Erez wrote: Hi [I did not see a reply to this. The date

Re: [R] Hypatia?? [Was: Adding Two Vectors (was: no subject)]

2005-11-05 Thread Marc Schwartz
On Sat, 2005-11-05 at 17:52 +0100, Martin Maechler wrote: Marc == Marc Schwartz [EMAIL PROTECTED] on Sat, 05 Nov 2005 09:20:40 -0600 writes: Marc On Sat, 2005-11-05 at 15:15 +, Ted Harding wrote: On 05-Nov-05 Marc Schwartz wrote: On Tue, 2005-11-01 at 12:39 +0200,

Re: [R] sort table

2005-11-05 Thread Marc Schwartz
On Sat, 2005-11-05 at 18:04 +0100, Claus Atzenbeck wrote: Hi, I have a data frame named questions that I use to get a subset and then a table: failcondonly - subset(questions, errorreason==condition) failcondtab - table(failcondonly$type, failcondonly$qid, exclude=c(ORGA, skipped))

Re: [R] sort table

2005-11-05 Thread Marc Schwartz
On Sat, 2005-11-05 at 11:44 -0600, Marc Schwartz wrote: On Sat, 2005-11-05 at 18:04 +0100, Claus Atzenbeck wrote: Hi, I have a data frame named questions that I use to get a subset and then a table: failcondonly - subset(questions, errorreason==condition) failcondtab -

[R] R CMD INSTALL --help crashes R for Windows

2005-11-05 Thread ¨Tariq Khan
Greetings, This is potentially a very simple question that arose as I am trying my best to learn how to compile dll's using SHLIB, and also finally how to compile packages from source (after being a windows user for 2 years it is about time). The question: I am trying to figure out why on my

[R] Goodness of fit tests

2005-11-05 Thread Patrick Ho
Hi, Is there any R or S-PLUS function/package that performs a goodness-of-fit test that takes censored (lifetime) data into account? I would like to test the goodness-of-fit of a fitted Cure model. Thanks, Patrick. -

Re: [R] Hypatia?? [Was: Adding Two Vectors (was: no subject)]

2005-11-05 Thread Martin Maechler
Marc == Marc Schwartz [EMAIL PROTECTED] on Sat, 05 Nov 2005 11:40:58 -0600 writes: Marc On Sat, 2005-11-05 at 17:52 +0100, Martin Maechler wrote: Marc Agreed. There were a couple of other delayed posts Marc that came through as well. Marc I

Re: [R] predictive interval in nlme

2005-11-05 Thread Spencer Graves
This is a difficult problem. After several false starts with RSiteSearch, I finally got 15 hits from 'RSiteSearch(predict lme with confidence)', including the following 3 which looked to me like they might help with your question:

[R] question about R code

2005-11-05 Thread Yuying Shi
Dear Sir/Madam, If I have matrics as follows: a - c(1,1,0,0) b - c(4,4,0,0) c - c(3,5,5,6) How can I use R code to solve the equation ax^2+bx+c=0. thanks! yuying shi [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

Re: [R] nlme Singularity in backsolve at level 0, block 1

2005-11-05 Thread Spencer Graves
RSiteSearch(Singularity in backsolve) produced 33 hits, the second of which was the following: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/62691.html This reply from Peter Dalgaard dates 8 Oct. 2005 asks, Which version of R and NLME? R 2.2.0 ships with a version where

[R] question about R code

2005-11-05 Thread Yuying Shi
Dear Sir/Madam, If I have matrics as follows: a - c(1,1,0,0) b - c(4,4,0,0) c - c(3,5,5,6) How can I use R code to solve the equation ax^2+bx+c=0. thanks! yuying shi [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

Re: [R] R CMD INSTALL --help crashes R for Windows

2005-11-05 Thread Prof Brian Ripley
On Sat, 5 Nov 2005, ¨Tariq Khan wrote: Greetings, This is potentially a very simple question that arose as I am trying my best to learn how to compile dll's using SHLIB, and also finally how to compile packages from source (after being a windows user for 2 years it is about time). The

Re: [R] question about R code

2005-11-05 Thread Ted Harding
On 05-Nov-05 Yuying Shi wrote: Dear Sir/Madam, If I have matrics as follows: a - c(1,1,0,0) b - c(4,4,0,0) c - c(3,5,5,6) How can I use R code to solve the equation ax^2+bx+c=0. thanks! yuying shi I'm not sure what your question really should be, but taking it at face value and not

Re: [R] problem in waveslim *package* ?

2005-11-05 Thread Martin Maechler
tom == tom wright [EMAIL PROTECTED] on Fri, 04 Nov 2005 09:37:24 -0500 writes: tom This code consistenly segfaults for me. Can someone tom please take a look and tell me if the problem is due to tom something I am doing or is there a problems with the tom dwt (idwt)

[R] Problem with installing home-made package under Windoze.

2005-11-05 Thread Rolf Turner
I am using/trying to use R 2.2.0. I have created a package of ``supplementary'' time series functions for use by my students in a time series course. The package involves only raw R code; no dynamic loading to complicate matters. I need to install this package in a location on a local area

Re: [R] Problem with installing home-made package under Windoze.

2005-11-05 Thread Marc Schwartz
On Sat, 2005-11-05 at 17:35 -0400, Rolf Turner wrote: I am using/trying to use R 2.2.0. I have created a package of ``supplementary'' time series functions for use by my students in a time series course. The package involves only raw R code; no dynamic loading to complicate matters. I need

Re: [R] Confidence Intervals for Mixed Effects

2005-11-05 Thread Spencer Graves
Are you familiar with intervals and lme in the nlme package? These are documented in Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer). I'm not familiar with the algorithm, but if it's different from Satterthwaite's method, I suspect that Prof. Bates had a

Re: [R] aov() and lme()

2005-11-05 Thread Spencer Graves
Have you solved this problem yet? If no, and if you would still like a solution, I suggest you try to develop a much simpler example that still produces results like this that you don't understand. Either use data that are already in a standard R library or are a Monte Carlo that a

Re: [R] syntax of nlme with nesting

2005-11-05 Thread Spencer Graves
If you have not yet solved this problem and are still interested in a solution, I have three suggestions: 1. Try to simplify the problem as much as possible. If this does not lead you to a solution to your problem, when you get an example that is completely self-contained

[R] R help

2005-11-05 Thread Yuying Shi
Dear Sir/Madam, My purpose is to write an R function to solve the quadratic equation ax2+bx+c=0. The input should be an array of a, b, and c from a data set a b c 1 4 3 1 4 5 0 2 5 0 0 6 The output with the possibility of complex roots and one root or no root should look like the following. A

[R] How can I assign an argument to transfer whether by ref or by value?

2005-11-05 Thread Xiaofan Li
Hello guys, I am wondering the default way of transferring arguments in R. Is it by value or by ref in default case, or could that be changed explicitly? Cheers, Xiaofan --- Xiaofan Li Department of Applied Mathematics and Theoretical Physics University of Cambridge

[R] dataTable manipulation in R

2005-11-05 Thread Xiaofan Li
Dear colleague, Is it able in R to manipulate data tables as in SQL-based databases? Is there any good method in R to locate a special subset of data rows, which satisfy a certain expression of restrictions (e.g. dataTable$peakValue 3.0)? Then if located, is it able for manipulations, for

Re: [R] How can I assign an argument to transfer whether by ref or by value?

2005-11-05 Thread Duncan Murdoch
Xiaofan Li wrote: Hello guys, I am wondering the default way of transferring arguments in R. Is it by value or by ref in default case, or could that be changed explicitly? R passes by value. It's worth reading the language definition manual to find out about the subtleties (e.g. lazy