🎉 🎉 RAPIDMINER 9.10 IS OUT!!! 🎉🎉

Download the latest version helping analytics teams accelerate time-to-value for streaming and IIOT use cases.

CLICK HERE TO DOWNLOAD

R extension failed on column selection

wanglu2014wanglu2014 Member Posts: 19 Contributor II
edited April 2020 in Help

Hi:

My code is

rm_main = function(dat)
{
    #dat<-dat[-which(rowMeans(is.na(dat)) > 0.5), ]
    dat<-dat[ ,-which(rowMeans(is.na(dat)) > 0.5)]
    return(data.frame(dat))
}

 

When run "dat<-dat[-which(rowMeans(is.na(dat)) > 0.5), ]", rapidminer get the wanted dataframe, however, when run "dat<-dat[ ,-which(rowMeans(is.na(dat)) > 0.5)]" is wrong.

It take "which(rowMeans(is.na(dat)) > 0.5)" result as a list, not filter the dataframe.

Could you kindly suggest some idea?

Tagged:

Answers

  • SGolbertSGolbert RapidMiner Certified Analyst, Member Posts: 344   Unicorn

    The error lies in the R code itself. You are subsetting the columns using row data (porcentange of missing values in a row). That is incorrect.

Sign In or Register to comment.