setwd("~/Dropbox/PhD Damien Neadle CT/2016_Nut_Cracking/Data/") ghostData <- read.csv("Attention_ghost.csv", header=T, na.strings = c("", "NA")) uniqueGhostObservers <- unique(ghostData$Observer.1, ghostData$Observer.2, ghostData$Observer.3, ghostData$Observer.4, ghostData$Observer.5, ghostData$Observer.6, ghostData$Observer.7, ghostData$Observer.8, ghostData$Observer.9, ghostData$Observer.10) observers <- c("Observer.1", "Observer.2", "Observer.3", "Observer.4", "Observer.5", "Observer.6", "Observer.7", "Observer.8", "Observer.9", "Observer.10") observerOnlyGhost <- ghostData[observers] numGhostObservers <- rowSums(!is.na(observerOnlyGhost)) mean(numGhostObservers) fullData <- read.csv("Attention_full.csv", header=T, na.strings = c("", "NA")) uniqueFullObservers <- unique(fullData$Observer.1, fullData$Observer.2, fullData$Observer.3, fullData$Observer.4, fullData$Observer.5, fullData$Observer.6, fullData$Observer.7, fullData$Observer.8, fullData$Observer.9, fullData$Observer.10) observerOnlyFull <- fullData[observers] numFullObservers <- rowSums(!is.na(observerOnlyFull)) mean(numFullObservers)