"0","unit_conversions <- tibble("
"0","   application = c(""US area conversion"", ""US old growth lumber volume conversion"", ""US metric volume conversion"", ""metric softwood density"", ""metric hardwood density"", ""US metric weight conversion"", ""US short tons conversion"", ""US volume conversion""),"
"0","   value = c(144, 12, 35.3147, 530.70, 770, 2.2046, 907.185, 7.48052),"
"0","   value_unit = c(""sq_in"", ""bd_ft"", ""cu_ft"", ""kg"", ""kg"", ""kg"", ""kg"", ""gal""),"
"0","   per = c(""sq_ft"", ""cu_ft"", ""cu_m"", ""cu_m"", ""cu_m"", ""lbs"", ""US_ton"", ""cu_ft"" ),"
"0","   info_source = c(""googUC"", ""googUC"", ""googUC"", ""OSUtable2average"", ""ahacAHG"", ""googUC"",""googUC"", ""googUC"")"
"0",")"
"0","# for convenience, add a couple more conversions that are derived from the values in the unit_conversions table defined above"
"0","# first add US volume (in cubic feet) conversions for the wood density factors (keeping in kilograms to match impact factor `declaredUnit`)"
"0","# the `dplyr::add_row()` function does not like to do calculations for assigning values to the fields, so initially the value is set to 0 then subsequent code lines do the math"
"0","unit_conversions <- unit_conversions %>%"
"0","   add_row(application = ""US metric softwood density"", "
"0","           value = 0,"
"0","           value_unit = ""kg"","
"0","           per = ""cu_ft"","
"0","           info_source = ""calculated"""
"0","   ) %>%"
"0","   add_row(application = ""US metric hardwood density"", "
"0","           value = 0,"
"0","           value_unit = ""kg"","
"0","           per = ""cu_ft"","
"0","           info_source = ""calculated"""
"0","   )"
"0","# US metric softwood density value = metric softwood density value (kg per cu_m) / US metric volume conversion (cu_ft per cu_m)"
"0","unit_conversions[9,2] <- unit_conversions[4,2]/unit_conversions[3,2]"
"0","# US metric hardwood density value = metric hardwood density value (kg per cu_m) / US metric volume conversion (cu_ft per cu_m)"
"0","unit_conversions[10,2] <- unit_conversions[5,2]/unit_conversions[3,2]"
"0","# create the value_reciprocal column"
"0","unit_conversions$value_reciprocal <- 1/unit_conversions$value"
"0","unit_conversions <- unit_conversions[,c(1:4,6,5)]"
"0","# named factors needed as numeric classification for use in later mutate call"
"0","softwood_density_factor <- as.numeric(unit_conversions[9,2])"
"0","hardwood_density_factor <- as.numeric(unit_conversions[10,2]) "
"0","lbs_to_kg <- as.numeric(unit_conversions[6,5])"
"0","short_tons_conversion <- as.numeric(unit_conversions[7,2])"
