Issue with spread

23 Views Asked by At

I am trying to separate the Q2.Harm.Community column into new columns (ex. Only a little, A moderate amount, A great deal, Don't know). Is there another function that might give me an appropriate outcome?

#We need our answers to be separate columns 
    wave_df_3 <- wave_df_2 %>% 
      spread(key = "Q2.Harm.Community",
             value = "new.weight")

Error: Each row of output must be identified by a unique combination of keys. Keys are shared for 170 rows: * 89, 144 * 19, 25 * 123, 148, 159, 162, 166 * 175, 177 * 70, 78, 79 * 141, 163 * 20, 37, 55, 58 * 147, 181, 183 * 105, 153 * 91, 97, 125, 178, 180, 184 * 8, 69, 74, 77 * 27, 42 * 36, 46, 48, 51, 52, 54, 56, 57, 63 * 115, 182 * 4, 21, 35, 43 * 93, 99, 104, 113, 116, 118, 142, 146, 150, 154, 158, 185, 186 * 103, 145, 167, 172 * 65, 66, 80, 83, 85 * 10, 13, 47, 53 * 96, 98, 101, 112 * 40, 44 * 88, 95, 168 * 138, 155 * 68, 71, 76, 84, 87 * 7, 23 * 136, 157, 169 * 26, 45, 49, 59, 60, 61 * 100, 111, 128, 165 * 16, 18 * 94, 108, 120, 129, 130, 139, 152, 161, 173, 187 * 2, 24, 38 * 109, 124, 126, 134, 135, 140, 174 * 14, 41, 67, 73, 75, 81, 86 * 1, 9 * 15, 50, 62 * 132, 143 * 3, 5, 17, 29 * 90, 106, 121, 133, 137, 149, 160, 170, 171 * 102, 110, 119, 156 * 122, 164 * 30, 64, 72, 82 * 131, 151
0

There are 0 best solutions below