similar to: Version of substitute that evaluates it's first argument

Displaying 20 results from an estimated 4000 matches similar to: "Version of substitute that evaluates it's first argument"

2008 Sep 24
1
function can permanently modify calling function via substitute?
Dear R-devel: The following code seems to allow one function to permanently modify a calling function. I did not expect this would be allowed (short of more creative gymnastics) and wonder if it is really intended. (I can see other ways to accomplish the intended task of this code [e.g. via match.call instead of substitute below] that do not trigger the problem, but I don't think that is
2004 May 07
1
meetme conf-background.agi
Hello there! Somebody tried the meetme|b which initiates the conf-background AGI. Actually I want to originate another call from a conference.my AGI originates the call and connects it to the conference, but the calleeee is nowhere My extension exten => 21,1,meetme(21|pb) and my AGI **************************************************************************** #!/usr/bin/perl -w
2004 May 10
1
AGI.pm wait_for_digit() not working for me!!!
Hello everybody!!! I really need your help guys, I am using the AGI mode in meetme application, and I want that AGI should wait for an input from the client/user i.e. a digit and then proceed, but I have used that AGI function agi->wait_for_digit(), but no use....my agi just passes, or ignores this function, where AGI should stop here and wait for the input.... .....my extension in my
2003 Oct 23
3
List of lm objects
Hi R-Helpers: I?m trying to fit the same linear model to a bunch of variables in a data frame, so I was trying to adapt the codes John Fox, Spencer Graves and Peter Dalgaard proposed and discused yesterday on this e-mail list: for (y in df[, 3:5]) { mod = lm(y ~ Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum)) Anova(mod, type = "III") } ## by John Fox or for
2009 Nov 03
1
likely bug in 'serialize' or please explain the memory usage
Hi all, assume the following problem: a function call takes a function object and a data variable and calls this function with this data on a remote host. It uses serialization to pass both the function and the data via a socket connection to a remote host. The problem is that depending on the way we call the same construct, the function may be serialized to include the data, which was not
2018 Dec 21
3
formula(model.frame(..)) is misleading
Dear Martin, Since no one else has picked up on this, I?ll take a crack at it: The proposal is to define the S3 class of model-frame objects as c(?model.frame?, ?data.frame?) (not the formal class of these objects, even though this feature was coincidentally introduced in S4). That?s unlikely to do harm, since model frames would still ?inherit? data.frame methods. It's possible that some
2001 Nov 09
1
One package calling C-code from another package.
Dear R people We have two packages, where the first package (geoR) is required by the second (geoRglmm). Both packages have functions calling C-code via .C(). We would like to call C-functions included in the first package from within the C-code in the second package. Is this possible? An appropriate header file was included in the src directory of the second package but this alone did not
2011 Nov 28
2
efficient way to fill up matrix (and evaluate function)
Hi All, I want to do something along the lines of: for (i in 1:n){ for (j in 1:n){ A[i,j]<-myfunc(x[i], x[j]) } } The question is what would be the most efficient way of doing this. Would using functions such as sapply be more efficient that using a for loop? Note that n can be a few thousand. Thus atleast a 1000x1000 matrix. Thanks, Sachin [[alternative HTML version
2012 Mar 20
1
Substitute adds id attribute?
Hi all, I can't figure out how to make this problem easily reproducible, but I can demonstrate it very simply, so I hoped someone might be able to suggest a place to start: > f <- function(x) substitute(x) > f(x) x > f(mpg) mpg attr(,"id") [1] 11 It works as expected in a clean R session: > f <- function(x) substitute(x) > f(x) x > f(mpg) mpg but not
2001 Sep 13
2
SV4 on R?
Dear R-Developers, The traffic today on s-news where Terry Therneau, I, and others are reporting some of the problems we have had using or converting applications to SV4 reminded me of something Duncan Temple Lang had mentioned to me a year ago that I wanted to follow up on. I recall that Duncan said either that if SV4 were to be implemented in R that it would not be the default behavior, or
2006 Jul 25
1
Multiple tests on repeated measurements
Dear R-helpers: My question is how do I efficient and valid correct for multiple tests in a repeated measurement design: Suppose we measure at two distinct visits with repeated subjects a treatment difference on the same variable. The treatment differences are assessed with a mixed model and adjusted by two methods for multiple tests: # 1. Method: Adjustment with library(multcomp)
1999 Mar 24
1
will book on S plus help understanding R ?
Hi all, Was wondering if any body would know if the book "Programming with Data" a guide to S language could be used as a guide to working with the R language. Comments, suggestions, a book review is welcomed. Thanks Josef Bohart -------------- next part -------------- An HTML attachment was scrubbed... URL:
2018 Sep 12
3
hangup the _called_ channel ?
I understand that HangUp() hangs up the calling channel. I want to hangup the called channel. SIP/mycall-xxxxx calls and bridges with DAHDI/1-1. I send SIP/.... to listen to a long, very long, file. GoSub(play-long-file,s,1) [play-long-file] exten=s,1, ;;; Here I want to hangup DAHDI/1-1, the called channel same=n,Playback(very-long-file) same=n,Hangup() How do I hangup the called channel,
2006 Jul 28
3
ActionWebService Struct member name including ''-''
Hi I am tryng to mirror a locked away, secure web service for testing purposes and am almost there. Hoever as part of the definition for the structure of the call to the webservice, I have this struct. class MyCall < ActionWebService::Struct member :username, :string member :password, :string member :"remote-ip", :string end However this does not work... Should
2001 May 30
2
environments
I would like to be able, inside a function, to create a new function, and use it as part of a formula as an argument to, say, gnls or nlme. for example: MyTop <- function(data=dta) { Cexp <- function(dose,A,B,m){...} Model <- as.formula(paste("y","~ Cexp(",paste(formals(Cexp),collapse =", "),")")) MyCall <-
2011 May 02
2
Using substitute to access the expression related to a promise
Hi all, The help for delayedAssign suggests that you can use substitute to access the expression associated with a promise, and the help for substitute says: "If it is a promise object, i.e., a formal argument to a function or explicitly created using ?delayedAssign()?, the expression slot of the promise replaces the symbol. But this doesn't seem to work: > a <- 1 > b <- 2
2003 Oct 10
1
number of arguments in .Call function registration
I initially sent this to the biocore mailing list - but it was suggested that r-devel would also find it interesting. Many of us use a macro like #define CALL_DEF(fname, nargs) { #fname, (DL_FUNC)&fname, nargs} for use in function registration for use with .Call. For example, using the example from R Extension manual, if we want to register a C function myCall with three arguments, we
2005 Jun 03
2
dot in formula
gReetings, I want to manipulate a formula object, containing the name "." so that "." is replaced by a desired (arbitrary) expression. What is a safe way to do this? Adrian Baddeley
2018 Dec 20
1
formula(model.frame(..)) is misleading
When formula() is applied to the output of model.frame() it ignores the formula in the model.frame's 'terms' attribute: > d <- data.frame(A=log(1:6), B=LETTERS[rep(1:2,c(2,4))], C=1/(1:6), D=rep(letters[25:26],c(4,2)), Y=1:6) > m0 <- model.frame(data=d, Y ~ A:B) > formula(m0) Y ~ A + B > `attributes<-`(terms(m0), value=NULL) Y ~ A:B This is in part
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone I have a piece of code that looks like this: mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120", stdev="BMM.SD120")) mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120", stdev="GM1.SD120")) mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",