[R] Identifying matched groups based on a rule

2015-05-07 Thread Ala' Jaouni
Hello, I'm trying to create a table like below for a data set representing one test and indexed by five categories. Categories are grouped into a number of buckets (three in this case: A, B, C) based on the level at which the difference between groups is significant (0.05). Category, Group, Me

[R] Stop on fail using data manipulation

2013-05-27 Thread Ala' Jaouni
Hello, I have a data set with test results for multiple devices (rows). I also have an index (column) that stores the first failing test for each device. I need to remove the results for all the tests that come after the first failing test. Example of a data table: Device,first_failing_test,test

Re: [R] generate random numbers subject to constraints

2008-03-26 Thread Ala' Jaouni
X1,X2,X3,X4 should have independent distributions. They should be between 0 and 1 and all add up to 1. Is this still possible with Robert's method? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read t

Re: [R] generate random numbers subject to constraints

2008-03-26 Thread Ala' Jaouni
> At 01:13 PM 3/26/2008, Ala' Jaouni wrote: > >>I am trying to generate a set of random numbers that fulfill > >>the following constraints: > >> > >>X1 + X2 + X3 + X4 = 1 > >> > >>aX1 + bX2 + cX3 + dX4 = n > >> > >

Re: [R] generate random numbers subject to constraints

2008-03-26 Thread Ala' Jaouni
Hi, I failed to mention that the X values have to be positive and between 0 and 1. e.g. 0.1812*X1 + 0.1871*X2 + 0.1847*X3 + 0.2745*X4 + 0.1304*X5 = 0.2 so one possible combination of X values can be: 0.319, 0.201, 0.084, 0.26, 0.136 another possible combination: 0.151, 0.253, 0.197, 0.256, 0.14

[R] generate random numbers subject to constraints

2008-03-26 Thread Ala' Jaouni
I am trying to generate a set of random numbers that fulfill the following constraints: X1 + X2 + X3 + X4 = 1 aX1 + bX2 + cX3 + dX4 = n where a, b, c, d, and n are known. Any function to do this? Thanks, -Ala' __ R-help@r-project.org mailing list ht

[R] generate random numbers subject to constraints

2008-03-26 Thread Ala' Jaouni
I am trying to generate a set of random numbers that fulfill the following constraints: X1 + X2 + X3 + X4 = 1 aX1 + bX2 + cX3 + dX4 = n where a, b, c, d, and n are known. Any function to do this? Thanks, -Ala' [[alternative HTML version deleted]] _