codecheckers / register

Register of CODECHECK certificates
https://codecheck.org.uk/register/
Other
6 stars 2 forks source link

Lazar, ... Spitschan - regulation of pupil size ... #60

Closed sje30 closed 5 months ago

sje30 commented 5 months ago

Repository: https://github.com/codecheckers/LazarEtAl_RSocOpenSci_2024

Certificate: 2024-001

sje30 commented 5 months ago

First, need to get a copy of the manuscript (preferably online) with the figures and tables included.

sje30 commented 5 months ago

Do you have a preprint or something online that I can refer to as the original manuscript? @rrlazar

sje30 commented 5 months ago

first issue:

stephen@blur LazarEtAl_RSocOpenSci_2024 % R

R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin23.0.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

# Bootstrapping renv 1.0.3 ---------------------------------------------------
- Downloading renv ... OK
- Installing renv  ... OK

- Project '~/proj/2020/codecheckers/LazarEtAl_RSocOpenSci_2024' loaded. [renv 1.0.3]
- One or more packages recorded in the lockfile are not installed.
- Use `renv::status()` for more details.
> dir()
 [1] "01_surveydata"          "02_rawdata"             "03_datamerge"          
 [4] "04_demographics"        "05_analysis"            "06_output"             
 [7] "hypotheses_n63.html"    "hypotheses_n83.html"    "hypotheses.Rmd"        
[10] "lablog_RSOS-191613.csv" "LICENSE.md"             "README.md"             
[13] "renv"                   "renv.lock"              "RSOS-191613.Rproj"     
> setwd("01_surveydata/")
> source("
10_surveydata_prep.R                     data_chronobiology_2022-04-07_21-20.csv
cleaned_survey.rda0                      
> source("10_surveydata_prep.R")
Error in library(tidyverse) : there is no package called ‘tidyverse’
sje30 commented 5 months ago

I'm relatively new to 'renv' so not sure what is going on here. I have tidyverse (albeit 1.3.2) on my local system

> require(tidyverse)
Loading required package: tidyverse
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0      ✔ purrr   1.0.0 
✔ tibble  3.1.8      ✔ dplyr   1.0.10
✔ tidyr   1.2.1      ✔ stringr 1.5.0 
✔ readr   2.1.3      ✔ forcats 0.5.2 
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
> 

so something is up with the renv(). I see in renv.lock that version 2.0.0 is required.

Update: I see I need to run renv::restore() to pull the packages.

sje30 commented 5 months ago

problems compiling mvtnorm package:

- Installing mvtnorm ...                        FAILED
Error: Error installing package 'mvtnorm':
===================================

* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using Fortran compiler: ‘GNU Fortran (Homebrew GCC 13.2.0) 13.2.0’
using SDK: ‘MacOSX14.4.sdk’
clang -I"/opt/homebrew/Cellar/r/4.3.2/lib/R/include" -DNDEBUG   -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
clang -I"/opt/homebrew/Cellar/r/4.3.2/lib/R/include" -DNDEBUG   -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c lpmvnorm.c -o lpmvnorm.o
clang -I"/opt/homebrew/Cellar/r/4.3.2/lib/R/include" -DNDEBUG   -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c ltMatrices.c -o ltMatrices.o
clang -I"/opt/homebrew/Cellar/r/4.3.2/lib/R/include" -DNDEBUG   -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c miwa.c -o miwa.o
/opt/homebrew/opt/gcc/bin/gfortran  -fPIC  -g -O2  -c mvt.f -o mvt.o
clang -I"/opt/homebrew/Cellar/r/4.3.2/lib/R/include" -DNDEBUG   -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c mvtnorm-init.c -o mvtnorm-init.o
/opt/homebrew/opt/gcc/bin/gfortran  -fPIC  -g -O2  -c tvpack.f -o tvpack.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/opt/homebrew/Cellar/r/4.3.2/lib/R/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -o mvtnorm.so C_FORTRAN_interface.o lpmvnorm.o ltMatrices.o miwa.o mvt.o mvtnorm-init.o tvpack.o -L/opt/homebrew/Cellar/r/4.3.2/lib/R/lib -lRlapack -L/opt/homebrew/opt/openblas/lib -lopenblas -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin23/13 -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc -L/opt/homebrew/opt/gcc/lib/gcc/current -lgfortran -lemutls_w -lquadmath -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin23/13 -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc -L/opt/homebrew/opt/gcc/lib/gcc/current -lgfortran -lemutls_w -lquadmath -L/opt/homebrew/Cellar/r/4.3.2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ld: warning: ignoring duplicate libraries: '-lemutls_w', '-lgfortran', '-lquadmath'
ld: warning: search path '/opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin23/13' not found
ld: warning: search path '/opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin23/13' not found
ld: library 'emutls_w' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mvtnorm.so] Error 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/Users/stephen/proj/2020/codecheckers/LazarEtAl_RSocOpenSci_2024/renv/staging/1/mvtnorm’install of package 'mvtnorm' failed [error code 1]
Traceback (most recent calls last):
13: renv::restore()
12: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
11: renv_install_impl(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_package(record))
 7: renv_install_package(record)
 6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 5: renv_install_package_impl(record)
 4: r_cmd_install(package, path)
 3: r_exec_error(package, output, "install", status)
 2: abort(all)
 1: stop(fallback)
>

Problem seems to be the linker fails to find emutls_w library. Trying to upgrade 'gcc' and other brew packages based on feedback in: https://stackoverflow.com/questions/76096681/macos-brew-system-r-packages-fail-to-install-with-emutls-w

Update: 'brew upgrade' seems to have improved things; R 4.3.3. now installed, and mvtnorm is installed. 199 packages to install as part of renv.

sje30 commented 5 months ago

all compiling okay now...

sje30 commented 5 months ago

completed.

sje30 commented 5 months ago

This repo was archived at Zenodo via: https://doi.org/10.5281/zenodo.10829465