[R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread Mike Treglia
detail on my code would be helpful- I was just trying to keep it simple and focus on what I saw as the problem at hand for now. Thank you for your help. Sincerely, Mike Treglia -- Michael Treglia Applied Biodiversity Sciences NSF-IGERT Program Wildlife and Fisheries Sciences Texas AM University Lab

Re: [R] Create Artificial Binary Matrix based on probability

2009-11-03 Thread Mike Treglia
Thanks a lot Erik and Tony! Both of your suggestions accomplish what I need. Cheers, Mike Erik Iverson wrote: Try matrix(rbinom(100, 1, prob = 0.048), nrow = 10) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of bikemike42

Re: [R] Re place only first NA in column

2009-11-03 Thread Mike Treglia
Erik and Steve, Thanks again for your help, both solutions do exactly what I need. Cheers, Mike Steve Lianoglou wrote: Hi, On Nov 3, 2009, at 3:58 PM, bikemike42 wrote: Dear All, I am trying to fill in a blank vector (a) with one value at a time, with the value of the number of rows in a