Data transformation Floating vs integer

For some reason the Support.Weight variable works in the first line, but does not work in the last line. I have provide the code and the error. I think the issue might be that I am trying to use floating variables and integers, but I am not sure how to fix this.

Error in `left_join()`:
! Join columns must be present in data.
✖ Problem with `Support.Weight`.
Run `rlang::last_error()` to see where the error occurred.
> View(Horizon_join)
Error in View : object 'Horizon_join' not found


Horizon_cast <- dplyr::select(Horizon, 'Support.Weight', 'industry', 'Renewal.Forecast.Weight')
Horizon_cast <- unique(Horizon_cast)

Horizon_cast_wide <- dcast(Horizon_cast, formula = 'Support.Weight'~ 'industry', value.var = "Renewal.Forecast.Weight")

# Drop Question and Response Columns from DAT & Remove Duplicates
Horizon_col <- Horizon[, c(1:(ncol(Horizon)-2))]
Horizon_col <- unique(Horizon_col)

### Join Data & Add Columns ---
Horizon_join <- left_join(Horizon_col, Horizon_cast_wide, by = 'Support.Weight')

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.