myknn<-function(train_data,train_Y,test_data){
data.knn=kknn(train_Y~.,train_data,test_data,distance = 2,kernel="gaussian")
fit<-fitted(data.knn)
return(fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.