Re: [R] aggregating data with quality control

2024-08-31 Thread avi.e.gross
Stefano, I see you already have an answer that works for you. Sometimes you want to step back and see if some modification makes a problem easier to solve. I often simply switch to using tools in the tidyverse such as dplyr for parts of the job albeit much of the same can be done using functio

Re: [R] aggregating data with quality control

2024-08-31 Thread Stefano Sofia
Sofia Oggetto: Re: [R] aggregating data with quality control [Non ricevi spesso messaggi di posta elettronica da ikry...@disroot.org. Per informazioni sull'importanza di questo fatto, visita https://aka.ms/LearnAboutSenderIdentification.] � Sat, 31 Aug 2024 11:15:10 + Ste

Re: [R] aggregating data with quality control

2024-08-31 Thread Rui Barradas
Às 12:15 de 31/08/2024, Stefano Sofia escreveu: Dear R-list users, I deal with semi-hourly data from automatic meteorological stations. They have to pass a manual validation; suppose that status = "C" stands for correct and status = "D" for discarded. Here a simple example with "Snow height"

Re: [R] aggregating data with quality control

2024-08-31 Thread Ivan Krylov via R-help
В Sat, 31 Aug 2024 11:15:10 + Stefano Sofia пишет: > Evaluating the daily mean indipendently from the status is very easy: > > aggregate(mydf$hs, by=list(format(mydf$data_POSIX, "%Y"), > format(mydf$data_POSIX, "%m"), format(mydf$data_POSIX, "%d")), > my.mean) > > > Things become more comp