Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code changes needed #3

Open
sguyader opened this issue Nov 16, 2018 · 1 comment
Open

Code changes needed #3

sguyader opened this issue Nov 16, 2018 · 1 comment

Comments

@sguyader
Copy link

Here are some other changes needed to run the code:

  1. Lines 412 and 837
    The detrended <- rbind(ww1, ww2) command produced a matrix, which can't be used by the group_by command in line 423. Instead of rbind, I suggest to use dplyr::bind_rows.
  2. Line 951
    The fit_GAMs function called line 948 creates an object named X, not X1. Therefore, on line 951 we have to reflect this by changing Get_LE_from_fit2(gams, X1, epsval=0.01) to Get_LE_from_fit2(gams, X, epsval=0.01)
  3. Line 992
    The command cors.long <- gather(cors, key=dist, convert=F) doesn't give the expected result, as the dist column is considered as one of the variables to be "gathered". As a result, the data frame we obtain has 2 columns, the first one labeled "dist" but containing the variables, and the second one containing the "values" but with the first 12 corresponding to the distance. The correct command should be gather(cors, 2:13, key=Variable, value=Correlation, convert=F)
@rougier
Copy link
Contributor

rougier commented Nov 16, 2018

Forwarded to @opetchey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants