Error: could not find function "iv.mult"

r

#1

Hi,

I am trying to use iv.mult function for calculating information value to filter significant predictor variable.
I tried installing below packages but then too

library(devtools)
install_github(“riv”,“tomasgreif”)
library(woe)

emp_iv<-iv.mult(Empchurn_RF.dev,“gb”,TRUE)

sysntax is not working for me

Looking forward for assistance

Thanks
Shubham


#2

@Shubham26

Hi there, you need to source the riv library too.

library(devtools)

install_github("riv","tomasgreif")

install_github("woe","tomasgreif")

library(woe)

library(riv) 

emp_iv<-iv.mult(Empchurn_RF.dev,"gb",TRUE)

Hope this helps.

Regards,
Neeraj


#3

Hi Neeraj,

I tried installing above packages, got error for both riv and woe

Error: Command failed (1)
In addition: Warning message:
Username parameter is deprecated. Please use tomasgreif/woe

I tried with - install_github(“tomasgreif/woe”)
still same error


#4

@Shubham26

Hi there,

Use the below code and update on the issue.

library(devtools)

install_github("tomasgreif/riv","tomasgreif",force=TRUE)

library(woe)

Regards,
Neeraj


#5

Did as mention, still same error

Ouput
Downloading GitHub repo tomasgreif/riv@master
from URL https://api.github.com/repos/tomasgreif/riv/zipball/master
Installing woe
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
“C:/Users/Shubham/AppData/Local/Temp/RtmpOy1MGI/devtools279c52a91e06/tomasgreif-woe-43fcf26”
–library=“C:/Users/Shubham/Documents/R/win-library/3.2” --install-tests

  • installing source package ‘woe’ …
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** demo
    ** preparing package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called 'DBI’
    ERROR: lazy loading failed for package ‘woe’
  • removing ‘C:/Users/Shubham/Documents/R/win-library/3.2/woe’
  • restoring previous 'C:/Users/Shubham/Documents/R/win-library/3.2/woe’
    Error: Command failed (1)

#6

@Shubham26

You do not have the DBI package installed. Before this,

install.packages(“DBI”,dependencies=TRUE)

Regards.


#7

Hi NSS,

I am facing a similar issue. I am running the following code:

library(devtools)
install.packages(“DBI”,dependencies=TRUE)
library(DBI)
install_github(“tomasgreif/riv”,“tomasgreif”,force=TRUE)
library(woe)
german_data=read.csv(“C:/Users/akaran/xyz/RWorkspace/german_data.csv”)
IV=iv.mult(german_data,“gb”,TRUE)

and getting the following Error:
could not find function “iv.mult”

Please help.

Thanks.


#8

I do face the same issue.
Loaded devtools, DBI, riv, woe packages.
but, getting the error:
Error: could not find function “iv.mult”

Any help to crack this.?


#9

Same issue any help please or an alternate way to calculate woe


#10

Hey,
If you are trying to calculate WoE or IV, you can always use the following-

install.packages('Information')
library(Information)

IV <- create_infotables(data= input_data, y = "your response variable")
IV$Tables