Hi,
I have some data I want to re-order but a few problems... here is how it currently looks
structure(list(county_fips_code = c(45001, 45001, 45001, 45001,
45001, 45001, 45001, 45001, 45001, 45001), County = c("Abbeville County, SC",
"Abbeville County, SC", "Abbeville County, SC", "Abbeville County, SC",
"Abbeville County, SC", "Abbeville County, SC", "Abbeville County, SC",
"Abbeville County, SC", "Abbeville County, SC", "Abbeville County, SC"
), Cluster = c("Aerospace Vehicles and Defense", "Agricultural Inputs and Services",
"Apparel", "Automotive", "Biopharmaceuticals", "Business Services",
"Coal Mining", "Communications Equipment and Services", "Construction Products and Services",
"Distribution and Electronic Commerce"), strength = c(0, 0, 0,
1, 0, 0, 0, 0, 0, 0)), row.names = c(NA, 10L), class = "data.frame")
I want to eventually get it to the form of one observation per county with 50 columns per observation so it would look like
County County_fips Aerospace Apparel Agriculture
a 123 1 0 1
b 234 0 0 0
The tricky part is that some counties are missing the numeric id (fips code) and I've had problems in the past with R being able to distinguish text. Any tips?