In [1]:
setwd('/Users/erinlarson/Dropbox/Documents/GIT/DDESSS_Stream_Dream_Team')
data<-read.csv("WorkingDataSet.csv")
library("dplyr")
In [2]:
t(data[1,])
In [3]:
TotalP <-subset(data, ResultSampleFractionText=="Total")
group_by(TotalP, MonitoringLocationIdentifier) %>%
summarise(AvgTotal_P = mean(ResultMeasure2, na.rm = TRUE),
SDTotal_P = sd(ResultMeasure2, na.rm = TRUE),
PFOR2 = mean(PFOR2, na.rm=TRUE),
Lat = mean(LatitudeMeasure, na.rm = TRUE),
Long = mean(LongitudeMeasure, na.rm=TRUE)
) %>% write.csv("Avg_TotalP_LatLong.csv")
In [ ]:
TDP <-subset(data, ResultSampleFractionText=="Total")
group_by(TotalP, MonitoringLocationIdentifier) %>%
summarise(AvgTotal_P = mean(ResultMeasure2, na.rm = TRUE),
SDTotal_P = sd(ResultMeasure2, na.rm = TRUE),
Lat = mean(LatitudeMeasure, na.rm = TRUE),
Long = mean(LongitudeMeasure, na.rm=TRUE)
) %>% write.csv("Avg_TotalP_LatLong.csv")