Basically as a result of all the bells and whistles source() supports
it ends up creating an additional reference to the value of each top
level expression. That forces a duplicate.
Best,
luke
On Sun, 13 May 2018, Krzysztof Bartoszek wrote:
Dear all,
I have a question about R's modification i
Dear all,
I have a question about R's modification in place and replacement functions.
I was working through Hadley Wickham's Advanced R section on
Replacement Functions and
in a file (say test.R) I wrote:
`second<-` <- function(x, value) {
x[2] <- value
x
}
x <- 1:10
second(x) <- 5L
print(x
Hi,
Some 'bibentry' methods have the side effect of changing the default bibstyle.
Background:
tools::bibstyle() defines and registers bibtex styles for formatting 'bibentry'
objects.
It optionally (and by default) sets a default style. It is also used to get a
particular style.
The last feat