search for: somefunction

Displaying 20 results from an estimated 59 matches for "somefunction".

2011 May 26
3
change function scope?
I'm still getting used to R's scoping. I've run into the following situation value=0 thefunction <- function() print( value ) somefunction <- function() { value=99; thefunction() } somefunction() now, I understand that somefunction() returns 0 because thefunction() was defined with value=0 in its parent envrionment, it dosent look at all in the environment of somefunction. My question is can I re-scope thefunction in the somefunct...
2011 Mar 30
3
how about a "<p-" operator?
...wondered: was there ever a discussion as to providing some modified version of the "<-" and "->" operators in R to do the reverse? That is, since R does not print the values of a command to the console, what if there were an operator such that newobject <p- somefunction() would do the same as print(newobject <- somefunction()) Any thoughts? Carl
2007 Feb 28
1
problem with help.start and ?somefunction
Hi all, I am going to be teaching a workshop next week using R and Bioconductor in one of our university's computer labs. They have recently installed R 2.4.1 for me, and I'm checking all my scripts. I just noticed that using the ?somefunction call to access the documentation for that function is not working. On my own PC, the ? call output changed between R 2.3 and 2.4; before it would open some sort of plain text file and now it opens a nice browser with all the functions of that package listed in a side frame and the function document...
2006 Mar 21
2
Multiple commands per priority
Hi everybody. I have been searching and trying for an answer, but no luck, so here I go.. Is there anyway to execute multiple commands on a single priority in extensions.conf? eg: exten => X.,1,Dial(SIP/1111) & somefunction(${EXTEN}) I need the dial command to dial internal extensions, and the "somefunction" to kick of our own outgoing system for redirection to outside lines; it has to go through our system for billing purposes. Hope someone can help. Regards, Jason
2010 Dec 01
2
default arguments and '...' in a function
...9;, and '...'. Two more arguments 'b' and 'c' should be both set to 1 by default if the user don't include them in '...'. f <- function(a,...) { # set b <- 1 if b is not included in '...' # set c <- 1 if c is not included in '...' somefunction(a,b,c,...) } I found that internally the optional arguments are stored in list(...), but I haven't found a way to manage them, so the final call to somefunction() will include 'b' and 'c' twice if the user have included them in '...', and returns an error. Does anyon...
2016 Jun 14
2
Calling a null pointer. How undefined it is?
Hi all: This question is related to a state machine generated by LLVM for a coroutine. I stripped all coroutine related details to get to the essence of the question. Let's say I have a state machine that looks like this: struct State { FnPtr Fn; State() : Fn(&SomeFunction) {} void Go() { (*Fn)(); } void Stop() { Fn = nullptr; } bool IsDone() { return Fn == nullptr; } }; Fn field serves two purposes: * Cheap check for done. What can be better than compare with zero! * Guard against programmer mistake: accidentally calling Go() when in a Stopped sta...
2009 Oct 11
3
[LLVMdev] Problems linking shared library with __declspec(dllexport)
Hi all, I am trying to use llvm-gcc to link shared libraries on windows/mingw32. When I try to link libraries that contain functions declared with __declspec(dllexport) someFunction(); I get the link error: Cannot export _someFunction: symbol not found Removing the declspec directive solves the problem, but this is not a very feasible solution for me. Using 'regular' gcc does not have this problem. Should I consider this a bug? Thanks, Ronald
2002 Nov 07
2
combinations
I need to construct all possible combinations of an vector of length N taken X at a time for simulation purposes. Taking a a small vector as an example: >input <- c('a','b','c','d') >somefunction(input) a,b,c a,b,d a,c,d b,c,d my only solution thus far is: somefunction <- function(x){ ...a series of grotesque and horribly inefficient loops deleted to save face. } For my purposes, N=20 and X=5, meaning there are about 15k combinations. I assumed this might be a commo...
2009 Oct 11
0
[LLVMdev] Problems linking shared library with __declspec(dllexport)
> I am trying to use llvm-gcc to link shared libraries on windows/mingw32. > When I try to link libraries that contain functions declared with >  __declspec(dllexport) someFunction(); > > I get the link error: > >  Cannot export _someFunction: symbol not found dllexport declspec should be put on the function definition, in this example there is nothing to export - dllexport without function body is meaningless. -- With best regards, Anton Korobeynikov Faculty of...
2004 Feb 27
1
Outer with Three Vectors
Hello, outer() is great for avoiding things like: for (val1 in val1s) { for (val2 in val2s)) { x[i,j] <- somefunction(val1, val2) } } The same can be obtained with: outer(val1s, val2s, somefunction) But what if there are three (or more) sets of values to loop over? Any way of avoiding the loops then? Thanks, -- Wolfgang Viechtbauer
2009 Oct 26
2
What is the most efficient practice to develop an R package?
I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot of time. So when I still develop the package, shall I always source('linmod.R') to test it. Once the code in
2015 Mar 02
2
[LLVMdev] clang change function name
On Mon, Mar 02, 2015 at 12:12:34AM -0500, John Criswell wrote: > On 3/2/15 12:07 AM, Haopeng Liu wrote: > >Got it, thanks. But in my pass, I use function name to locate. Can I > >disable mangling in clang? > > No, but you can probably fine a library that can either mangle the original > name or demangle the name you're seeing in the LLVM bitcode. > > As an FYI,
2008 Mar 25
1
peak finding
Hi all Is there a function that can find the start and end position of peaks in a set of numbers. eg. x=c(14,15,12,11,12,13,14,15,16,15,14,13,12,11,14,12) y=somefunction(x) y 4 14 Thanks John [[alternative HTML version deleted]]
2008 May 13
2
Remove an object by the reference
Hi R, A simple question, but don't know the answer... x="a" a=5 I need to remove the object "a" by using only x. something like rm(somefunction(x))...Is this possible? Shubha Karanth | Amba Research Ph +91 80 3980 8031 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2010 May 12
3
intersect
Hi there, how can I test every element in a vector whether appears in another vector? such as a<-c("aa", "bb", "ff", "cc") b <-c("oo","jj","bb","cc") somefunction(a,b) gives [False, True, False, True] thanks yuan jian [[alternative HTML version deleted]]
2006 Aug 06
4
DRY Scaffolds
I''ve got 8 scaffolds, each one can be considered an ''item'', such as a blog, photo, etc. Using login_engine and user_engine, I list all blogs belonging to a user by saying: @user=session[:user] @blogs=@user.blogs.find(:all) but then let''s say I want to create an option where I want to slice it differently: @user=session[:user] if @someOption ==1
2006 Mar 15
3
prototype.js Event.stopObserving
anyone have any information on how to effectively use this? Event.observe() doesn''t return anything, and nothing I''ve tried is actually removing the event listeners from the objects. -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob.
2007 Feb 27
3
How to use bash command in R script?
...ch will provide two numbers, and assign those numbers to a vector. For example: The following command: $mxresult.sh ABC.mx mxresult.sh is a script written by myself and ABC.mx is a Mx script. I can get two numbers, 126.128 and 29, with this command. Is there any way to do it like this: c <- somefunction("mxresult.sh ABC.mx") Or is their any other way to fulfill the function? Thanks in advance! Best washes, Wei-Wei
2006 Feb 24
3
Summarize by two-column factor, retaining original factors
...apply(dataframe$y,dataframe$nameyear,sum) and then bind those together. But my problem is that I need to somehow retain the original Names in my collapsed dataset, so that later I can do analyses with the Name factors. All I can think of is something like tapply(dataframe$Name,dataframe$nameyear, somefunction?) but nothing seems to work. I'm actually trying to convert a SAS program, and I can't get out of that mindset. There, it's a simple Proc Means, By Name Year. Thanks for any help or suggestions on the right way to go about this. Matt Crawford
2010 Mar 12
2
[LLVMdev] large modules, PPC on OS X, "ld: 32-bit pic-base out of range in"
...mething like this, where mybundlebitcode.o is the large object llc -relocation-model=pic -o=mybundle.s mybundlebitcode.o gcc -arch ppc -c -x assembler -o mybundle.o mybundle.s g++ -o mybundle.bundle -bundle mybundle.o -lotherlibrary I get the following error: ld: 32-bit pic-base out of range in somefunction(Array<unsigned char, 40ul> const&)from mybundle.o Normally I'd try to build with the -mlongcall option, but it doesn't appear that llc has support for this. Is there some way to get llc to generate "long calls"? Thanks!