This is the code I am using to create a new calculated field for the proportion of a race in a total population:
formatted_df$White_Proportion <- formatted_df$White_Alone / formatted_df$Total_Pop1
When running the code the data frame includes new columns for the calculated field, but they are not populated with the values associated with the calculation. The entire column is null.
I tried to change syntax to no avail. Have attempted to find a similar issue online but have been unable to. Help would be appreciated.