Re: [R] create an empty data frame and then fill in it (and then evaluate the mean of semi-hourly data for each day)

2016-06-10 Thread William Dunlap via R-help
on(x) > round(mean(df_snow$snow[df_snow$day == x], na.rm=T))) > > This does not work. I do not understand why the class of df_snow_day$snow > is of type list either: > >day snow > NA NULL > NA.1 NULL > NA.2 NULL > > Where is my mistake? &

Re: [R] create an empty data frame and then fill in it (and then evaluate the mean of semi-hourly data for each day)

2016-06-10 Thread Duncan Murdoch
A.2 NULL Where is my mistake? Thank you for all your help Stefano _ Da: Duncan Murdoch [murdoch.dun...@gmail.com] Inviato: giovedì 9 giugno 2016 12.36 A: Stefano Sofia; r-help@r-project.org Oggetto: Re: [R] create an empty data frame and then fill in it On

Re: [R] create an empty data frame and then fill in it (and then evaluate the mean of semi-hourly data for each day)

2016-06-10 Thread PIKAL Petr
une 10, 2016 12:46 PM > To: Duncan Murdoch ; r-help@r-project.org > Subject: Re: [R] create an empty data frame and then fill in it (and then > evaluate the mean of semi-hourly data for each day) > > Thank you for your answer. Very clear. > (I don't like the second solution eit

Re: [R] create an empty data frame and then fill in it (and then evaluate the mean of semi-hourly data for each day)

2016-06-10 Thread Stefano Sofia
gmail.com] Inviato: giovedì 9 giugno 2016 12.36 A: Stefano Sofia; r-help@r-project.org Oggetto: Re: [R] create an empty data frame and then fill in it On 09/06/2016 6:22 AM, Stefano Sofia wrote: > Dear R list users, > sorry for this simple question, but I already spent many efforts to s

Re: [R] create an empty data frame and then fill in it

2016-06-09 Thread Duncan Murdoch
On 09/06/2016 6:22 AM, Stefano Sofia wrote: Dear R list users, sorry for this simple question, but I already spent many efforts to solve it. I create an empty data frame called df_year like df_year <- data.frame(day=as.Date(character()), hs_MteBove=integer(), hs_MtePrata=integer(), hs_Pintura=

Re: [R] create an empty data frame and then fill in it

2016-06-09 Thread Duncan Murdoch
On 09/06/2016 6:22 AM, Stefano Sofia wrote: Dear R list users, sorry for this simple question, but I already spent many efforts to solve it. I create an empty data frame called df_year like df_year <- data.frame(day=as.Date(character()), hs_MteBove=integer(), hs_MtePrata=integer(), hs_Pintura=

[R] create an empty data frame and then fill in it

2016-06-09 Thread Stefano Sofia
Dear R list users, sorry for this simple question, but I already spent many efforts to solve it. I create an empty data frame called df_year like df_year <- data.frame(day=as.Date(character()), hs_MteBove=integer(), hs_MtePrata=integer(), hs_Pintura=integer(), hs_Pizzo=integer(), hs_Sassotetto=