Re: [Rd] full copy on assignment?

2010-04-03 Thread Norm Matloff
Thanks, Martin and Duncan, for the quick, cleary replies. Norm __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] full copy on assignment?

2010-04-03 Thread John Chambers
In particular, Duncan's comment applies in situations where the replacement is in a loop, obviously the case one worries about. What happens in the stupid little function: > foo <- function(x) { for(i in seq_along(x)) x[i] <- x[i] +1; x} for the case > y <- 1:1e6 > y1 <- foo(y) How often doe

Re: [Rd] full copy on assignment?

2010-04-03 Thread Duncan Murdoch
On 03/04/2010 6:34 PM, Norm Matloff wrote: Here's a basic question that doesn't seem to be completely answered in the docs, and which unfortunately I've not had time to figure out by wading through the R source code: In a vector (or array) element assignment such as z[3] <- 8 is there in

[Rd] full copy on assignment?

2010-04-03 Thread Norm Matloff
Here's a basic question that doesn't seem to be completely answered in the docs, and which unfortunately I've not had time to figure out by wading through the R source code: In a vector (or array) element assignment such as z[3] <- 8 is there in actuality a full rewriting of the entire vec

Re: [Rd] inject html code into Rd file

2010-04-03 Thread Yihui Xie
Sounds like a good idea. The RCurl package can also do the base64 encoding (depends on libcurl), e.g. library(RCurl) img <- function() { tf <- tempfile() tf.out <- tempfile() png(tf, width = 500, height = 500) plot(1:100, rnorm(100), pch = 21, bg = "red", cex = 2) dev.off()

Re: [Rd] inject html code into Rd file

2010-04-03 Thread Romain Francois
Le 03/04/10 02:04, Duncan Murdoch a écrit : On 02/04/2010 8:06 AM, Duncan Murdoch wrote: On 02/04/2010 7:13 AM, Romain Francois wrote: Le 02/04/10 13:07, Duncan Murdoch a écrit : On 02/04/2010 6:17 AM, Romain Francois wrote: Hello, I'm trying to inject html code into an Rd file. For example