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
State Department of Social and Health Services
-Original Message-
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
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 4/4;7;
3 matches
Mail list logo