-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQualityCheck.R
More file actions
29 lines (22 loc) · 781 Bytes
/
Copy pathQualityCheck.R
File metadata and controls
29 lines (22 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#RCLEANCOMMUNITY Quality Check
setwd("G:/My Drive/GrayLab/Plastics/Articles Publish/Active/RCleanCommunity")
library(dplyr)
OurClean <- read.csv("Our Clean Community2.csv")
DuplicateTimestamps <- OurClean %>%
group_by(litterTimestamp, litterDatestamp) %>%
summarise(n = n()) %>%
filter(n > 1)%>%
arrange(desc(n))
DuplicateLatLong <- OurClean %>%
group_by(lat, lon) %>%
summarise(n = n()) %>%
filter(n > 1)%>%
arrange(desc(n))
DuplicateLatLongTimePerson <- OurClean %>%
group_by(lat, lon, litterTimestamp, litterDatestamp, username) %>%
summarise(n = n()) %>%
filter(n > 1) %>%
arrange(desc(n))
write.csv(DuplicateTimestamps, "DupTime.csv")
write.csv(DuplicateLatLong, "DupLatLon.csv")
write.csv(DuplicateLatLongTimePerson, "DupLatLonTimePerson.csv")