Displaying 20 results from an estimated 90000 matches similar to: "Aliases for arguments in a function"
2006 Dec 22
2
Math expression with object to evaluate
Hello.
I have a question that probably has a simple answer.
I have a loop where several figures are plotted with each iteration. I calculate some descriptives to put in the title of the figure. When I use expression, since I want to combine math plotting symbols and the descriptives I calculate, I get an error. Here is an example of the code that I tried:
plot(x,y,
2005 Feb 15
2
Making a Package
Hello.
I have what I know to be a simple question, but never having done anything like this it is
pretty tough.
I'm trying to write an R package. I have a collection of functions that I loaded into R and
then used package.skeleton(). After editing everything in the resulting folder, call it
NewPackage, I tried to follow along with some instructions I found for Windows users.
I installed
2004 Jun 14
2
A Few MCLUST Questions
Hello everyone. I have a few MCLUST questions and I was hoping someone could help me out. If you’re an MCLUST user, they will likely be pretty easy to answer. Thanks in advance for any help.
Ken
What are the pros/cons of starting a finite mixture model at the “m” step versus the “e” step (where “m” is the maximization step and “e” is the expectation step of the EM algorithm)? In
2010 Jun 16
3
Function argument as string
Hi,
Suppose a write a function
a_fn<-function(arg1)
{
return(table(arg1));
}
I have a column called AGE. Now I call the function c = a_fn(AGE);
When a_fn is called, AGE is received in arg1. My question is, how do I
access the actual name of the argument arg1? i.e, inside the
function, i need to know that the actual name of arg1 is "AGE" in this
case.
Thanks in advance,
2010 Oct 13
1
Pasting function arguments and strings
Dear R community,
I am struggling a bit with a probably fairly simple task. I need to use some
already existing functions as argument for a new function that I am going to
create. 'dataset' is an argument, and it comprises objects named
'mean_test', 'sd_test', 'kurt_test' and so on. 'arg1' tells what object I
want (mean, sd, kurt) while 'arg2' tells
2011 Mar 07
2
[LLVMdev] matching function call arguments
Hi,
I am trying to identify if two functions were called with exactly the same argument. For instance, in the below example, assuming both entry() and exit() functions take a single argument, I would like to know if arg1 in entry() is same as arg1in exit().
int a;
struct sa
{
int b;
int c;
};
int main ()
{
struct sa s;
entry (arg1);
...
exit (arg1);
return 0;
}
In
2007 Jun 06
2
name of the variable that will contain the result of a function
Hi everyone,
say I have a function called 'foo', which takes the argument arg1.
Is there any mechanism that I can use to "learn" about the variable
where foo(arg1) is going to be stored?
For example:
x <- foo(arg1)
so, inside foo() I'd like to be able to get the string "x".
if,
foo(arg1)
was used insted, I'd like to get NA.
thank you very much,
b
2002 May 25
2
Function objects as arguments of a function
Hello, R users.
In C (or C++) language, a function can be used as
an argument of another function as follows:
// function used as an argument
void foo(int x)
{
...
}
// function using a function as an argument
void bar(void (*func)(int ), int arg1, int arg2)
{
....
}
// The function 'bar' will be called as follows
int main()
{
....
bar(foo, arg4foo, other_arg);
2011 Mar 07
0
[LLVMdev] matching function call arguments
Could you be more precise about what you mean by "identical"? Would
entry(2) and entry(1+1) be considered equivalent?
If the same Value* is passed to entry and exit, then pointer equality
(==) will detect that.
Reid
On Mon, Mar 7, 2011 at 8:08 AM, Hari Pyla <harip at vt.edu> wrote:
> Hi,
> I am trying to identify if two functions were called with exactly the same
2009 Jul 24
9
getting extra characters with printf(copyin(a, b))
Hi,
I have a situation where a DTrace script is printing out extra characters, despite the copyin() call giving a specific length. Can anyone think of why this might be? It''s fine the first time all of the probes fire, but on a second run of my generating operations, I get junk in there. For example:
set setop length 5, FOUND KEY, STORED
set setop length 5, FOUND KEY, STORED
get
2011 Nov 11
2
[LLVMdev] Argument's types mismatch when creating CallInst.
Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type*
arg3).
Firstly, i do this:
runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx);
then this:
fooFunction = runtimeModule->getFunction("foo");
myType = runtimeModule->getTypeByName("type");
After that, i'm creating another module:
myModule = new Module("My
2012 May 24
1
use list as function arguments
Hello Folks,
Is there any way to pass a list into a function such that the function
will use the list as its arguments? I haven't been able to figure that out.
The background: I'm trying to build a function that will apply another
function multiple times, each time with a different set of specified
arguments. I'm trying to figure out how to pass in a list of argument
lists, then
2006 Jul 31
5
use tracemem to dump content in function read/write
Hi Expert
I want to use dtrace to monitor the content change of one file. I made following scripts,
#!/usr/sbin/dtrace -s
inline int MYPID = $1;
syscall::write:entry
/pid == MYPID/
{
tracemem(arg1, arg2);
printf("\n");
}
It always has an following error
bash-3.00$ sudo dumpFIFO.dtrace 3836
dtrace: failed to compile script ./dumpFIFO.dtrace: line 19: tracemem( ) argument #2
2011 Mar 15
1
Passing an argument to a macro within an Originate command
Hi,
With Asterisk 1.8.3, I can't figure out how to pass an argument to a macro
which is used within an originate command.
Here is my sample dialplan to illustrate:
exten => 123,1,Answer()
exten => 123,n,Originate(SIP/20,app,Macro,foo,bar)
exten => 123,n,NoOp(This is the NoOp after the originate command)
exten => 123,n,Wait(30)
exten => 123,n,Hangup()
[macro-foo]
exten =>
2006 Apr 24
2
CallerID/variable setting.
Hey, all. I'm trying to set my CID such that, internally, I see a
four-digit extension (which is also handy when checking VM), but
externally, I see the full 10-digit number. So I plugged these lines into
my extensions.conf:
exten => _XXXXXXX,1,GotoIf($[ ${CALLERIDNUM} != 1625]?4:2)
exten => _XXXXXXX,2,Set(CALLERIDNUM=6031234${CALLERIDNUM:1})
exten =>
2006 Jun 20
1
Determine the data type of a function to an argument
Hello All:
How can I determing the "types" of args passed to an R function? For
example, given the following:
calculate <- function(...)
{
args <- list(...)
argName = names(args)
if (arg1 == character)
cat("arg1 is a character")
else
cat("arg1 is numeric")
if (arg2 == character)
2016 Mar 14
4
LLVM 3.8 change in function argument lists?
Hi,
I am upgrading my project from 3.7 to 3.8. I find that following code
used to compile in 3.7 but doesn't in 3.8 and I can't understand why.
llvm::Function *mainFunc = ...;
auto argiter = mainFunc->arg_begin();
llvm::Value *arg1 = argiter++;
arg1->setName("obj");
But if I change the code to following it compiles:
auto argiter = mainFunc->arg_begin();
llvm::Value
2006 Dec 17
5
BLF on GXP2000
I am trying to set up the BLF on a GXP2000.
Currently what I have is
extensions.conf:
[globals]
polycom430=SIP/101
[internal]
exten => 101,1,Macro(voicemail,${polycom430})
[macro-voicemail]
exten => s,1,Dial(${ARG1},10,tT)
exten => s,2,VoiceMail(u${MACRO_EXTEN}@default )
exten => s,102,VoiceMail(b${MACRO_EXTEN}@default)
[ext-local-custom]
exten => 101,hint,${polycom430}
2007 Aug 08
1
Failed to pass arguments to controller method
Good morning to everyone:
So weird!!
I got a method called apply_settings(arg1, arg2) in the controller to be
tested. In the controller spec, I of course called the method.
In the controller:
def apply_settings(arg1, arg2) #where arg1 is a hash, and arg2 is an
array of object
#do some coding
end
In the controller spec:
before(:each) do
@controller = Controller.new
2011 Mar 14
1
Rscript, hashbang, and arguments
Hi,
I have a bunch of R scripts which have the hash bang !/usr/bin/env Rscript
and I typically run these scripts by passing in some parameters like this:
./nameOfRScript arg1 arg2 ...
I know Rscript has the option to run in --vanilla. Where exactly do I
insert the --vanilla option? When I do something like this:
./nameOfRScript --vanilla arg1 arg2 ...
And I try to access the commandArgs,