[R] R: use switch or function in connecting different cases.

2016-04-24 Thread tan sj
HI, I am trying to use switch () function to connect the three distribution (normal ,gamma with equal skewness and gamma with unequal skewness. But i am losing my ideas since i have sample sizes-(10,10),(10,25),(25,25),(25,50),(25,100),50,25),(50,100), (100,25),(100,100) standard deviation

Re: [R] R [coding : do not run for every row ]

2016-04-18 Thread tan sj
inbo.be> Sent: Monday, April 18, 2016 10:03 AM To: tan sj; r-help@r-project.org Subject: Re: [R] R [coding : do not run for every row ] Always keep the mailing list in cc. The code runs for each row in the data. However I get the feeling that there is a mismatch between what you think tha

Re: [R] R [coding : do not run for every row ]

2016-04-18 Thread tan sj
he combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey 2016-04-17 19:59 GMT+02:00 tan sj <sj_style_1...@outlook.com>: > i have combined all the variables in a matrix, and i wish to

[R] R [coding : do not run for every row ]

2016-04-17 Thread tan sj
i have combined all the variables in a matrix, and i wish to conduct a simulation row by row. But i found out the code only works for the every first row after a cycle of nine samples. But after check out the code, i don know where is my mistake... can anyone pls help #For gamma

[R] R [loop statement ]

2016-04-15 Thread tan sj
hi, i am new in this field. I am now writing a code in robustness simulation study. I have written a brief code "for loop" for the factor (samples sizes d,std deviation ) , i wish to test them in gamma distribution with equal and unequal skewness, with the above for loop in a single code if

[R] [R ] help in if else in connect the simulation in normal and gamma distribution.

2016-04-07 Thread tan sj
I am new in R. I have to conduct simulation study on the robustness of 2 sample tests on several combination of factors (sample sizes ,variance and distribution). I have been completed write a code in normal distribution, and now i wish to add if -else in the code so that the code can

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-06 Thread tan sj
you an idea of how to index elements of vectors. You could also use a matrix and then convert it into a vector using as.vector: testmat3<-matrix(0,nrow=5,ncol=5) for(i in 1:5) { for(j in 1:5) { testmat3[i,j]<-i+j } } as.vector(testmat3) Jim On Wed, Apr 6, 2016 at 8:04 PM, tan sj <sj_st

[R] R simulation help pls

2016-04-06 Thread tan sj
Hi, i am student from malaysia, i am new in r programming field, now i am trying to conduct a robustness study on 2 sample test under several combination of factors such as sample sizes ,standard deviation ratio and also distribution.. but now i am stucking in how to use for loop or apply

[R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-04 Thread tan sj
hi, i am new in this field. do favorite If I wish to conduct a simulation on the robustness of two sample test by using R language, is that any ways in writing the code? There