I am a newbie with R. I have a large dataset (66M obs) with pixel temperature data of 4 water bodies (REF,LMB, OTH, FP) at hourly time steps (6am,7am,8am...), with several NA values illustrating blank pixels. I want to calculate a proxy for temperature heterogeneity/diversity for each water body at each time, by using Shannon Diversity or other similar indexes. I have so far managed to calculate basic stats using an available online source, but not sure how to apply more specific diversity indexes.
My data looks like: First column Temp, second Time, third water
My code:
DF<-read.csv("DF_total.csv",stringsAsFactors = T)
levels(DF$water)
[1]"OTH" "LMB" "REF" "FP"
levels(DF$time) NULL
source("group_by_summary_stats.R")[**]
summary<-group_by_summary_stats(DF, Temp ,water ,time)
[**]source found online