In R, you can use the trunc function
> trunc(191.1)
#[1] 191
> trunc(191.48)
#[1] 191
> trunc(191.8755)
#[1] 191
In Excel the Truncate
= TRUNCAR(191,8755;0)
Dataset
> dados
wavelength spectra
#1 190.10 -13.10
#2 190.48 -10.30
#3 190.87 -3.55
#4 191.25 -0.82
#5 191.63 -4.14
#6 192.02 -1.06
#7 192.40 5.21
#8 192.78 12.23
#9 193.17 10.88
#10 193.55 5.95
#11 193.93 7.80
#12 194.31 13.10
#13 194.70 10.88
Average of each spectra second wavelength
library(dplyr)
dados %>% group_by(trunc(wavelength)) %>%
summarise(media_spectra = mean(spectra))
# A tibble: 5 x 2
# 'trunc(wavelength)' media_spectra
# <dbl> <dbl>
#1 190 -8.98
#2 191 -2.48
#3 192 5.46
#4 193 8.21
#5 194 12.0