dimanche 15 mars 2020

What's wrong here?; unused argument [duplicate]

Below is my code

data <- read.csv("weather.data.csv")
attach(data)
head(data)
plot(factor(month), upper)
library(dplyr)

data <- data %>% 
  filter(month == 6 & upper) %>% 
  ifelse(upper == 0, NA, upper) 

I found an outlier, 0, at month(June) on data, so I tried to replace 0 with NA but it didn't work. I got an error message below.

Error in ifelse(., upper == 0, NA, upper) : unused argument (upper)

What is wrong? Help, plz!

Aucun commentaire:

Enregistrer un commentaire