Note that I'm not familiar with this package or the method.
Also note that you haven't told anyone what function you're using, or
what your call was.

I'm assuming that you're using the rotationForest() function.
According to its help page, the default is:

    K = round(ncol(x)/3, 0)

There's no reason why the default K value should be higher than the
number of columns, unless:
(1) There's a bug with the package; or
(2) There's a problem with your input.

I note that the package is only version 0.1.3, so a bug is not out of
the question.
Also, I'm a little surprised the author didn't use integer division:

    K = ncol (x) %/% 3

You could just set K to the above value, and see what happens...


On Fri, Aug 21, 2020 at 1:06 PM Sparks, John <jspa...@uic.edu> wrote:
>
> Hi R Helpers,
>
> I wanted to try the rotationForest package.
>
> I pointed it at my data set and got the error message "Error in if (K >= 
> ncol(x)) stop("K should not be greater than or equal to the number of columns 
> in x") :
>   argument is of length zero'.
>
> My dataset has 3688 obs. of  111 variables.
>
> Would a quick adjustment to the default value of K resolve this?
>
> If anybody with more experience with the package than me has a general 
> suggestion I would appreciate it.
>
> --John Spaarks
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to