-
Notifications
You must be signed in to change notification settings - Fork 5
Fix use of substitute in line of augment.R #8
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
Conversation
|
Hello, {data.table} plans to release to CRAN in August, so please be advised that {msmtools} will need a new version in the near future. Thanks in advance! |
|
@ColeMiller1 I tried updating the code following your suggestions (thx!). I worked on Still, I am struggling finding what causes the following issue when building the vignette. The result below follows an R CMD check from RStudio with the flag --as-cran activated. Any idea on what is going on here? |
|
Hi @contefranz - It looks like you are in the right direction! That is a very large diff but based on the error, this seems most probable to be the source of the error. Lines 646 to 647 in fbdfbcb
Lines 612-614 also have assignment to a |
|
I filed a follow-up PR (#9) to focus on the |
Thanks for looking into this. To be honest, I am not following what the problem is anymore. I fixed all of the NSE issues caused by either Why is the creation of if ( getRversion() >= "2.15.1" ) {
utils::globalVariables( c( "status", "status_num", "n_status",
"status_exp", "status_exp_num", "n_status_exp",
".", "V2" ) )
}So I now have two questions:
Furthermore, is the direction I took correct? Meaning, are those fix what you wanted me to do in the first place? I am sorry for all these questions, but I am really willing to fix any issue just not getting what the issue is. Thanks! |
Right - I am not sure what the exact problem in your branch is, either. You did a lot of work, but my guess is that there is a bug which results in the number of rows being assigned to be incorrect. That's why you are seeing the error about
The error is not related to the object library(data.table)
dt = as.data.table(iris)
dt[, my_new_col := 1:30]
## Error in `[.data.table`(dt, , `:=`(my_new_col, 1:30)) :
## Supplied 30 items to be assigned to 150 items of column 'my_new_col'. If you wish to 'recycle' the RHS please use rep() to make this intent clear to readers of your code.
You did a lot of work, I agree. Unfortunately, you introduced a different problem that I am unsure what change caused the error. I did not get vignette errors on your main branch and I did not get vignette errors after I made changes mainly targeting
Because I was not sure what was causing the new error with the vignette. It was easier to start from something that was working correctly. I know you spent time on your branch so it's OK if you're able to figure out the problem and ignore my other PR.
I like the direction you took. In addition to targeting Thanks! |
Hi @contefranz,
After installing data.table from github master,
data.table::update_dev_pkg()
And then running R CMD check on msmtools, I get the following new failure, (which is not present if you use data.table from CRAN)
Before uploading new versions to CRAN, data.table needs to ensure that updates do not break CRAN checks in dependent packages like msmtools (see also Rdatatable/data.table#6033). So can you please submit an updated version of msmtools to CRAN, that fixes this check issue? In particular, I would suggest to avoid using
substitute()on the LHS of your:=calls, and instead use the column variable directly. For example,would become
In future versions of data.table, we will start to deprecate the use of additional checks for
substitute(col)on the LHS of assignment calls so many of these calls would no longer work as previous versions allowed.