Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-04 Thread Hayes, Daniel
- From: jim holtman [mailto:jholt...@gmail.com] Sent: 04 November 2009 15:30 To: Hayes, Daniel Cc: r-h...@lists.r-project.org Subject: Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame My guess is that we are being affected by FAQ 7.31

Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-04 Thread jim holtman
livia 10.43279 0.10180158 > 133 11.0000 Bolivia 10.33394 0.10160484 > 169 14.0000 Bolivia 10.24878 0.09946659 > 193 16. Bolivia 10.20148 0.09694376 > 205 17. Bolivia 10.16589 0.09573946 > > $Brazil >             age country       mu      sigma > 6

Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-04 Thread Hayes, Daniel
0000 Brazil 11.54888 0.10839417 603 0.0833 Brazil 11.46345 0.11255592 604 0.1667 Brazil 11.41137 0.11434565 605 0.2500 Brazil 11.33844 0.11576378 ... 660 4.8333 Brazil 10.61799 0.11398118 661 4.9167 Brazil 10.61281 0.11378445 710 9. Brazil 10.55999

Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-03 Thread jim holtman
try this: > x <- read.table(textConnection(" Age(yrs) country mu sigma + 1 0. Bolivia 11.42168 0.1014872 + 2 0.0833 Bolivia 11.33625 0.1053837 + 3 0.1667 Bolivia 11.28417 0.1070594 + 4 0.2500 Bolivia 11.21125 0.1083872 + 5 0. Boliv

[R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-03 Thread Hayes, Daniel
Dear R-helpers, I have a data.frame (bcpe.lat.m) containing 13 countries, ages 0-50yrs per month, and the corresponding mu&sigma (see below). *I would like to limit the age range to include all 12 months for the 1st 5 years and only whole years for all ages thereafter for each of the c