Re: [Rd] hanging spaces prior to linebreak from cat()

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 10:44 AM, Tim Triche, Jr. wrote: > (re-sending after confirming list subscription; apologies if this ends up > being sent to the list twice) > > Is the expected behavior from cat(), as used below, a hanging space before > \n at the end of the emitted line? > > firstheader =

Re: [Rd] Improved Nelder-Mead algorithm - a potential replacement for optim's Nelder-Mead

2011-07-19 Thread Ravi Varadhan
Take a look at the `nmk' function in"dfoptim" package. Ravi. From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf of Kellner [ralf.kell...@wiso.uni-erlangen.de] Sent: Tuesday, July 19, 2011 1:33 PM To: r-devel@r-project.org Subject

Re: [Rd] Randomness not due to seed

2011-07-19 Thread William Dunlap
Did you actually see some rounding differences? The lm objects made in the calls to maklm will differ in the environments attached to the formula (because you made the formula in the function). If I change both copies of that .Environment attribute to .GlobalEnv (or any other environment), then i

[Rd] Randomness not due to seed

2011-07-19 Thread jeroen00ms
I am working on a reproducible computing platform for which I would like to be able to _exactly_ reproduce an R object. However, I am experiencing unexpected randomness in some calculations. I have a hard time finding out exactly how it occurs. The code below illustrates the issue. mylm1 <- lm(di

Re: [Rd] Improved Nelder-Mead algorithm - a potential replacement for optim's Nelder-Mead

2011-07-19 Thread Kellner
Hi, i have a question concerning the Nelder-Mead algorithm in R. As far as i can see, the shrink operation is not included in the optim() function. Does anyone know an implementation of the Nelder-Mead algorithm including this operation in R? Could maybe someone send me one? I would try to write t

[Rd] hanging spaces prior to linebreak from cat()

2011-07-19 Thread Tim Triche, Jr.
(re-sending after confirming list subscription; apologies if this ends up being sent to the list twice) Is the expected behavior from cat(), as used below, a hanging space before \n at the end of the emitted line? firstheader = gsub("\\s+$", "", paste(c("Hybridization REF", s, s), collapse = "\t

Re: [Rd] Confusing inheritance problem

2011-07-19 Thread Therneau, Terry M., Ph.D.
Yup, that fixes the problem. This was also pointed out by Uwe in a personal email. One confusing aspect is that there are two test files in the skeleton package, one of which calls rowSums( a dsCMatrix object) at top level, and the other of which does the same thing within a dispached metho

Re: [Rd] Confusing inheritance problem

2011-07-19 Thread Hervé Pagès
Hi Terry, You use a NAMESPACE but you don't import Matrix. So it looks like the "rowSums" method for CsparseMatrix objects cannot be found (not sure why because you do have Matrix in the Depends field so the rowSums generic and methods should be in the search path). Anyway, just adding import(M

Re: [Rd] Performance of .C and .Call functions vs. native R code

2011-07-19 Thread Alireza Mahani
Prof. Bates, It looks like you read my mind! I am working on writing an R package for high-performance MCMC estimation of a class of Hierarchical Bayesian models most often used in the field of quantitative marketing. This would essentially be a parallelized version of Peter Rossi's bayesm package

Re: [Rd] Measuring and comparing .C and .Call overhead

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 11:07 AM, Alireza Mahani wrote: > Further pursuing my curiosity to measure the efficiency of R/C++ interface, I > conducted a simple matrix-vector multiplication test using .C and .Call > functions in R. In each case, I measured the execution time in R, as well as > inside the

[Rd] Tesla GPUs [Was: Manipulating single-precision (float) arrays in .Call functions]

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 2:26 AM, Prof Brian Ripley wrote: > On Mon, 18 Jul 2011, Alireza Mahani wrote: > >> Simon, >> >> Thank you for elaborating on the limitations of R in handling float types. I >> think I'm pretty much there with you. >> >> As for the insufficiency of single-precision math (an

Re: [Rd] Performance of .C and .Call functions vs. native R code

2011-07-19 Thread Douglas Bates
I just saw that I left a syntax error in the .R and the first _Rout.txt files. Notice that in the second _Rout.txt file the order of the arguments in the constructors for the MMatrixXd and the MVectorXd are in a different order than in the .R and the first _Rout.txt files. The correct order has t

[Rd] Measuring and comparing .C and .Call overhead

2011-07-19 Thread Alireza Mahani
Further pursuing my curiosity to measure the efficiency of R/C++ interface, I conducted a simple matrix-vector multiplication test using .C and .Call functions in R. In each case, I measured the execution time in R, as well as inside the C++ function. Subtracting the two, I came up with a measure o

Re: [Rd] Performance of .C and .Call functions vs. native R code

2011-07-19 Thread Douglas Bates
On Thu, Jul 14, 2011 at 10:21 AM, Alireza Mahani wrote: > (I am using a LINUX machine) > > Jeff, > > In creating reproducible results, I 'partially' answered my question. I have > attached two scripts, 'mvMultiply.r' and 'mvMultiply.cc'. Please copy both > files into your chosen directory, then ru

Re: [Rd] Manipulating single-precision (float) arrays in .Callfunctions

2011-07-19 Thread Matthew Dowle
"Duncan Murdoch" wrote in message news:4e259600.5070...@gmail.com... > On 11-07-19 7:48 AM, Matthew Dowle wrote: >> >> "Prof Brian Ripley" wrote in message >> news:alpine.lfd.2.02.1107190640280.28...@gannet.stats.ox.ac.uk... >>> On Mon, 18 Jul 2011, Alireza Mahani wrote: >>> Simon, >>

Re: [Rd] Manipulating single-precision (float) arrays in .Call functions

2011-07-19 Thread Duncan Murdoch
On 11-07-19 7:48 AM, Matthew Dowle wrote: "Prof Brian Ripley" wrote in message news:alpine.lfd.2.02.1107190640280.28...@gannet.stats.ox.ac.uk... On Mon, 18 Jul 2011, Alireza Mahani wrote: Simon, Thank you for elaborating on the limitations of R in handling float types. I think I'm pretty mu

Re: [Rd] Manipulating single-precision (float) arrays in .Call functions

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 7:48 AM, Matthew Dowle wrote: > > "Prof Brian Ripley" wrote in message > news:alpine.lfd.2.02.1107190640280.28...@gannet.stats.ox.ac.uk... >> On Mon, 18 Jul 2011, Alireza Mahani wrote: >> >>> Simon, >>> >>> Thank you for elaborating on the limitations of R in handling flo

Re: [Rd] Welcome Uwe Ligges to R-core

2011-07-19 Thread Marc Schwartz
On Jul 19, 2011, at 7:29 AM, Prof Brian Ripley wrote: > Uwe is now a member of R-core. Congratulations Uwe! Regards, Marc Schwartz __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Welcome Uwe Ligges to R-core

2011-07-19 Thread Prof Brian Ripley
Uwe is now a member of R-core. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG

Re: [Rd] Manipulating single-precision (float) arrays in .Call functions

2011-07-19 Thread Matthew Dowle
"Prof Brian Ripley" wrote in message news:alpine.lfd.2.02.1107190640280.28...@gannet.stats.ox.ac.uk... > On Mon, 18 Jul 2011, Alireza Mahani wrote: > >> Simon, >> >> Thank you for elaborating on the limitations of R in handling float >> types. I >> think I'm pretty much there with you. >> >> As

Re: [Rd] (no subject)

2011-07-19 Thread Martin Maechler
> Simon Urbanek > on Tue, 28 Jun 2011 11:31:58 -0400 writes: > On Jun 28, 2011, at 9:58 AM, Michelle.Carey wrote: >> Hi, >> >> >> >> I am trying to write code in C for an R package. I need >> high precision in the form of the mpfr and gmp packages.

[Rd] requiring NAMESPACE re-installation marked as old.packages?

2011-07-19 Thread Martin Morgan
It would be convenient if, under R-devel r56422, packages that require re-installation because they do not have a NAMESPACE were marked as old.packages, so their lack of functionality can be discovered more easily. > "snow" %in% row.names(old.packages()) [1] FALSE > library(snow) Error in libra