please help me fix this error. Not sure why R can't read my column names, take the columns and plot the scatter plot
library(ggplot2) y1 <- data2[,"Average Weekly Workplace Earnings 2016 (£)"] chart <- ggplot(data = data2, aes(x = data2[,"CO2 Emissions per Capita 2016 (tons)"], y = data2[,"Average Weekly Workplace Earnings 2016 (£)"])) chart + geom_point()` This is the error message `> chart <- ggplot(data = data2, aes(x = data2[,"CO2 Emissions per Capita 2016 (tons)"], y = data2[,"Average Weekly Workplace Earnings 2016 (£)"]))
chart + geom_point() Don't know how to automatically pick scale for object of type spec_tbl_df/tbl_df/tbl/data.frame. Defaulting to continuous. Don't know how to automatically pick scale for object of type spec_tbl_df/tbl_df/tbl/data.frame. Defaulting to continuous. Error in is.finite(x) : default method not implemented for type 'list' `