I'm working with a data.frame of weather data and want to know if the data is within the reading limits of the equipment. For this, the tolerance limits adopted for temperature (% with%,% with% and% with%) are -40 ° C to +60 ° C. In a new column the grades are assigned: temp_med
when the data is within that limit, temp_max
for when it is out and temp_min
when the line has no data.
Used script:
lim_temp<- (-40)<= dados_horas$temp_med & dados_horas$temp_med <= 60
dados_horas$nota1_temp_med [lim_temp] <- 5L
dados_horas$nota1_temp_med [!lim_temp] <- 6L
dados_horas$nota1_temp_med <- 7L
obs: 1
- Name of my database; 3
- column I want to work with; 7
- new column with notes.
But it's popping up with the following error:
Warning messages: 1: In Ops.factor (data_time $ temp_med, (-40)): '<' not meaningful for factors 2: In Ops.factor (data_time $ temp_med, 60): '