Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

I split a very large dataframe into a number of smaller ones but I am unable to merge them back together

$
0
0

So I am working with some Census API data. Sadly there are a number of NAs in some of the columns. I am replacing the NAs with the column means, but I figured I would get more accurate information if I split the data by county first. Here is where my problem lies; I am unable to merge them back to a single dataframe correctly. I know that unsplit doesn't work for lists of dataframes so instead as per other posts I am using

do.call("rbind", hdi_tract$county)

instead. It seems to have worked but now I am getting more NA values than what I started with before splitting the data. Why is this the case?


Viewing all articles
Browse latest Browse all 201839

Trending Articles