🎉 🎉   RAPIDMINER 9.5 BETA IS OUT!!!   🎉 🎉

GRAB THE HOTTEST NEW BETA OF RAPIDMINER STUDIO, SERVER, AND RADOOP. LET US KNOW WHAT YOU THINK!

CLICK HERE TO DOWNLOAD

🦉 🎤   RapidMiner Wisdom 2020 - CALL FOR SPEAKERS   🦉 🎤

We are inviting all community members to submit proposals to speak at Wisdom 2020 in Boston.


Whether it's a cool RapidMiner trick or a use case implementation, we want to see what you have.
Form link is below and deadline for submissions is November 15. See you in Boston!

CLICK HERE TO GO TO ENTRY FORM

Using Execute R - '[1] no terms component nor attribute]'

ClaudiaSolClaudiaSol Member Posts: 1 Contributor I
edited November 2018 in Help

Hello everyone!

I'm very new at Rapidminer AND R, so in my efforts to use the R script thingy to determine how many clusters are optimal, I'm totally stuck.

To set the stage: I have information in an XLSX document, which I read with a 'Read Excel' box, then I process that, getting what you can see in the images attached. And then, I give that to my 'Execute R' box with this inside:


rm_main = function(data)
{
d <- model.matrix(data, diss=NULL, distance = "euclidean", min.nc=2, max.nc=6, method = "kmeans", index = "hubert")

library("NbClust")

res<- NbClust(d, diss=NULL, distance = "euclidean", min.nc=2, max.nc=6, method = "kmeans", index = "hubert")
}

AND if I run it, it says this is the error: '[1] no terms component nor attribute]', which doesn't really give me any usefull information (cause I don't get much of this, you see?

So, my questions are:

1. Where's the problem? (Where should I look for it?)

2. Does this part make any sense?
' d <- model.matrix(data, diss=NULL, distance = "euclidean", min.nc=2, max.nc=6, method = "kmeans", index = "hubert" '
What I'm trying to do there is giving the data the right kind of format and that's what I took from what I read but I'm not certain of it (or anything much, to be honest)

I'm also posting images of the process just in case they are of any use to anyone trying to help me figure this out. (Thanks a lot, by the way :])

Tagged:

Answers

  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458   Unicorn

    Executing this line 

    d <- model.matrix(iris, diss=NULL, distance = "euclidean", min.nc=2, max.nc=6, method = "kmeans", index = "hubert")

    from an interactive R session using the iris data leads to 

    Error in terms.default(object) : no terms component nor attribute

    So the problem is the R script.

    Get the R script working interactively first then make it work inside RapidMiner. Google is your friend for answering R related questions.

Sign In or Register to comment.