Re: [Rd] nlminb with constraints failing on some platforms

2019-02-02 Thread Stefan Evert
Also no error on MacOS 10.13.6, R 3.5.1 with system-supplied VecLib BLAS. > > f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) > > opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) > > str(opt) > List of 6 > $ par: num [1:10] 1 1 1 1 1 ... > $ objective : num -41.4 > $ convergence

Re: [Rd] warning or error upon type/storage mode coercion?

2010-09-15 Thread Stefan Evert
On 15 Sep 2010, at 03:23, Benjamin Tyner wrote: > 2. So, assuming the answer to (1) is a resounding "no", does anyone care to > state an opinion regarding the philosophical or historical rationale for why > this is the case in R/S, whereas certain other interpreted languages offer > the option

Re: [Rd] BLAS benchmarks on R 2.12.0 and related performance issues

2010-11-02 Thread Stefan Evert
On 2 Nov 2010, at 19:33, Prof. John C Nash wrote: > Ultimately we need good performance benchmarks. They are difficult to set up > properly and > tedious to run. Maybe a good subject for a Google Summer of Code project for > next year or > some undergraduate projects. Seconded and thirded! St

Re: [Rd] issues with dev.new avoiding RStudio plot device on unix?

2015-09-26 Thread Stefan Evert
Same problem here on Mac OS X 10.10.5 with R 3.2.2 and RStudio 0.99.473. I think dev.new() tries to find a suitable device in an interactive session with this code dsp <- Sys.getenv("DISPLAY") if (.Platform$OS.type == "windows") windows else if (.Platform$

Re: [Rd] issues with dev.new avoiding RStudio plot device on unix?

2015-10-03 Thread Stefan Evert
> The problem is that the device chosen by dev.new() depends on the GUI. > You can see the code that does this in grDevices:::.onLoad. So in fact > with noRstudioGD=TRUE, the decision is identical to what it is in R: > you only get X11 if your GUI is X11 or Tk, you get pdf otherwise. > It's prett

Re: [Rd] dist function in R is very slow

2017-06-17 Thread Stefan Evert
> On 17 Jun 2017, at 08:47, Moshe Olshansky via R-devel > wrote: > > I am visualising high dimensional genomic data and for this purpose I need to > compute pairwise distances between many points in a high-dimensional space > (say I have a matrix of 5,000 rows and 20,000 columns, so the resul

Re: [Rd] dist function in R is very slow

2017-06-18 Thread Stefan Evert
> By the way, since the tcrossprod function in the Matrix package is so fast, > the Euclidean distance can be computed very fast: Indeed. > euc_dist <- function(m) {mtm <- Matrix::tcrossprod(m); sq <- rowSums(m*m); > sqrt(outer(sq,sq,"+") - 2*mtm)} There are two reasons why I didn't use this

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Stefan Evert
> On 21 Aug 2017, at 17:40, Ghislain Durif wrote: > > I understand why this is a BLAS related issue and not directly an R related > issue. Nonetheless, my concern was for non-advanced R users, that may don't > even know what BLAS is. For instance, I have a package on the CRAN that use > 'mcla

Re: [Rd] the pipe |> and line breaks in pipelines

2020-12-09 Thread Stefan Evert
I'm not a pipe user, so I may be overlooking some issue, but wouldn't simply putting identity() on the last line solve your main problem? ### Example 1 ### my_data_frame_1 %>% filter(some_conditions_1) %>% inner_join(my_data_frame_2, by = some_columns_1) %>% group_by(some_columns_2) %>%

Re: [Rd] Add to Documentation of atan2.

2021-05-18 Thread Stefan Evert
> On 18 May 2021, at 20:30, Ben Bolker wrote: > > On my system (Ubuntu), 'man 3 catan' gives documentation on the function, > and says "The real part of y is chosen in the interval [-pi/2,pi/2]" - but > that _could_ be system-dependent. My copy of "C in a Nutshell" suggests that this requi

[Rd] R 2.9.2 crashes when sorting latin1-encoded strings

2009-09-30 Thread Stefan Evert
back and forth between a character vector and a factor. I still don't understand what's going on there. The behaviour of read.delim() seems to depend very much on my locale settings when running R, which is rather unpleasant. Is there a way to find out how strings are stored inter

Re: [Rd] Cannot Change Function (PR#14041)

2009-11-04 Thread Stefan Evert
What makes you think this is a bug in R? Whenever I try changing a function, it keeps coming up with the same error message. I have the function CN_state_log_sum=function(Tot_log_sum){ #estimate copy number state for the log [...] } When I try to run it in the loop: for (j in 1:length(B

Re: [Rd] unrelated software install triggering an error from R's install script on Mac OS X 10.5

2008-11-30 Thread Stefan Evert
ipt, it'll do something entirely different from what you expect. BTW, putting the R binary directory ahead of system directories such as /usr/bin in your PATH is an even worse idea than including it there in the first place. ;-) Best reg

Re: [Rd] unrelated software install triggering an error from R's install script on Mac OS X 10.5

2008-12-01 Thread Stefan Evert
ble from the command line. Best regards, Stefan Evert [ [EMAIL PROTECTED] | http://purl.org/stefan.evert ] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] Semantics of sequences in R

2009-02-23 Thread Stefan Evert
Dear vQ, vectors (can-be-considered-lists), can you please stop repeating this nonsense? I don't think anybody ever claimed that vectors can be considered list. It's rather the other way round: lists can also be seen as vectors to R (possibly they are implemented as such, but I don't m