similar to: S4 classes: referencing slots with other slots

Displaying 20 results from an estimated 4000 matches similar to: "S4 classes: referencing slots with other slots"

2011 Feb 21
0
[R] S4 classes: referencing slots with other slots
Dear Development Group, In trying to answer the subject question myself, I found this thread initiated by Tony from five years ago: http://tolstoy.newcastle.edu.au/R/help/05/12/18169.html. I recently stumbled upon the following S4 answer to Tony's question: setClass("fooWfcn", representation(dat1="vector", dat2="vector",
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.
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,
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>
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
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
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
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,
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()
2017 Aug 04
4
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
On 8/4/2017 2:06 PM, Daniel Berlin wrote: > A few notes: > I'm a bit surprised IPO copy/constant propagation doesn't get this > case, but i didn't look if the lattice supports variables. > In particular, in your example, given no other call sites, it should > eliminate the dead code. > (In a real program, it may require cloning). In the actual program
2008 Aug 22
10
[LLVMdev] Proposal : Function Notes
Here is a proposal that I mentioned sometime ago. Any thoughts,comments or suggestions on this proposal would be appreciated. - Devang // = = =---------------------------------------------------------------------- ===// // Function Notes (or Traits) // = = =---------------------------------------------------------------------- ===// This document describes the
2017 Aug 07
3
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
Hi, Coincidentally I've been working to optimize this same case last week. I was struggling a bit to determine where to put this functionality and eventually went for the pragmatic approach of creating an experimental pass. Probably not the eventual solution, but it may provide some useful input to the discussion here. Basically, I experimented with a 'pre-inlining-transform' pass
2003 Jun 09
1
questions about nls
Dear R users, I am new in R and I want to use the nls package to analyze some experimental data. The data is in the attached file "data". It is the response "Sav" measured at different "C0". Basically, the "C0" is a function of C1, K2, and r, and the "Sav" is a function of C0, C1, K2, and r. The math equations are shown in the attached
2020 Mar 12
2
Redundant copies
Hi all, we have encountered a case of redundant copies still left in the final code and we would like to, at least, mitigate it. The original motivating case comes from a context where we have large vector registers. In that context, copies are expensive and we would like to avoid them as much as possible. This small testcase in C, similar to the original vector case, exposes the issue but using
2007 Feb 21
1
Trying to get an apply to work with a list in applying names to tables
I am trying to use apply and a list to supply names to a set of tables I want to generate. Below is an example that I hope mimics the larger original problem. EXAMPLE aa <- c( 2,2,1,1,2) bb <- c(5,6,6,7,4) aan <- c("yes", "no") bbn <- c("a", "b", "c", "d") mynames <- c("abby", "billy") mylist <-