[R] Integrate function in R

2009-06-10 Thread Bhargab Chattopadhyay
Hi! Can anyone please let me know what numerical integration procedure does the integrate function in package stats follow? Thank you in advance Shant [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://

[R] Setting a contingency table

2009-01-10 Thread Bhargab Chattopadhyay
Hi, I want to set a make a contingency table which will look like this.. The problem is that I can't  set the table like the following. col1 col2   Total     row1  a b n10 rp1   rp2    100    

[R] Applying 'lm' in each group

2009-01-10 Thread Bhargab Chattopadhyay
Hi,  I want to do regression in each group. I made the group the following way. Now I want to run regression in each of the three groups.. Suppose , x<-c(0.5578196,6.5411662,13.2728619,2.0217271,6.7216176,3.37220617,2.5773252,7.2600583,15.3731026,3.4140288,8.1335874,     15..6476637,4.3014084,

[R] Matrix: Problem with the code

2009-01-09 Thread Bhargab Chattopadhyay
Hi, Can any one please explain why the following code doesn't work? Or can anyone suggest an alternative. Suppose   x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)    mat<-0;    for(j in 1:length(x))    {      for(i in 1:p)      mat[i,j]<-x[j]^i;    }    A