Re: [R] Reading data with two rows of variable names using read.zoo

2015-07-29 Thread SW Kim
Thanks, Dan. Your codes work fine. But I have tens of countries UK, JP, BR, US..., each of which has ten columns a1, a2, ..., a10 of data. So a little more automation is needed. I have been trying to make a list of each country's data and use sapply thing to get UK JP 2009 Q2

Re: [R] Reading data with two rows of variable names using read.zoo

2015-07-28 Thread Nordlund, Dan (DSHS/RDA)
- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of ??? Sent: Tuesday, July 28, 2015 9:42 AM To: r-help@r-project.org Subject: [R] Reading data with two rows of variable names using read.zoo Dear R gurus. I have a data file which has two rows of variable names. And the time index has

[R] Reading data with two rows of variable names using read.zoo

2015-07-28 Thread κΉ€μƒν™˜
Dear R gurus. I have a data file which has two rows of variable names. And the time index has a little unusual format. I have no idea how to handle two names and awkward indexing for the quarters. Lines - Index; UK; UK; JP; JP Index; a1; a2; a1; a2 2009 2/4;2;4;3;2 2009 3/4;5;2;1;4 2009