Hi!
As Boris explained, if you do not always have the same number of values
per country, you need to provide more details, e.g. should the empty
cells be filled with NA?
But if you do always have 20 values per country (unlike in your sample
data), then this could work for you:
mydf <- data.
Hi Burhan,
As all of your values seem to be character, perhaps:
country.df<-as.data.frame(matrix(temp.data,ncol=22,byrow=TRUE)[,2:21])
if there really are 2 country names and 20 values for each country. As
Boris has pointed out, there are different numbers of values following
the country names in
Your data rows have different numbers of columns. Thus your problem is not
sufficiently specified.
B.
On Mar 24, 2016, at 6:30 AM, Burhan ul haq wrote:
> Hi,
>
> 1. I have scraped some data from the web, subset shown below
>
>> dput(temp.data)
> c("Armenia", "Armenia", "43827", "39200", "357
Hi,
1. I have scraped some data from the web, subset shown below
> dput(temp.data)
c("Armenia", "Armenia", "43827", "39200", "35700", "36700", "39341",
"30571", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", " 0",
"0", "0", "0", "0", "Austria", "Austria", "135417", "166200",
"144500", "147300"
4 matches
Mail list logo