Re: [Rd] Non-free packages in R-Forge

2011-11-23 Thread Dominick Samperi
2011/11/18 Spencer Graves spencer.gra...@prodsyse.com: Jordi:      Why do you want to reduce demand for Octave by forcing people who want to link to a commercial product to abandon Octave?      Are you familiar with Shapiro and Varian (1998) Information Rules:  A Strategic Guide to the

[Rd] gsub, utf-8 replacements and the C-locale

2011-11-23 Thread Hadley Wickham
Hi all, I'd like to discuss a infelicity/possible bug with gsub. Take the following function: f - function(x) { gsub(\u{A0}, , gsub( , \u{A0}, x)) } As you might expect, in utf-8 locales it is idempotent: Sys.setlocale(LC_ALL, UTF-8) f(x y) # [1] x y But in the C locale it is not:

Re: [Rd] gsub, utf-8 replacements and the C-locale

2011-11-23 Thread Simon Urbanek
On Nov 23, 2011, at 6:48 PM, Hadley Wickham wrote: Hi all, I'd like to discuss a infelicity/possible bug with gsub. Take the following function: f - function(x) { gsub(\u{A0}, , gsub( , \u{A0}, x)) } As you might expect, in utf-8 locales it is idempotent: Sys.setlocale(LC_ALL,

[Rd] capture.output(eval(..., envir)) not evaluate in the expected(?) environment

2011-11-23 Thread Henrik Bengtsson
I've noticed the following oddity where capture.output() prevents eval() from evaluating an expression in the specified environment. I'm not sure if it is an undocumented feature or a bug. It caused me many hours of troubleshooting. By posting it here, it might save someone else from doing the

Re: [Rd] capture.output(eval(..., envir)) not evaluate in the expected(?) environment

2011-11-23 Thread Henrik Bengtsson
Thanks for the quick answer. I didn't know about force() function. Cheers, Henrik On Wed, Nov 23, 2011 at 6:56 PM, Simon Urbanek simon.urba...@r-project.org wrote: IMHO this has nothing to do with capture.output() per se - it's simply lazy evaluation that gets you. Add force(envir) before