I am having issues with the following command:
install.packages("packfor", repos="http://R-Forge.R-project.org")
.......
Warning in install.packages :
unable to access index for repository http://R-Forge.R-project.org/bin/macosx/contrib/4.2:
cannot open URL 'http://R-Forge.R-project.org/bin/macosx/contrib/4.2/PACKAGES'
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘packfor’
Do you want to attempt to install these from sources? (Yes/no/cancel)
installing the source package ‘packfor’
trying URL 'http://R-Forge.R-project.org/src/contrib/packfor_0.0-8.tar.gz'
Content type 'application/x-gzip' length 8844 bytes
downloaded 8844 bytes
- installing source package ‘packfor’ ...
** using staged installation
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c forward.c -o forward.o
forward.c:411:3: error: implicit declaration of function 'dgesvd_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
F77_CALL(dgesvd)(&jobu, &jobvt,&size, &size,A, &size, D,U,&size,V,&size,&work1, &lwork,&error);
^
/Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:77:22: note: expanded from macro 'F77_CALL'
define F77_CALL(x) x ## _
^
:80:1: note: expanded from here
dgesvd_
^
forward.c:421:43: warning: data argument not used by format string [-Wformat-extra-args]
fprintf(stderr, "error in dinvG: ", error);
~~~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Resources/include/R_ext/Error.h:52:15: note: expanded from macro 'error'
#define error Rf_error
^
1 warning and 1 error generated.
make: *** [forward.o] Error 1
ERROR: compilation failed for package ‘packfor’
- removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/packfor’
Warning in install.packages :
installation of package ‘packfor’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/c7/b0nwnl650c35n5gzff7x80b80000gn/T/Rtmpp3rUe3/downloaded_packages’
(end)
Could anyone help me please.
(I am using R4.2.1 on my macOS 12.3.1)
Thank you!