Search
Question: CRImage lacking functions presented in the manual
0
gravatar for valleem
9 weeks ago by
valleem0
valleem0 wrote:

Hello!

I have the same question as there : CRImage createTrainingSet package is not available to install

...but no clue of the answer. 

I have used lsf.str("package:CRImage") and I can see that createTrainingSet function is not listed.

*edit : I have downloaded the source and there are no createTrainingSet.R script... That might explain why...

Thanks for any help!

> source("https://bioconductor.org/biocLite.R")
> biocLite("CRImage")

> library(CRImage)
> f = system.file("extdata", "exImg.jpg", package="CRImage")
> img=readImage(f)
> trainingValues=createTrainingSet(filename=f,maxShape=800,minShape=40,failureRegion=2000)
Error in createTrainingSet(filename = f, maxShape = 800, minShape = 40,  : 
  could not find function "createTrainingSet"

As needed, the output of sessionInfo() :

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] dplyr_0.7.6         CRImage_1.28.0      aCGH_1.58.0         multtest_2.36.0     Biobase_2.40.0     
 [6] BiocGenerics_0.26.0 survival_2.42-3     cluster_2.0.7-1     DNAcopy_1.54.0      EBImage_4.22.1     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.19     pillar_1.3.0     compiler_3.5.1   bindr_0.1.1      bitops_1.0-6     class_7.3-14    
 [7] iterators_1.0.10 tools_3.5.1      digest_0.6.17    tibble_1.4.2     jsonlite_1.5     lattice_0.20-35 
[13] pkgconfig_2.0.2  png_0.1-7        rlang_0.2.2      Matrix_1.2-14    foreach_1.4.4    rstudioapi_0.8  
[19] yaml_2.2.0       bindrcpp_0.2.2   e1071_1.7-0      fftwtools_0.9-8  htmlwidgets_1.3  tidyselect_0.2.4
[25] locfit_1.5-9.1   stats4_3.5.1     grid_3.5.1       sgeostat_1.0-27  glue_1.3.0       R6_2.3.0        
[31] jpeg_0.1-8       purrr_0.2.5      magrittr_1.5     codetools_0.2-15 htmltools_0.3.6  MASS_7.3-50     
[37] splines_3.5.1    abind_1.4-5      assertthat_0.2.0 tiff_0.1-5       RCurl_1.95-4.11  crayon_1.3.4  

 

ADD COMMENTlink modified 9 weeks ago • written 9 weeks ago by valleem0
1

Yes, it seems that function is missing from CRImage and the example line in the manual is simply text - it's never run or checked to see if it works. It looks like it was removed a long time ago, but you can still find it in the source code for this version of the package (http://www.bioconductor.org/packages/2.10/bioc/html/CRImage.html), but I presume it was removed for a reason....

ADD REPLYlink written 9 weeks ago by Mike Smith3.1k

Hi Mike!

Yes I agree with you, and with my first try of the older package, createTrainingSet() is calling to 'hullFeatures' and cannot find it. A quick search on it showed that it is a deprecated function of EBImage, and has been replaced by computeFeatures.shape().
So yes, there is a reason it is not anymore included, I guess. I contacted the authors as well if they answer I will follow up here.

ADD REPLYlink written 9 weeks ago by valleem0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 156 users visited in the last hour