similar to: length(unclass(x)) without unclass(x)?

Displaying 20 results from an estimated 4000 matches similar to: "length(unclass(x)) without unclass(x)?"

2018 Sep 03
0
True length - length(unclass(x)) - without having to call unclass()?
Regarding the discussion of getting length(unclass(x)) without an unclassed version of x being created... There are already no copies done for length(unclass(x)) in pqR (current version of 2017-06-09 at pqR-project.org, as well as the soon-to-be-release new version). This is part of a more general facility for avoiding copies from unclass in other circumstances as well - eg,
2017 Mar 05
0
length(unclass(x)) without unclass(x)?
I'm looking for a way to get the length of an object 'x' as given by base data type without dispatching on class. Something analogous to how .subset()/.subset2(), e.g. a .length() function. I know that I can do length(unclass(x)), but that will trigger the creation of a new object unclass(x) which I want to avoid because 'x' might be very large. Here's a dummy example
2018 Sep 05
0
True length - length(unclass(x)) - without having to call unclass()?
On 08/24/2018 07:55 PM, Henrik Bengtsson wrote: > Is there a low-level function that returns the length of an object 'x' > - the length that for instance .subset(x) and .subset2(x) see? An > obvious candidate would be to use: > > .length <- function(x) length(unclass(x)) > > However, I'm concerned that calling unclass(x) may trigger an > expensive copy
2018 Sep 10
0
True length - length(unclass(x)) - without having to call unclass()?
On 09/05/2018 11:18 AM, I?aki Ucar wrote: > The bottomline here is that one can always call a base method, > inexpensively and without modifying the object, in, let's say, > *formal* OOP languages. In R, this is not possible in general. It > would be possible if there was always a foo.default, but primitives > use internal dispatch. > > I was wondering whether it would be
2017 Oct 03
0
Revert to R 3.2.x code of logicalSubscript in subscript.c?
Suharto, If you're interested in performance with subscripting, you might want to look at pqR (pqR-project.org). It has some substantial performance improvements for subscripting over R Core versions. This is especially true for the current development version of pqR (probably leading to a new release in about a month). You can look at a somewhat-stable snapshot of recent pqR development
2011 Aug 14
0
Improved version of Rprofmem
The Rprofmem facility is currently enabled only if the configuration option --enable-memory-profiling is used. However, the overhead of having it enabled is negligible when profiling is not actually being done, and can easily be made even smaller. So I think it ought to be enabled all the time. I've attached a patch doing this, which also makes a number of other improvements to Rprofmem,
2019 Feb 23
0
Bug: time complexity of substring is quadratic
> From: Tomas Kalibera <tomas.kalibera at gmail.com> > > Thanks for the report, I am working on a patch that will address this. > > I confirm there is a lot of potential for speedup. On my system, > > 'N=200000; x <- substring(paste(rep("A", N), collapse=""), 1:N, 1:N)' > > spends 96% time in checking if the string is ascii and 3%
2013 Jun 22
1
Announcing pqR - a faster version of R
I have released a new, faster, version of R, which I call pqR (for "pretty quick" R), based on R-2.15.0. Among many other improvements, pqR supports automatic use of multiple cores to perform numerical computations in parallel with other numerical computations, and with the interpretive thread. It also implements a true reference counting scheme to reduce the amount of unnecessary
2018 Nov 27
1
Subsetting row in single column matrix drops names in resulting vector
Dmitriy Selivanov (selivanov.dmitriy at gmail.com) wrote: > Consider following example: > > a = matrix(1:2, nrow = 2, dimnames = list(c("row1", "row2"), c("col1"))) > a[1, ] > # 1 > > It returns *unnamed* vector `1` where I would expect named vector. In fact > it returns named vector when number of columns is > 1. > Same issue applicable
2015 Jul 14
3
Two bugs showing up mostly on SPARC systems
In testing pqR on Solaris SPARC systems, I have found two bugs that are also present in recent R Core versions. You can see the bugs and fixes at the following URLs: https://github.com/radfordneal/pqR/commit/739a4960a4d8f3a3b20cfc311518369576689f37 https://github.com/radfordneal/pqR/commit/339b7286c7b43dcc6b00e51515772f1d7dce7858 The first bug, in nls, is most likely to occur on a 64-bit
2018 Sep 05
4
True length - length(unclass(x)) - without having to call unclass()?
The bottomline here is that one can always call a base method, inexpensively and without modifying the object, in, let's say, *formal* OOP languages. In R, this is not possible in general. It would be possible if there was always a foo.default, but primitives use internal dispatch. I was wondering whether it would be possible to provide a super(x, n) function which simply causes the
2015 Jul 14
0
Two bugs showing up mostly on SPARC systems
On 14/07/2015 6:08 PM, Radford Neal wrote: > In testing pqR on Solaris SPARC systems, I have found two bugs that > are also present in recent R Core versions. You can see the bugs and > fixes at the following URLs: > > https://github.com/radfordneal/pqR/commit/739a4960a4d8f3a3b20cfc311518369576689f37 Thanks for the report. Just one followup on this one: There are two sections
2017 Jan 09
0
accelerating matrix multiply
> From: "Cohn, Robert S" <robert.s.cohn at intel.com> > > I am using R to multiply some large (30k x 30k double) matrices on a > 64 core machine (xeon phi). I added some timers to > src/main/array.c to see where the time is going. All of the time is > being spent in the matprod function, most of that time is spent in > dgemm. 15 seconds is in matprod in
2015 Jan 20
1
[PATCH] Makefile: add support for git svn clones
Fellipe, CXXR development has moved to github, and we haven't fixed up the build for using git yet. Could you send a pull request with your change to the repo at https://github.com/cxxr-devel/cxxr/? Also, this patch may be useful for pqR too. https://github.com/radfordneal/pqR Thanks On Mon, Jan 19, 2015 at 2:35 PM, Dirk Eddelbuettel <edd at debian.org> wrote: > > On 19
2015 Aug 24
0
Problem with psignal.c for Windows builds
One thing I forgot in my previous message about problems with psignal.c on Rtools for Windows... One also needs to change src/gnuwin32/fixed/h/psignal.h At a minimum, one needs the following changes: @@ -122,8 +129,8 @@ typedef struct /* Prototype stuff ***********************************************************/ -int sigsetmask(int signal_Block_MaskNew); -int
2015 Jul 15
1
Two bugs showing up mostly on SPARC systems
On Tue, Jul 14, 2015 at 07:52:56PM -0400, Duncan Murdoch wrote: > On 14/07/2015 6:08 PM, Radford Neal wrote: > > In testing pqR on Solaris SPARC systems, I have found two bugs that > > are also present in recent R Core versions. You can see the bugs and > > fixes at the following URLs: > > > >
2014 Mar 22
2
Varying results of package checks due to random seed
> From: Philippe GROSJEAN <Philippe.GROSJEAN at umons.ac.be> > > ... for latest CRAN version, we have successfully installed 4999 > packages among the 5321 CRAN package on our platform. ... It is > strange that a large portion of R CMD check errors on CRAN occur and > disappear *without any version update* of a package or any of its > direct or indirect dependencies!
2015 Mar 01
0
iterated lapply
On Sun, 1 Mar 2015, Radford Neal wrote: > I think the discussion of this issue has gotten more complicated than > necessary. The discussion has gotten no more complicated than it needs to be. There are other instances, such as Reduce where there is a bug report pending that amounts to the same issue. Performing surgery on expressions and calling eval is not good practice at the R level
2017 Oct 18
1
uniform sampling without replacement algorithm
> From: "Pavel S. Ruzankin" <ruzankin at math.nsc.ru> > Let us consider the current uniform sampling without replacement > algorithm. It resides in function do_sample in > https://svn.r-project.org/R/trunk/src/main/random.c > Its complexity is obviously O(n), where the sample is selected from > 1...n, since the algorithm has to create a vector of length n. So
2018 Aug 24
5
True length - length(unclass(x)) - without having to call unclass()?
Is there a low-level function that returns the length of an object 'x' - the length that for instance .subset(x) and .subset2(x) see? An obvious candidate would be to use: .length <- function(x) length(unclass(x)) However, I'm concerned that calling unclass(x) may trigger an expensive copy internally in some cases. Is that concern unfounded? Thxs, Henrik