Just began coding in R and ran into an issue. I am using a dataset from an excel sheet that has x-values that range from 0 - 5 that include NA values. My y-values range from 0 - 100 also with NA values. I tried to use scale_x_continuous to edit my label axis but have to use scale_x_discrete because R gave an error where it read my data as discrete instead of continuous (is it because of the NA values?). I have been able to change the x-axis scale with scale_x_discrete, but can't get it to work with scale_y_discrete, as it tells me "Position guide is perpendicular to the intended axis."
excel_plot <- ggplot(data = excel_data,
mapping = aes(x = xData, y = yData)) +
geom_point() +
scale_x_discrete(limits = c("0", "2", "4", "6")) +
scale_y_discrete(limits = c("0", "25", "50", "75")) +
theme(axis.text = element_text(angle = 90))
excel_plot