Thank you for your help, that code worked great. If anyone else is looking to do this, here is my full code for one habitat type:
#For reading in my data from a .csv, needed to add the as.POSIXct command to the aggregate function to switch back from factor
#I had some erroneous dates for some images, so I sorted on date, then visually inspected and subsetted out to the 'corrected_nat' dataframe
#start_nat is the date I started the first camera running to start the plot on day 0
#In the plot command, I multiple the indexed captures by 7 as I had 7 cameras running in the habitat
sorted_nat<-subset_specaccum_nat[order(subset_specaccum_nat$x),]
corrected_nat<-sorted_nat[15:68,]
unique_cap_nat<-corrected_nat[!duplicated(corrected_nat[,2]),]
nat_cap_date<-round(as.numeric(sort(trunc.POSIXt(unique_cap_nat[,3], "day")))/86400)
start_nat<-round(as.numeric(as.POSIXct("2015-06-24", format="%Y-%m-%d"))/86400)
indexed_captures_nat<-(nat_cap_date-start_nat)
plot(x=indexed_captures_nat*7, y=(1:length(indexed_captures_nat)*7), type = "l", xlab = "trap nights", ylab = "Total number of species", main ="Species accumulation along natural dunes")
#to get shannon's diversity index and evenness index, I used the following code:
#Dunes_nat is the camera operations table
#the first section extracts the raw number of captures by species, and standardizes it using the total number of captures in that habitat
SurveyInfo_nat<-surveyReport(images_natural,Dunes_nat, stationCol="Station",setupCol='Setup_date',cameraCol = 'CameraID',retrievalCol = 'Retrieval_date',CTDateFormat="%d/%m/%Y",
CTHasProblems=TRUE, Xcol='utm_x',Ycol='utm_y',sinkpath='C:/Users/smart/Documents/R/dune_community')
captures_by_sp_nat<-as.numeric(SurveyInfo_nat$events_by_species[,2])
captures_by_sp_nat<-captures_by_sp_nat/sum(captures_by_sp_nat)
#S_nat is Shannon's Diversity index, while Evenness_nat is the evenness index
S_nat<-0
for (i in 1:length(captures_by_sp_nat)){
S_nat<-S_nat+(captures_by_sp_nat[i]*log(captures_by_sp_nat[i]))
}
S_nat<-S_nat*-1
Evenness_nat<-S_nat/(log(length(captures_by_sp_nat)))