Replace .validLHS() with tryCatch()?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Locate the current .validLHS() usage and inspect how assignment errors are handled around the shown on.exit pattern. Compare the proposed try() and tryCatch() approaches, then establish the expected behavior before changing anything. Done requires a maintainer decision on the replacement and verification that assignment behavior remains correct.
Written by the indexing model from the issue text.
Description
The ultimate test of whether something can be assigned to is to actually try assigning to it.
It may therefore make sense to replace the
if(.validLHS(xn,parent.frame())){ #If x not anonymous, set in calling env
on.exit(eval.parent(call('<-', xn, x)))
}
invisible(x)
pattern with the much simpler
on.exit(try(eval.parent(call('<-', xn, x)), silent = TRUE))
invisible(x)
or, since we don't care about the try-error object,
on.exit(tryCatch(eval.parent(call('<-', xn, x)), error = function(e){}))
invisible(x)
Thoughts? @CarterButts ?
- Dominant language
- R
- Stars
- 20
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from statnet/network
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Assigning a symmetric sociomatrix valued edges to an undriected network creates bidirectional edges. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100