I've been extracting anuran acoustic data using the program RavenPro v1.6 and am trying to summarise the data in R. Multiple calls were analysed in each bout, meaning there are several data points for each call recording. I've manage to create a new data frame in R with the averages, but when I do it puts all my categorical data to 'NA', as with some of the numerical data. Below is the R code I used to do this. I was wondering if anyone has any insight into how I can create the new data frame with all my numerical values averaged and doesn't remove my categorical information? Thanks in advance!
Averaging the data and creating new dataframe
acoustic_summary = aggregate(data2, by=list(data2$FileName), FUN=mean, na.rm=TRUE)