premature use of startsWith in r75110

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

premature use of startsWith in r75110

Hugh Parsonage
In r75110 at line 1846 in src/library/tools/R/check.R the following
line was changed

- if(length(grep("^Found the defunct/removed function", out8)))
+ if(any(startsWith(out8, "Found the defunct/removed function")))

However, if `out8` is NULL at this point (which is plausible), the
original returns FALSE, but the second returns an error. Recommend

+ if(!is.null(out8) && any(startsWith(out8, "Found the defunct/removed
function")))




Best,

HP

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: premature use of startsWith in r75110

Kurt Hornik-5
>>>>> Hugh Parsonage writes:

Thanks, will fix.

Best
-k

> In r75110 at line 1846 in src/library/tools/R/check.R the following
> line was changed

> - if(length(grep("^Found the defunct/removed function", out8)))
> + if(any(startsWith(out8, "Found the defunct/removed function")))

> However, if `out8` is NULL at this point (which is plausible), the
> original returns FALSE, but the second returns an error. Recommend

> + if(!is.null(out8) && any(startsWith(out8, "Found the defunct/removed
> function")))




> Best,

> HP

> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel