# how many knots used in bs() [closed]

If I fit the following model to some data

m_splines <- lm(data$$y ~ bs(data$$x, df = 6))


how do I know how many knots have been used for the cubic spline?

## closed as off-topic by kjetil b halvorsen, Peter Flom♦Mar 21 at 12:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – kjetil b halvorsen, Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

• Did you look at the documentation for bs? – The Laconic Mar 21 at 12:09
• I did, but I can't figure out what's the default value for the number of knots. – alessandro Mar 21 at 12:11
• just found out that I can use attr(bs(data$x, df = 6),"knots") for the internal knots and attr(bs(data$x, df = 6),"Boundary.knots") for the boundary knots. – alessandro Mar 21 at 17:32