Error- character and double

Hi

I am getting an error that I can't combine character with double. May someone assist how to fix this?

student_debt_val <- student_debt_raw %>%
  rename(year = 1) %>%
  slice(1:10) %>%
  arrange(desc(year)) %>%
  pivot_longer(cols = -year, names_to = "race", values_to = "loan_debt") 
  student_debt_val
#> Error Can't combine `race` <character> and `loan_debt` <double>

Created on 2022-04-05 by the reprex package (v2.0.1)

Hi, can you provide a reproducible example? What does student_debt_raw look like?

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.