Sbchoice and dbchoice

I want to analyse single- & double-bounded dichotomous data using R. The packages that design to analyse such data are sbchoice and dbchoice which are currently not available. Please do help find the downloadable file or any suggestions regarding how to get it. Precisely urgent...tnx.

It looks like both sbchoice() and dbchoice() are functions in the DCchoice package, which is available on CRAN:
https://cran.r-project.org/package=DCchoice

Thanks for your concern. However, I failed to install the file after downloading form the link that you provided. Here is the error message... install.packages("C:/Users/Arif/Downloads/DCchoice_0.0.15.tar (1).gz", repos = NULL)
Installing package into ‘C:/Users/Dr Arif/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Error in install.packages : type == "both" cannot be used with 'repos = NULL'

install.packages("C:/Users/Arif/Downloads/DCchoice_0.0.15 (4).zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/Arif/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open compressed file 'DCchoice_0.0.15 (4)/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

Please help for further procedure... TIA.

What happens if you run:

install.packages("DCchoice")

Are you having trouble installing other packages as well?

The developer also seems to have pretty extensive documentation here: http://lab.agr.hokudai.ac.jp/spmur/

They include a more specific installation method:

install.packages("DCchoice",
  repos = c("http://www.bioconductor.org/packages/release/bioc",
            "https://cran.rstudio.com/"),
  dep = TRUE)

I installed "DCchoice" pakage already but couldn't install sbchoice and dbchoice.

Those are functions. They're not separate packages to be installed as far as I know. So, you should be able to call those functions once you've loaded the library, DCchoice

To bring up the help pages for the respective functions you can run:

library(DCchoice)
?sbchoice()
?dbchoice()

I don't know what happened to the R software in my PC... the following error message may help sort out the problem.

library(DCchoice)
Loading required package: interval
Error: package ‘Icens’ required by ‘interval’ could not be found

?sbchoice()
Error in .helpForCall(topicExpr, parent.frame()) :
no methods for ‘sbchoice’ and no documentation for it as a function
?dbchoice()
Error in .helpForCall(topicExpr, parent.frame()) :
no methods for ‘dbchoice’ and no documentation for it as a function

The package has not been loaded, so you won't be able to sccess help files. It looks like you need to install Icens.

I don't find the Icens from the available packages https://cran.r-project.org/web/packages/available_packages_by_name.html

Then I don't know. I'm just reading your error message there. It looks like DCchoice is building fine on CRAN, so I'd be surprised if its dependencies weren't available, but one never knows
¯\(°_o)/¯

Icens is on Bioconductor:

If you've never used Bioconductor packages before, you should read their installation documentation:

They also have their own support site, with a posting guide that is good to read before posting.

1 Like

Hi, Use following command to Install Icens before DC choice. I worked for me.

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Icens")

Cheers!