Re: [R] Autofilling a large matrix in R

2012-10-12 Thread Pieter Schoonees
discard zeros. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Rui Barradas > Sent: Friday, October 12, 2012 18:04 > To: wwreith > Cc: r-help@r-project.org > Subject: Re: [R] Autofilling a large matrix in R >

Re: [R] Autofilling a large matrix in R

2012-10-12 Thread Rui Barradas
Hello, Something like this? g[rowSums(g) == 100, ] Hope this helps, Rui Barradas Em 12-10-2012 15:30, wwreith escreveu: I wish to create a matrix of all possible percentages with two decimal place percision. I then want each row to sum to 100%. I started with the code below with the intent t

Re: [R] Autofilling a large matrix in R

2012-10-12 Thread jim holtman
next row > until they add up to 100%, etc.? > Thanks. > > > > > From: wwreith > To: r-help@r-project.org > Sent: Friday, October 12, 2012 10:30 AM > Subject: [R] Autofilling a large matrix in R > > I wish to create a matrix of

Re: [R] Autofilling a large matrix in R

2012-10-12 Thread Mark Lamias
2 10:30 AM Subject: [R] Autofilling a large matrix in R I wish to create a matrix of all possible percentages with two decimal place percision. I then want each row  to sum to 100%. I started with the code below with the intent to then subset the data based on the row sum. This works great for 2 or 3 co

[R] Autofilling a large matrix in R

2012-10-12 Thread wwreith
I wish to create a matrix of all possible percentages with two decimal place percision. I then want each row to sum to 100%. I started with the code below with the intent to then subset the data based on the row sum. This works great for 2 or 3 columns, but if I try 4 or more columns the number of