I have a dataframe with three columns - state names, dates, and a numerical values.
The matrix I am trying to create needs to have the state names as row names, and the dates as the column names, with the numerical values within the matrix. Obviously, there will be many NA values within the matrix. (there are 51 'states' and 84 dates). I've been working on this all day and the closest I've gotten is creating a dataframe with the correct number of dates and state names corresponding to each other, but the numerical values don't match up.
there are 84 dates, but not every state has 84 corresponding dates.
Goal = all states only are listed once alphabetical order... all dates only listed once... fill in empty spaces w/ NA