0

Currently learning to write a k nearest neighbour function in R, and I'm not sure what .class does in this line of code?

my_knn.class <- function (ts, input_mat, cl, k)

  • 3
    That's part of the name of your function. Unlike in other languages like Python and Javascript, `.` can be part of a variable name in R without any special meaning. That's just what you named it – camille Oct 15 '21 at 17:08

0 Answers0