alexander-pastukhov / bistablehistory

A package to compute a cumulative history for time-series of perceptual dominance in bistable displays.
https://alexander-pastukhov.github.io/bistablehistory
GNU General Public License v3.0
0 stars 1 forks source link

Instalation and fisrt use issues #1

Closed fernandomayer closed 3 years ago

fernandomayer commented 3 years ago

Hi @alexander-pastukhov,

I'm starting to review your package for JOSS (https://github.com/openjournals/joss-reviews/issues/3901) and when I try to install it, I get this output:

> library("devtools")
Loading required package: usethis
> install_github("alexander-pastukhov/bistablehistory",dependencies=TRUE)
Downloading GitHub repo alexander-pastukhov/bistablehistory@HEAD
✔  checking for file ‘/tmp/RtmpXBmB2G/remotes22da80592c6/alexander-pastukhov-bistablehistory-4053d59/DESCRIPTION’ ...
─  preparing ‘bistablehistory’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
   Warning in system2(command, args, stdout = NULL, stderr = NULL, ...) :
     error in running command
─  installing the package to process help pages

The 9th line seems strange to me. Maybe there is something diferent in the src directory? After this, the package compiles and installs normally. However, when I try to run the first example in README, I get an error saying that the fit_cumhist could not be found:

> library(bistablehistory)
> data(br_singleblock)
> gamma_fit <- fit_cumhist(br_singleblock,
                        state="State",
                        duration="Duration")
Error in fit_cumhist(br_singleblock, state = "State", duration = "Duration") : 
  could not find function "fit_cumhist"

It looks like fit_cumhist was not exported. I saw it has the @export tag, but it is not in the NAMESPACE. Maybe you need to update it?

This is my sessionInfo()

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

Matrix products: default
BLAS/LAPACK: /opt/intel/mkl/lib/intel64/libmkl_gf_lp64.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] lattice_0.20-45

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2    grid_4.1.2    
alexander-pastukhov commented 3 years ago

Dear @fernandomayer,

thank you and terribly sorry, I was so happy that the CRAN version works that I did not double check the developmental version. I've added information on installation from CRAN to README (install.packages("bistablehistory") that one definitely works and the installation is much quicker with precompiled binaries). For the developmental version the exports were indeed MIA somehow, not sure how that could have happened given that they are generated by roxygen2. I've re-roxygenized it, so the exports are there and package installs correctly and works.

Line #9 Warning in system2(command, args, stdout = NULL, stderr = NULL, ...) : error in running command Cannot replicate it on Windows but it is looks like a part of the general package infrastructure.

fernandomayer commented 3 years ago

Thanks.

I tested both the CRAN and the Github versions and now both are working.

Just a few additional comments:

alexander-pastukhov commented 3 years ago