This folder contains code and data necessary to replicate our data analysis. 

Currently the folder is at the final state, with all data processed and analysed.

The spreadsheet "new_file_list.txt" lists the flower measurements and sample data with the .txt files from vibration measurements
with Fast Fourier Transform (FFT) spectra in .txt files in separate folders for data obtained 
with Doppler laser vibrometer from stamens (vib_data) and 
with a accelerometer attached to the shaker platform (ref_data),
obtained simultaneously with the data acquisition software VibSoft 20 (Polytec, Waldbronn, Germany).

Files with the same number in their name refer to the same sampling event or the same measured stamen.

To visually check and explore the data, you can use the code in "nat_freqs_shaker.pdf".

The markdown codes "obtaining_fn_single_values.pdf" were used to retrieve the first natural frequency from files in folder "vib_data".

To replicate data processing of the natural frequency data, use "obtaining_fn_single_values.pdf". 
To replicate the analysis of stamen natural frequencies,
you can use the code from "fn_stats.pdf" after running the code from "obtaining_fn_single_values.pdf" in your R environment.

To replicate the generation of plots used in the figures, 
you can use the code from "MS_figure_plots.pdf" after running the code in "obtaining_fn_single_values.pdf" in your R environment.

The spreadsheet "ColonyA1cit_to_het.csv" refers to data on the peak frequencies from bee buzzes 
obtained with the free Software Audacity (Audacity Team 2019)
as described in the paper Methods.

Both pdfs and Rmarkdown files from the codes are included in this folder.

Proper UnZip software is recommended for accessing the dataset, for instance, IZArc.
