similar to: [R] S4 classes: referencing slots with other slots

Displaying 20 results from an estimated 3000 matches similar to: "[R] S4 classes: referencing slots with other slots"

2005 Dec 29
1
S4 classes: referencing slots with other slots
For those who suggest other ways to do this, I ALREADY HAVE ANOTHER DESIGN SOLUTION, DESCRIBED AT THE END. That being said, I want to know if it's possible to reference a slot in an S4 class from another slot, i.e. I'd like to have the "self.*" semantics of Python so that I can reuse a slot. That is, for various reasons it would be nice to be able to do something like:
2009 Feb 04
0
Problem using option packeg with new R version (PR#13498)
Hello, I'm facing a problem, using "optim" packeg. I've written a program and run it using the latest R version 2.8.1,but there was an error message as following: R version 2.7.2 (2008-08-25) # same result when I use R version 2.8.1,Copyright (C) 2008 The R Foundation for Statistical ComputingISBN 3-900051-07-0R is free software and comes with ABSOLUTELY NO WARRANTY.You are
2013 Jan 01
1
Behavior or as.environment in function arguments/call (and force() behaviors...)
Happy 2013! Can someone with more knowledge of edge case scoping/eval rules explain what is happening below? Happens in all the versions of R I have on hand. Behavior itself is confusing, but ?as.environment also provides no clue. The term used in that doc is 'search list', which is ambiguous, but the see also section mentions search(), so I would *think* that is what is intended.
2006 Jun 22
2
weights in lm, glm (PR#9023)
Full_Name: James Signorovitch Version: 2.2.1 OS: WinXP Submission from: (NULL) (134.174.182.203) In the code below, fn1() and fn2() fail with the messages given in the comments. Strangely, fn2() fails for all data sets I've tried except for those with 100 rows. The same errors occur if glm() is used in place of lm(), or if R 2.1.1 is used on a unix system. Thanks for looking into this.
2016 Dec 15
2
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 1:30 PM Teresa Johnson <tejohnson at google.com> wrote: On Thu, Dec 15, 2016 at 11:38 AM, David Blaikie <dblaikie at gmail.com> wrote: On Thu, Dec 15, 2016 at 11:26 AM Teresa Johnson <tejohnson at google.com> wrote: Trying to wrap my brain around this, so a few questions below. =) Sure thing - sorry, did assume a bit too much arcane context here.
2016 Dec 16
0
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 2:08 PM, David Blaikie <dblaikie at gmail.com> wrote: > On Thu, Dec 15, 2016 at 1:30 PM Teresa Johnson <tejohnson at google.com> > wrote: > > On Thu, Dec 15, 2016 at 11:38 AM, David Blaikie <dblaikie at gmail.com> > wrote: > > > > On Thu, Dec 15, 2016 at 11:26 AM Teresa Johnson <tejohnson at google.com> > wrote: >
2016 Dec 16
2
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 4:17 PM Teresa Johnson <tejohnson at google.com> wrote: > On Thu, Dec 15, 2016 at 2:08 PM, David Blaikie <dblaikie at gmail.com> wrote: > > On Thu, Dec 15, 2016 at 1:30 PM Teresa Johnson <tejohnson at google.com> > wrote: > > On Thu, Dec 15, 2016 at 11:38 AM, David Blaikie <dblaikie at gmail.com> > wrote: > > > > On
2016 Dec 16
0
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 4:20 PM, David Blaikie <dblaikie at gmail.com> wrote: > > > On Thu, Dec 15, 2016 at 4:17 PM Teresa Johnson <tejohnson at google.com> > wrote: > >> On Thu, Dec 15, 2016 at 2:08 PM, David Blaikie <dblaikie at gmail.com> >> wrote: >> >> On Thu, Dec 15, 2016 at 1:30 PM Teresa Johnson <tejohnson at google.com>
1998 Feb 26
2
R-beta: question on dyn.loaded code
Hi, when designing libraries for R, is it possible to call C/Fortran subroutines from other dynamically loaded code? The following example crashes R: ********* fn1.c ***************** void twice(int *i) { *i = 2 * *i; } ********************************* ********* fn2.c ***************** extern int twice(int *i); void negtwice(int *i) { *i = -1 * twice(i); }
1998 Feb 26
2
R-beta: question on dyn.loaded code
Hi, when designing libraries for R, is it possible to call C/Fortran subroutines from other dynamically loaded code? The following example crashes R: ********* fn1.c ***************** void twice(int *i) { *i = 2 * *i; } ********************************* ********* fn2.c ***************** extern int twice(int *i); void negtwice(int *i) { *i = -1 * twice(i); }
2011 May 09
2
Vectorizing a function: what does it mean?
Dear all, I would really appreciate if somebody can help me to understand what does the phrase "Vectorize your function" mean? And what is the job of Vectorize() function in doing that? I have read many threads where experts suggest to Vectorize the function, which will speed up entire calculation (and more elegant ofcourse.) I used to think that vectorizing function means, to create a
2010 Jul 05
3
data.frame: adding a column that is based on ranges of values in another column
Dear List, I've been looking tirelessly for a solution to this dilemma but without success. Perhaps someone has an idea that will guide me in the right direction. Suppose I have the following data.frame: DF = data.frame(X = c(114.5508, 114.6468, 114.6596, 114.6957, 114.6828, 114.8903, 114.9519, 114.8842, 114.8579, 114.8489), Y = c(47.14094, 46.98874, 46.91235, 46.88265, 46.80584, 46.67022,
2008 Aug 25
0
[LLVMdev] Proposal : Function Notes
On Aug 22, 2008, at 4:40 PM, Devang Patel wrote: > The LLVM passes are responsible to take appropriate actions based on > Function > Notes associated with function definition. For example, > > define void @fn1() notes("opt-size=1") { ... } > > The function fn1() is being optimized for size without losing > significant > performance. The inliner will
2008 Apr 24
0
[LLVMdev] Compile units in debugging intrinsics / globals
Hi, > Suppose I have the following source: > > file1: > #include "file2" > #include "file3" > int fn1(void) ... > > file2: > int a; > > file3: > int fn2(void) ... > > then fn1, along with all the base types etc appear to be in compile unit > "file1", the variable a appears to be in compile unit
2008 Apr 23
3
[LLVMdev] Compile units in debugging intrinsics / globals
I have a question about the llvm debugging records, especially wrt compile units. In the non-LLVM sense, a compile unit is essentially everything contained within a single .o file, and it is derived from one or more source and header files. Included in a compile unit are functions and global data. Dwarf records refer to compile units in the same way: a compile unit record has children which
2014 Apr 14
1
duplication regression (?)
Below is an example of output that changed as a result of r64970. I did not see any NEWS item suggesting this change is expected. Note that the example is contrived and I don't have a use case for it. I stumbled across it when playing with recent changes in R relating to duplication. Does the example use undefined syntax? ----- fn1 <- function(mylist) { fn1a <- function()
2008 Aug 25
2
[LLVMdev] Proposal : Function Notes
On Aug 25, 2008, at 3:24 PM, Nick Kledzik wrote: > > On Aug 22, 2008, at 4:40 PM, Devang Patel wrote: > >> The LLVM passes are responsible to take appropriate actions based >> on Function >> Notes associated with function definition. For example, >> >> define void @fn1() notes("opt-size=1") { ... } >> >> The function fn1() is being
2017 Aug 04
3
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
All, I'm working on an improvement to the inline cost model, but I'm unsure how to proceed. Let me begin by first describing the problem I'm trying to solve. Consider the following pseudo C code: *typedef struct element { unsigned idx; } element_t; * *static inline unsigned char fn2 (element_t *dst_ptr, const element_t *a_ptr, const element_t *b_ptr,
2017 Aug 07
2
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
On 8/7/2017 1:02 PM, Daniel Berlin wrote: > Can someone fill me in on the issue with the dominator tree, > precisely, during inlining? > We now have the capability of quickly keeping it up to date without > too much trouble (it may require pushing it through a bunch of places, > but the actual changes to do should be easy). If I'm not mistaken (which I very well could be
2008 Aug 25
0
[LLVMdev] Proposal : Function Notes
Hi Devang, I have a few questions below. On Aug 22, 2008, at 4:40 PM, Devang Patel wrote: > Here is a proposal that I mentioned sometime ago. Any > thoughts,comments or > suggestions on this proposal would be appreciated. > - > Devang > > // > = > = > = > ----------------------------------------------------------------------= > ==// > //