Re: [R] Function for testing

2012-06-21 Thread R. Michael Weylandt
Hi, this has the distinctive sound of homework, so I hesitate to give too much help, but two things I note immediately. In defining resx / resy (good preallocation!) you probably mean "n" instead of "N". A standard way to check how often a condition occurs is something like: x <- rnorm(50) mean

[R] Function for testing

2012-06-21 Thread a.b.carter
Hi all, I want to create a sample called x, with length 10 from a N(0,1) distribution. Next to that I want to create a sample called y, with length 10 from a N(0.5 ,1) distribution. Both samples are undergoing a t.test. The outcome must be that I can see how many times for x H0 was rejected. The s