[Rd] shouldn't seq(my_int_vector, length.out=y) be an integer vector?

2015-06-29 Thread franknarf
The class of seq(1L,length.out=6L) is numeric, which is not what I expect. seq(1L,6L) gives an integer vector; and even seq(1,6) does, so the departure/inconsistency when length.out is used doesn't seem desirable. In the code for seq.default, I see length.out <- ceiling(length.out) and I'd sugg

Re: [Rd] Matlab Program to R

2015-05-04 Thread franknarf
R rounds. Perhaps Matlab avoids doing so here. It's hard to say because your code is too long for anyone to read through. Maybe you could post a smaller reproducible example to pinpoint the result you see here. If you can do that, I think you may also find that the R-help mailing list is a better

[Rd] Why is the diag function so slow (for extraction)?

2015-05-04 Thread franknarf
(I asked this question on StackOverflow a short time ago; sorry if you're seeing it again. Feel free to answer there as well if you like. The code formatting and such on that site can be nice.) I benchmarked matrix and vector subsetting to extract t