Is SIGS an R dataset in a package? Or your own dataset? We can't reproduce your issue without the data so we either need a reprex that gives us a SIGS dataset or a require/library line to load the package that has SIGS in it.
It appears you have a dataset with number of animals and time data.
But you have not shown us the geom_line command that "fails"
But you also have defined a new statistical method... The softly trend.
I suspect what you mean is a rolling average.
zoo::roll_mean( ). Would be a sensible approach say using 5 minutes
So something like
require(dplyr)
require(zoo)
SIGS %>%
mutate(rolling, roll_mean(. , k = 5) %>%
ggplot() %>%
Blah blah
Would be a good approach.
Also I suspect you should move the aes(...) section to the ggplot(...), So you only tell geom_line(aes(y=rolling)) as it knows the x already.
rolling will give some warnings when plotted as you get some NA values at the start/end of your data when there is not 5 data points to average
More work may be needed depending how the data looks which is why a reprex would help