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

:= works with GForce #5245

Merged
merged 9 commits into from Dec 9, 2021
Merged

:= works with GForce #5245

merged 9 commits into from Dec 9, 2021

Conversation

ben-schwen
Copy link
Member

Closes #1414

@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #5245 (b815f54) into master (9619ad5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5245   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files          77       77           
  Lines       14647    14655    +8     
=======================================
+ Hits        14575    14583    +8     
  Misses         72       72           
Impacted Files Coverage Δ
R/data.table.R 99.89% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9619ad5...b815f54. Read the comment docs.

@mattdowle mattdowle added this to the 1.14.3 milestone Dec 9, 2021
@mattdowle mattdowle merged commit c3df3bc into master Dec 9, 2021
@mattdowle mattdowle deleted the gforce_assign branch December 9, 2021 00:34
@mattdowle
Copy link
Member

mattdowle commented Dec 9, 2021

Failed GLCI in R 3.5.0, 3.4.4 and 3.1.0 due to the following, using test 1085 as example and R 3.1.0 :

Browse[2]> ans
[[1]]
[1] 1 2

[[2]]
[1] "1997-06-02" "1998-01-11"

Browse[2]> sapply(ans,class)
[[1]]
[1] "integer"

[[2]]
[1] "IDate" "Date" 

Browse[2]> length(g)
[1] 1
Browse[2]> len__
[1] 5 5
Browse[2]> class(len__)
[1] "integer"
Browse[2]> lapply(tail(ans, -length(g)), rep.int, times = len__)   # in this PR as of now
[[1]]
 [1] 10014 10014 10014 10014 10014 10237 10237 10237 10237 10237

Browse[2]> lapply(tail(ans, -length(g)), rep, times = len__)  # changing `rep.int` to `rep` appears to work
[[1]]
 [1] "1997-06-02" "1997-06-02" "1997-06-02" "1997-06-02" "1997-06-02"
 [6] "1998-01-11" "1998-01-11" "1998-01-11" "1998-01-11" "1998-01-11"

so I'll change rep.int to rep to pass. I don't know in which version of R after 3.5.0 that this expression started to retain the class. In R 3.6.0 there was a news item "as.call(), rep.int(), rep_len() and nchar() dispatch internally.` and in R 4.0.0 there was "When internal dispatch for rep.int() and rep_len() fails, there is an attempt to dispatch on the equivalent call to rep()."

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

Successfully merging this pull request may close these issues.

GForce should be able to work with := as well.
3 participants