Displaying 20 results from an estimated 110 matches similar to: "Problem using option packeg with new R version (PR#13498)"
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.
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
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.
2005 Feb 01
2
assign connections automatically
Hi all,
I am trying to create a function that will open connections to all
files of
one type within the working directory.
I've got the function to open the connections, but I am having a
bugger of a
time trying to get these connections named as objects in the workspace.
I am at the point where I can do it outside of the function, but not
inside, using assign. I'm sure I'm
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);
}
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:
>
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 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 07
1
Evaluating a multivariable function XXXX
>
> Hello everyone,
>
> I have the following R code for a multivariable function:
>
>
> > fn2<-function(x,y,z){(y+2*z)/(5*y-x*z)}
> >
> > fn2(-5,-2,3)
> [1] 0.8
>
>
>
> No problems.
>
> ===
>
> If, however, I call the function using a vector substitution for the
> arguments, R sees this as 3 separate calls to the function while
2008 Apr 17
1
Help with using 'get' function and variable scope
Hi -
I'm having a really hard time w/understanding R's get function, and would
appreciate any help with this.
Specifically, I'm using a for loop to call a function. I'd like the
function to have access to the variable being incremented in the for-loop,
i.e.
t.fn <- function() return( get( "i" ) )
t.fn2 <- function() {
for ( i in 1:5 )
cat( t.fn(),
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",
2006 Oct 27
1
Using data and subset arguments in user-defined functions
Dear list,
A while ago, I posted a question asking how to use data or subset
arguments in a user-defined function. Duncan Murdoch suggested the
following solution in the context of a data argument:
data <- data.frame(a=c(1:10),b=c(1:10))
eg.fn <- function(expr, data) {
x <- eval(substitute(expr), envir=data)
return(mean(x))
}
eg.fn(a,data)
I've
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,
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
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:
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
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
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,