🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

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

User: "ClaudiaSol"
New Altair Community Member
Updated by Jocelyn

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 :])

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Andrew2"
    New Altair Community Member

    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.