What is the name of this kind of smoothing? Essentially, the code below produces something that is similar to a running mean, but instead of 0/1 weights on a window, it has gaussian weights centered at the x-position in consideration.
I'm pretty sure that this procedure (or something like it) must have some name, but I think I lack the proper terms to google to find out more. For example if I type 'Gaussian Smoothing', I get a lot of image manipulation hits, which seems adjacent to this, but also not exactly this. Hence my question, what is the following called?
x <- iris$Petal.Length
y <- iris$Sepal.Length

xseq <- seq(min(x), max(x), length.out = 100)

# For every point in x, calculate the distance to xseq
# Then, give gaussian density for that distance
weights <- dnorm(outer(x, xseq, "-"), sd = 0.5)
# Normalise by total weight per point in xseq
weights <- t(t(weights) / colSums(weights))

# For every point in xseq, calculate sum of weights of y
new_y <- colSums(weights * y)

# Illustrate points and smoothing
plot(x, y)
lines(xseq, new_y, col = 2)


Created on 2021-10-26 by the reprex package (v2.0.1)

This technique is called kernel regression: https://en.wikipedia.org/wiki/Kernel_regression .  I believe your variant is Nadaraya–Watson kernel regression with a Gaussian kernel.
