Hi all, I´ve been ill and I have lost a lot of time without seen the pc. I want you to help if you can if you want. Only I need an initial guide. I´ve been out a lot of time and I need a hope. Is only for "joby" purposes. The problem: I want to simulate each of the posible combination in a play. Imagine they play to games (football games) and you can choose "1", "X", "2" you must choose this 15 times. So finally you will get a colum 15x1 si you have (3^15) posible colums. I want to extract all the columns were in the row 3 you can find an "2". Or in the row 3 appears a "1" and row 3 "x". And extract them and save in a txt document. Sorry I know that I only ask but actually I feel very fool. If you give an initial guide will be sufficient. Many thanks for all in advace. [[alternative HTML version deleted]]
Dear ????, 15 is very big number for me (perhaps for R as well :() so I have tried following: mat <- expand.grid(rep(list(c("1", "X", "2")),4)); mat[mat[,3]=="2",] -- View this message in context: http://r.789695.n4.nabble.com/Combinations-tp2955065p2955338.html Sent from the R help mailing list archive at Nabble.com.
Hi all, Reading more I have find a partial solution on a part of the proble in some part of the code it should appea something like: # NC: All the potential combinations 3^15 if NC[price(i,j)=="1" & price(i,j)=="2"]----> extract this column then save all the columns that contain this pre-requisite. 2010/10/4 Trying To learn again <tryingtolearnagain@gmail.com>> Hi all, > > I´ve been ill and I have lost a lot of time without seen the pc. > > I want you to help if you can if you want. > > Only I need an initial guide. I´ve been out a lot of time and I need a > hope. Is only for "joby" purposes. > > The problem: > > I want to simulate each of the posible combination in a play. Imagine they > play to games (football games) and you can choose "1", "X", "2" you must > choose this 15 times. > > So finally you will get a colum 15x1 si you have (3^15) posible colums. > > I want to extract all the columns were in the row 3 you can find an "2". Or > in the row 3 appears a "1" and row 3 "x". > > And extract them and save in a txt document. > > Sorry I know that I only ask but actually I feel very fool. > > If you give an initial guide will be sufficient. > > Many thanks for all in advace. > >[[alternative HTML version deleted]]