A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vincenzocoia/CopulaModel below:

vincenzocoia/CopulaModel: Repository for the CopulaModel package by Harry Joe and Pavel Krupskii

Repository for the CopulaModel R package by Harry Joe and Pavel Krupskii.

The content in this repository is originally located at https://copula.stat.ubc.ca/, under the heading "CopulaModel software". It's made available on GitHub in an effort to improve accessibility.

The files you see here integrate the 2015.09.03 "patches and additions" with the original CopulaModel package.

⚠️ These instructions have not been vetted yet ⚠️ .

If you have the prerequisite software installed (see below), executing the following R code should install the CopulaModel package:

devtools::install_github("vincenzocoia/CopulaModel")

You'll need a couple things installed before installing CopulaModel from this GitHub repo:

  1. gcc
  2. devtools

For Mac OS, you can use HomeBrew:

  1. Open Terminal
  2. Check that you have HomeBrew installed by typing which brew.
  1. Install gcc by typing brew install gcc
  1. You can check that gcc is successfully isntalled by typing which gcc.

Sorry, I don't have Windows instructions yet. I think Linux should work the same way as Mac OS here.

Run the following R code to install the devtools package:

install.packages("devtools")
Installation Troubleshooting

When tested on a Mac, the installation tries to look for "libraries" in the wrong place. You can tell if this is the case if you find the message "Library not loaded" somewhere in the error message. For example, halfway through the error message, you might see something like:

Library not loaded: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib

That's the directory R is looking for the file libRblas.dylib, yet this file is not in that location.

I figured out how to solve the problem, thanks to this Stack Overflow post.

Here's what you'll need to do:

  1. Find the actual location of the file R is looking for (libRblas.dylib in the above cases)
  2. Link the actual location of the file to the place R is looking, with the command ln actual/path/to/file path/where/R/is/looking
  3. Try to install the package again. If you get another Library not loaded error, repeat (I had to do this three times).

The libraries that were missing on my mac were:

So, all in all:

sudo ln /usr/local/Cellar/gcc/10.2.0/lib/gcc/10/libgfortran.5.dylib /usr/local/gfortran/lib/libgfortran.3.dylib
ln /usr/local/Cellar/gcc/10.2.0/lib/gcc/10/libquadmath.0.dylib /usr/local/gfortran/lib/libquadmath.0.dylib
mkdir -p /Library/Frameworks/R.framework/Versions/3.5/Resources/lib
ln /Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib

Sometimes when I tried to install the package, I wouldn't get the "Library not loaded" error, but would get a "Rank mismatch" error in a Fortran script. You can see the error message below.

To elicit the more desirable "library not loaded" error, I downloaded this very CopulaModel repository as a zip file, unzipped it, and called install.packages("~/Downloads/CopulaModel-master", type = "source", repos = NULL)

> devtools::install_github("vincenzocoia/CopulaModel")
Downloading GitHub repo vincenzocoia/CopulaModel@HEAD
✓  checking for file ‘/private/var/folders/dx/zr_sf92j4t95y6z16w_j6b780000gn/T/RtmpGaNFDT/remotes3fda601e7e12/vincenzocoia-CopulaModel-c0c2150/DESCRIPTION’ ...
─  preparing ‘CopulaModel’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘CopulaModel_0.6.tar.gz’
   
* installing *source* package ‘CopulaModel’ ...
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c R_exchmvn.c -o R_exchmvn.o
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c  Rgauss-trvine-nonuniq.f90 -o Rgauss-trvine-nonuniq.o
Rgauss-trvine-nonuniq.f90:107:43:

  103 |                 call intpr("within eps for ",15,j,1)
      |                                                2
......
  107 |                   call intpr("next row",8, A2(i,:),d)
      |                                           1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
Rgauss-trvine-nonuniq.f90:124:34:

  103 |                 call intpr("within eps for ",15,j,1)
      |                                                2
......
  124 |               call intpr("perm",4,aperm,d)
      |                                  1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
Rgauss-trvine-nonuniq.f90:154:33:

  103 |                 call intpr("within eps for ",15,j,1)
      |                                                2
......
  154 |         call intpr("next row",8, A1(i,:),d)
      |                                 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
Rgauss-trvine-nonuniq.f90:164:51:

  103 |                 call intpr("within eps for ",15,j,1)
      |                                                2   
......
  164 |   call intpr("approx nonunique for j=1,...,d-2",32,nonuniq,d-2)
      |                                                   1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make: *** [Rgauss-trvine-nonuniq.o] Error 1
ERROR: compilation failed for package ‘CopulaModel’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/CopulaModel’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/CopulaModel’
Error: Failed to install 'CopulaModel' from GitHub:
  (converted from warning) installation of package ‘/var/folders/dx/zr_sf92j4t95y6z16w_j6b780000gn/T//RtmpGaNFDT/file3fda74f571f1/CopulaModel_0.6.tar.gz’ had non-zero exit status

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4