AileneKane / radcliffe

3 stars 1 forks source link

issues with join errors on only one computer #48

Closed lizzieinvancouver closed 3 months ago

lizzieinvancouver commented 1 year ago

@AileneKane wrote:

I would like to get to the bottom of your errors, though, as I’d like to make sure that others can run the code with no problems. Is it possible that you had a different library loaded that might interfere with something in my code?

If you’re able sometime (and no rush), perhaps you could try running the file again after restarting R or making sure that no other packages are loaded.

I tried this and I get the same error:

> source("Analyses/source/standard_mergesandwrangling.R")
[1] 54297    51
Warning message:
In inner_join(exppheno, expclim2, by = c("site", "block", "plot",  :
  Each row in `x` is expected to match at most 1 row in `y`.
ℹ Row 5470 of `x` matches multiple rows.
ℹ If multiple matches are expected, set `multiple = "all"` to silence this warning.
> 

However in the source code I noticed you left in my edits such as:


if(length(grep("lizzie", getwd())>0)) { 
    expgdd<-inner_join(exppheno, expclim2, by=c("site", "block", "plot","year","doy"), copy=TRUE) # This one gives a warning
}

... so I also tried running your code (not the stuff I wrote) and this is the sort of error I get:


> expgdd<-inner_join(exppheno, expclim2, by=c("site", "block", "plot","year","doy"), match="all", copy=TRUE)
Error in `inner_join()`:
! `...` must be empty.
✖ Problematic argument:
• match = "all"
Run `rlang::last_error()` to see where the error occurred.

I did not check that I do not have other packages loaded as rm(list=ls()) at the top of your code should cover that.

AileneKane commented 3 months ago

@lizzieinvancouver I had these same issues on my computer this year (likely related to updated versions of something...) I fixed it on mine, so you may be able to update your code to match mine to address these? hope so