Please provide the code that leads up to the error and a little data we can use with the code. To provide the data, you can post the output of the dput() function. If your data frame is named DF, run
dput(head(DF,20))
to provide the first 20 rows of data. Put the output of dput() between lines with three back tickes, like this:
```
output of dput() goes here
```
uk_gdp <- rename(uk_gdp, "id_nuts3" = "ITL code")
uk_gdp <- rename(uk_gdp, "GDP_pound" = "gdp_n3")
#Exchange Pund to Euro
uk_gdp %<>% mutate("gdp_n3" = as.numeric(uk_gdp$GDP_pound)/1.16)
# Keep relevant vars
uk_gdp <- uk_gdp %>% select("id_nuts3", "Year","gdp_n3")
# Merge UK and EU data
GDPall <- rbind(uk_gdp, eu_gdp)
# Converting from GDP in millions to GDP in hundred thousand
GDPall <- GDPall %>%
mutate("gdp_n3" = as.numeric(GDPall$gdp_n3) * 10)
I am wondering if it has something to do with the years being used as a category. If it is reading it as a number. Are you advanced in R. I could really need some help as I am pushed for time. Actually not so sure about what I am doing. I know what I want done.