package required for "mmetric" function in R - r

I'm trying out Naive Bayes classification using stock dataset in R. Now for displaying the final results I've seen a function mmetric taking testing data and prediction model as arguments. But while I'm trying the same I'm facing the error could not find function "mmetric". I have installed the rminer and list packages which are quotes as reference packages for these. But still I could not resolve it.
Any Suggestions to resolve the error?

I got same error but i updated my Rcpp package that will be needed by rminer to load on the system, hope this helps.

Related

Using ConsRank in R Studio

Installed both R studio and ConsRank package but i have little R and Math knowledge.
I need to understand how to calculate and reach the result of the formula in attached files.
To solve this problem, correlation coefficient τx used which is intruduced by Emond and Mason (2002)
I tried to use ConsRank functions but my R knowledge was not enough.
FormulaFormula
MatrixMatrix
ResultResult
The first step is to install and load the package ConsRank using the following codes:
install.packages('ConsRank', dependencies=T)
library(ConsRank)
If you successfully load the package, you are good to go. The next step is to read the documentation of the package (Click Here) in which you will learn about what functions you will need and there are some different examples that help you understand the input and outputs.
Let me know if you needed any help running your scripts. Good Luck.

Problem in model fit () in Keras R Package for a simple DNN

I've been trying to fit a simple model for a house price prediction in the following model:
Everything runs fine till the fit part, where I get the following error:
I've tried installing reticulate and RTools manually, using online notebooks like Kaggle and could not figure out how to implement this. Can somebody help me please. Thanks in advance!
I've tried using the library KerasR as well but couldn't get it running too, but for other reasons: invalid 'dimnames' given for data set, but this is something for another post

"imagesc" function belongs to which packages and libraries in r?

After forming the matrix( which is my resultant image ) from certain data I am trying to display the image using the "imagesc" in r. The same thing I already had done in Matlab. To do the same in r I found out "imagesc" in r. but when I use this function it is showing the following error message
No documentation for ‘imagesc’ in specified packages and libraries:
you could try ‘??imagesc’
Even I already incorporated
library(R.matlab)
please help me to resolve the issue? I am a beginner in r programming.
You are looking for the function imagesc in the wrong package.
The package R.matlab doesn't have such function (see R.matlab).
You can find it in the matlab package, though.
So just do:
install.packages("matlab")
library(matlab)
and you'll be good to go with imagesc.
That said, if your task is going to be a recurrent one, I think it's a good idea to use native R solutions, instead of Matlab's. In such case, you may want to check ggplot2::geom_tile.
Check this image, for instance:

R forecast function error

I am trying to use the forecast function (forecast package in R) and running into problem. Consider the following example:
library(forecast)
fit=arima(WWWusage,order=c(1,1,1))
fcast=forecast(fit)
plot(fcast)
At the forecast step, I am getting the error message:
Error in .forecast.transform(x, xv, a, h, 1) :
argument "xv" is missing, with no default
This happens even if I replace arima by Arima or auto.arima functions in the forecast package.
Thank you Andrie and Rob for your helpful suggestions. I have fixed the problem, but not sure how. I installed an update to RStudio and reinstalled the forecast library and it worked! Maybe something got messed up recently.
Also, I want to take this opportunity to thank you, Rob, for developing this extremely useful R package.

R cannot find specific function in a package

I'm using the randomForest package (v 4.6-7) in R (v 2.15.3) and can easily use the function randomForest to create a model. However, when I try to predict on my test set, the predict.randomForest function cannot be found. I've also tried plotting with plot.randomForest only to get the same error, "could not find function."
I've already tried reinstalling the package (figuring maybe it was out of date) and made sure the spelling is absolutely correct. I cannot figure out what's causing this error, any ideas?
It appears that the functions of interest are not exported from the package.
If you use ls(package:randomForest) you'll get a list of the exported functions.
If you want to see all the functions available the use: ls(getNamespace("randomForest"), all.names=TRUE). Thanks #Joshua.
You'll see the functions you want there.
In order to refer to one of them explicitly, use: randomForest:::predict.randomForest()
or just make a object which inherits the class 'randomForest' and call predict() on it directly.

Resources