[R] randomly subsample rows from subsets

2012-03-18 Thread aly
Hi, I have a list of 1787 fish from 948 full-sib families and their lengths. My table looks like this, fishfam length 1 a 71.46 2 a 71.06 3 a 62.94 4 b 79.46 5 b 52.38 6 b 56.78 7 b 92.08 8 c 9

[R] Reshape from long to wide

2012-03-19 Thread aly
Hi, I'm a total beginner in R and this question is probably very simple but I've spent hours reading about it and can't find the answer. I'm trying to reshape a data table from long to wide format. I've tried reshape() and cast() but I get error messages every time and I can't figure why. In my da

Re: [R] Reshape from long to wide

2012-03-21 Thread aly
Thanks a lot, I tried one of the ways you guys showed me and it totally work. Just for fun, I tried all the others and with some modifications here and there they work fine too. It was time consuming but definitely worth as a good learning experience. Thanks again -- View this message in context

[R] Randomly select elements based on criteria

2012-03-22 Thread aly
4685 126 150 4678 I need a conditional but I have no clue on how to include it in the code. Thanks in advance for any suggestions, Aly -- View this message in context: http://r.789695.n4.nabble.com/Randomly-select-elements-based-on-criteria-tp4496483p449648

[R] Logistic Regression Fitting with EM-Algorithm

2011-01-03 Thread Robin Aly
Hi all, is there any package which can do an EM algorithm fitting of logistic regression coefficients given only the explanatory variables? I tried to realize this using the Design package, but I didn't find a way. Thanks a lot & Kind regards

Re: [R] Logistic Regression Fitting with EM-Algorithm

2011-01-10 Thread Robin Aly
e method to my problem. Thanks in advance, Best Regards Robin Magder, L. S. & Hughes, J. P. Logistic Regression When the Outcome Is Measured with Uncertainty American Journal of Epidemiology, 1997, 146, 195-203 On 01/04/2011 12:36 AM, (Ted Harding) wrote: On 03-Jan-11 14:02:21, Robin Aly