# Difference between smoothing splines and splines in R

After watching this video lecture I was experimenting in R with the splines, and I saw that there is the ns and the bs.

But there is also the smoothing.spline. I thought that the splines in general, is a way to transform your variables.

So I understand how the ns and the bs work, but I do not understand how the smoothing.spline works, in the sense, why does someone need to put also as input the dependent variable variable y, instead of just putting as input only the x that you want to transform.

I had the impression that the only difference is that, by using smoothing.spline you do not have to choose the number of knots