Error in a - b: non-numeric argument to binary operator

0
Q

    {r}

    cambio2 <- data.frame(cambio)

    cambio2 %>%
      ggplot(aes(y = receita,
                 x = despesa
                          )
    ) + geom_point()

I want to make the chart, but the points in the graph do not appear and the following error appears:

  

Error in a - b: non-numeric argument to binary operator

Thank you in advance

    
asked by anonymous 26.07.2018 / 20:29

2 answers

0

I believe this is what you wanted, right?

lines = 'mês ano receita despesa 
1 2018 778.7376 1579.185 
2 2018 611.4827 1362.005 
3 2018 544.0717 1532.969 
4 2018 498.8309 1324.723 
5 2018 428.6952 1496.460'

dados = read.table(textConnection(lines), header = T)

library(dplyr)
library(ggplot2)

dados %>%
  ggplot(aes(y = receita, x = despesa)) +
  geom_point()

    
27.07.2018 / 00:48
0

Follow the data:

month year revenue expense 1 1 2018 778.7376 1579.185 2 2 2018 611.4827 1362,005 3 3 2018 544.0717 1532969 4 4 2018 498.8309 1324,723 5 5 2018 428.6952 1496.460

Thanks in advance.

    
26.07.2018 / 20:48