How to get mean and standard error for three different seasons

I need to figure out how to get rid of the NA for mean and standard error

summary(Copy_of_US_Vcm_daily_aflx$season)
winter spring monsoon
1804 1830 1845

season.summary<-data.frame(Copy_of_US_Vcm_daily_aflx %>%

  •                          group_by(season) %>% 
    
  •                          summarize(GPP_int.mean=mean(GPP_int), se=sd(GPP_int)/(n()^0.5),n=n()))
    

look at your summary data

season.summary
season GPP_int.mean se n
1 winter NaN NA 1804
2 spring NaN NA 1830
3 monsoon NaN NA 1845

Are you sure that your GPP_int variable is indeed numeric?
If it is not, then that could explain your result.
Can you show us the first 6 lines of your data by using

dput(head(Copy_of_US_Vcm_daily_aflx))

?
I assume that Copy_of_US_Vcm_daily_aflx is already a data.frame.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.