search for: removesourc

Displaying 17 results from an estimated 17 matches for "removesourc".

Did you mean: removesource
2017 Dec 11
1
possible bug in utils::removeSource - NULL argument is silently dropped
Dear R-Core Team, I found an unexpected behaviour in utils::removeSource (also present in r-devel as of today). --- # create a function which accepts NULL argument foo <- function(x, y) { if (is.null(y)) y <- "default foo" attr(x, "foo") <- y x } # create a function which utilizes 'foo' testSrc <- function() { x &...
2023 Mar 30
1
removeSource() vs. function literals
Dear R-devel, In a package of mine, I use removeSource on expression objects in order to make expressions that are semantically the same serialize to the same byte sequences: https://github.com/cran/depcache/blob/854d68a/R/fixup.R#L8-L34 Today I learned that expressions containing function definitions also contain the source references for the functi...
2023 Mar 30
2
removeSource() vs. function literals
On 30/03/2023 10:32 a.m., Ivan Krylov wrote: > Dear R-devel, > > In a package of mine, I use removeSource on expression objects in order > to make expressions that are semantically the same serialize to the > same byte sequences: > https://github.com/cran/depcache/blob/854d68a/R/fixup.R#L8-L34 > > Today I learned that expressions containing function definitions also > contain the so...
2023 Mar 31
2
removeSource() vs. function literals
...pplications (IIRC caching). I'd be happy to upstream this in base if R core is interested. Best, Lionel On 3/30/23, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 30/03/2023 10:32 a.m., Ivan Krylov wrote: >> Dear R-devel, >> >> In a package of mine, I use removeSource on expression objects in order >> to make expressions that are semantically the same serialize to the >> same byte sequences: >> https://github.com/cran/depcache/blob/854d68a/R/fixup.R#L8-L34 >> >> Today I learned that expressions containing function definitions also...
2024 Jan 12
2
Choices to remove `srcref` (and its buddies) when serializing objects
...same inputs. I've checked source code in digest package hoping to get around this issue (for example serialize(..., refhook = ...)). However, my workaround did not work. It seems that the markers to the objects are different even if I used `refhook` to force srcref to be the same. I also tried `removeSource` and `rlang::zap_srcref`. None of them works directly on nested environments with multiple functions. I wonder how hard it would be to have options to discard source when serializing R objects? Currently my analyses heavily depend on digest function to generate file caches and automatically sc...
2024 Jan 17
1
Choices to remove `srcref` (and its buddies) when serializing objects
...age hoping to get >>> around this issue (for example serialize(..., refhook = ...)). >>> However, my workaround did not work. It seems that the markers to >>> the objects are different even if I used `refhook` to force srcref >>> to be the same. I also tried `removeSource` and `rlang::zap_srcref`. >>> None of them works directly on nested environments with multiple >>> functions. >>> >>> I wonder how hard it would be to have options to discard source when >>> serializing R objects? >>> >>> Currently...
2024 Jan 16
2
Choices to remove `srcref` (and its buddies) when serializing objects
...same inputs. I've checked source code in digest package hoping to get around this issue (for example serialize(..., refhook = ...)). However, my workaround did not work. It seems that the markers to the objects are different even if I used `refhook` to force srcref to be the same. I also tried `removeSource` and `rlang::zap_srcref`. None of them works directly on nested environments with multiple functions. >> >> I wonder how hard it would be to have options to discard source when serializing R objects? >> >> Currently my analyses heavily depend on digest function to generat...
2018 Mar 15
1
R 3.4.4 is released
...ent variable TZ (usually a location). * Legacy support of make macros such as CXX1X is formally deprecated: use the CXX11 forms instead. BUG FIXES: * power.prop.test() now warns when it cannot solve the problem, typically because of impossible constraints. (PR#17345) * removeSource() no longer erroneously removes NULL in certain cases, thanks to D'enes T'oth. * nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now work. (Partly from PR#17367) * R CMD build checks for GNU cp rather than assuming Linux has it. (PR#17370 says 'Alpine Linux' do...
2018 Mar 15
1
R 3.4.4 is released
...ent variable TZ (usually a location). * Legacy support of make macros such as CXX1X is formally deprecated: use the CXX11 forms instead. BUG FIXES: * power.prop.test() now warns when it cannot solve the problem, typically because of impossible constraints. (PR#17345) * removeSource() no longer erroneously removes NULL in certain cases, thanks to D'enes T'oth. * nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now work. (Partly from PR#17367) * R CMD build checks for GNU cp rather than assuming Linux has it. (PR#17370 says 'Alpine Linux' do...
2024 Jan 17
1
Choices to remove `srcref` (and its buddies) when serializing objects
...t > >>> around this issue (for example serialize(..., refhook = ...)). > >>> However, my workaround did not work. It seems that the markers to > >>> the objects are different even if I used `refhook` to force srcref > >>> to be the same. I also tried `removeSource` and `rlang::zap_srcref`. > >>> None of them works directly on nested environments with multiple > >>> functions. > >>> > >>> I wonder how hard it would be to have options to discard source when > >>> serializing R objects? > >>&...
2011 Apr 13
0
R 2.13.0 is released
...tmatically selected in functions such as writeBin(), writeLines(), grep() and strsplit(). Only a few character operations are supported (such as substr()). Printing, format() and cat() will represent non-ASCII bytes in such strings by a \xab escape. ? The new function removeSource() removes the internally stored source from a function. ? "srcref" attributes now include two additional line number values, recording the line numbers in the order they were parsed. ? New functions have been added for source reference access: getSrcFilename()...
2011 Apr 13
0
R 2.13.0 is released
...tmatically selected in functions such as writeBin(), writeLines(), grep() and strsplit(). Only a few character operations are supported (such as substr()). Printing, format() and cat() will represent non-ASCII bytes in such strings by a \xab escape. ? The new function removeSource() removes the internally stored source from a function. ? "srcref" attributes now include two additional line number values, recording the line numbers in the order they were parsed. ? New functions have been added for source reference access: getSrcFilename()...
2024 Apr 24
0
[Rd] R 4.4.0 is released
...ategorical predictor variables rather than factor ones, fixing PR#18635 reported by Jinsong Zhao. * formals(f) <- formals(f) now also works for a function w/o arguments and atomic _constant_ body(f). * Correct as.function(<invalid list>, .)'s error message. * removeSource() is yet more thorough in finding and removing "srcref" and the other source references from parsed R language chunks, fixing PR#18638 thanks to Andrew Simmons. * dgeom() is more accurate now, notably when its result is very small, fixing PR#18642 thanks to the pro...
2024 Apr 24
0
[Rd] R 4.4.0 is released
...ategorical predictor variables rather than factor ones, fixing PR#18635 reported by Jinsong Zhao. * formals(f) <- formals(f) now also works for a function w/o arguments and atomic _constant_ body(f). * Correct as.function(<invalid list>, .)'s error message. * removeSource() is yet more thorough in finding and removing "srcref" and the other source references from parsed R language chunks, fixing PR#18638 thanks to Andrew Simmons. * dgeom() is more accurate now, notably when its result is very small, fixing PR#18642 thanks to the pro...
2019 Apr 26
0
R 3.6.0 is released
...s _parallel_ to the axis, and 0.25 for perpendicular ones. Perpendicular labels no longer overlap, fixing bug PR#17384. * The default method of plot() gains new arguments xgap.axis = NA and ygap.axis = NA to be passed to the x- and y- axis(.., gap.axis=*) calls. * removeSource() now works not only for functions but also for some language objects. * as.call(), rep.int(), rep_len() and nchar() dispatch internally. * is(object, class2) looks for class2 in the calling namespace after looking in the namespace of class(object). * extendrange(.., f)...
2019 Apr 26
0
R 3.6.0 is released
...s _parallel_ to the axis, and 0.25 for perpendicular ones. Perpendicular labels no longer overlap, fixing bug PR#17384. * The default method of plot() gains new arguments xgap.axis = NA and ygap.axis = NA to be passed to the x- and y- axis(.., gap.axis=*) calls. * removeSource() now works not only for functions but also for some language objects. * as.call(), rep.int(), rep_len() and nchar() dispatch internally. * is(object, class2) looks for class2 in the calling namespace after looking in the namespace of class(object). * extendrange(.., f)...
2019 Apr 26
0
R 3.6.0 is released
...s _parallel_ to the axis, and 0.25 for perpendicular ones. Perpendicular labels no longer overlap, fixing bug PR#17384. * The default method of plot() gains new arguments xgap.axis = NA and ygap.axis = NA to be passed to the x- and y- axis(.., gap.axis=*) calls. * removeSource() now works not only for functions but also for some language objects. * as.call(), rep.int(), rep_len() and nchar() dispatch internally. * is(object, class2) looks for class2 in the calling namespace after looking in the namespace of class(object). * extendrange(.., f)...