[R-pkg-devel] how to fix checking S3 generic/method consistency ... WARNING
Ulavappa Angadi
@ng@diub @ending from gm@il@com
Thu Aug 30 07:03:18 CEST 2018
Dear sir
How to fix the below problem and details as below kindly help
* checking S3 generic/method consistency ... WARNING
mbferns:
function(x, ...)
mbferns.default:
function(x, y, nf, fsize, bnum)
predict:
function(object, ...)
predict.mbferns:
function(model1, x)
See section 'Generic functions and methods' in the 'Writing R
Extensions' manual.
NAMESPACE as below
xport(mbferns)
S3method(predict,mbferns)
S3method(mbferns,default)
useDynLib(mbFerns,mbrfern,mbrfern_predict)
import(plyr)
import(mlbench)
Functions are as below in Mulit_Branch_Ferns.R
mbferns<-function(x,...)
{ UseMethod("mbferns")}
mbferns.default <- function(x, y, nf=2, fsize=4, bnum=4) {
xx <- .C("mbrfern", as.double(xm), as.integer(y), as.integer(nc),
as.integer(nr), as.integer(c), as.integer(nf), as.integer(fsize),
as.integer(bnum), xmin1=double(nc), xmax1=double(nc),
flist1=integer(nf*fsize), pc=double(c), w=integer(ws))
model<-list(nc=xx[[3]], c=xx[[5]], nf=xx[[6]], fsize=xx[[7]],
bnum=xx[[8]], min=xx$xmin1, max=xx$xmax1, flist=xx$flist1, w=xx$w,
ylist=ylist, pc=xx$pc)
class(model)<-"mbferns"
return(model)
}
predict.mbferns <- function(model1, x) {
w1dens <- .C("mbrfern_predict", as.double(xm), as.integer(model1$nc),
as.integer(nr), as.integer(model1$c), as.integer(model1$nf),
as.integer(model1$fsize), as.integer(model1$bnum), as.double(model1$min),
as.double(model1$max), as.integer(model1$flist), as.integer(model1$w),
as.double(model1$pc), ye=integer(nr), prob=double(nr*model1$c) )
}
With regards
Angadi U B
Sr. Scientist
CABin, IASRI, Pusa, New Delhi
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list