Re: [R] Help post

2021-02-27 Thread Bert Gunter
Using search term "knn classification" on rseek.org brought up many relevant hits. Among them, the knn() function in package "class" seems relevant -- but there are others, as you will see. Your second question is about statistics and is largely off topic here. Per the posting guide (linked

[R] Help post

2021-02-27 Thread Bijesh Mishra
I have pathogen (1/0) as a dependent variable and total (count) as independent variable. I have to get 1) KNN on total and 2) get the training error and training TPR and FPR for k = 5 nearest neighbors using total as a predictor. and 3) get a plot of training error vs. k for k = 1, 2, ..., 10 with

Re: [R] Help Required for R Markdown function.

2021-02-27 Thread John Kane
The "confusionMatrix" function appears to be from the 'caret' package. Have you loaded 'caret' with the library(caret) command? On Sat, 27 Feb 2021 at 14:20, Kishor raut wrote: > Respected Sir, > > I Mr Kishor Tried to get help online but wont found the solution so > writting an email. > >

Re: [R] Making model predictions

2021-02-27 Thread Bert Gunter
The standard approach for prediction is via a predict() method for the class of the model fit. So, have you checked ?predict.naiveBayes If this does not satisfy your needs, you are on your own. Possibly your best course of action then is to contact the maintainer as the posting guide (linked

[R] confint() on mlm object requires named response matrix

2021-02-27 Thread florian . wickelmaier
Dear list, I fit a multivariate model and want to extract univariate confidence intervals from the mlm object. If the response matrix is unnamed, confint() just repeats the first interval. If the response matrix is named, confint() correctly returns CIs for all columns: set.seed(1143) Y <-

[R] Help Required for R Markdown function.

2021-02-27 Thread Kishor raut
Respected Sir, I Mr Kishor Tried to get help online but wont found the solution so writting an email. Step1: While writting in rmarkdown all codes get executted very well till the fuction Confusionmatrix were written on it. Step2: As confusionmatrix command inserted following error is on screen

Re: [R] how to manage objects on the working environment

2021-02-27 Thread Jeff Newmiller
R typically asks you if you want to save your workspace when you quit. If you say yes, your global environment is saved to a file called ".RData" in your current working directory. When you start R it looks for a file of this name in the current working directory and silently loads it. If you

[R] Making model predictions

2021-02-27 Thread Jeff Reichman
R User Forum Is there a better way than grabbing individual cell values from a model output to make predictions. For example the output from the following Naïve Bayes model library(e1071) ## Example of using a contingency table: data(Titanic) m <- naiveBayes(Survived ~ ., data = Titanic) m

[R] how to manage objects on the working environment

2021-02-27 Thread Carlos Gonzalez
Good morning! Each time I open a new R session, it appears the same objects that I thought were removed on an old session, but the objects I supposed were saved on the last session never appeared. Thanks! Saludos / Regards Carlos A. Gonzalez Mobile +598 94 234 653 cag...@gmail.com