search for: function2

Displaying 20 results from an estimated 39 matches for "function2".

Did you mean: function
2012 Jul 30
6
Convert variable to STring
Dear all, I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the  colnames(mymatrix) <-c(function1.function2,function3) the function1, function2, function3 to be "converted" to simple strings so as  colnames(mymatrix) <-c("function1","function2","function3") Could you please help me understand how I can do that in R? Regards [[alternative HTML version delete...
2006 May 25
13
functions calling functions
...think I may be missing a fundamental concept I hope someone can help me with. I have functions that won''t call other functions. Particularly after an Ajax request. In the following object the ajax request onComplete calls the ajaxFetched function successfully. ajaxFetched tries to call function2 but function2 does not execute. Any ideas or workarounds? thanks Kevin o = Class.create(); o.prototype = { initialize: function() { this.fetchAjaxData(); }, fetchAjaxData: function(){ url="ajax/minimap.php"; pars="x=1&y=1"; var myAjax= new Ajax.Request(...
2012 Feb 09
3
calling the function which is stored in a list
Hi I'm storing two functions in a list # creating two function function1 <- function(n) { return(sum(n)) } function2 <- function(n) { return(mean(n)) } #storing the function function3 =c(function1,function2) is it possible to call the stored function and used it ? x=c(10,29) funtion3[1](x) Thanks ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/callin...
2008 Apr 22
2
optimization setup
...ns (example case) #------------------------------------------------------------ function1 <- function (x, theta) {a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] ) b <- x * theta[1] / theta[3]^2 return( list( a = a, b = b )) } #----------------------------------------------------------- function2<-function (x, theta) {P <- function1(x, theta) c <- P$a * x * exp(-theta[2]) d <- P$b * exp(x) q <- theta[1] / theta[3] res <- c + d + q; res} # Function to be optimized function3 <- function(theta1,theta2,theta3) { n <- length(data) -sum( function2(x = data[2:n],...
2009 Dec 22
1
[LLVMdev] is there a compiler barrier that is effective at codegen level?
...uot;~{dirflag},~{fpsr},~{flags},~{memory}"() nounwind %fp73 = call i8* @llvm.frameaddress(i32 0) ; <i8*> [#uses=1] %sp74 = call i8* @llvm.stacksave() ; <i8*> [#uses=1] call fastcc void @Function1(i8* %sp74, i8* %fp73) nounwind %162 = call i32 (i32, ...)* @Function2(i32 0) ; <i32> [#uses=1] tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags},~{memory}"() nounwind In particular, I would like to prevent modifications to the stack to be put between the calls to Function1 and Function2. Is this possible at all? The standar...
2006 Oct 09
0
dispatch on functions (was: Re: ifelse(logical, function1, function2) does not work)
On 10/7/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > I have noticed that dispatch on functions seems not to work > in another case too. We define + on functions (I have ignored > the niceties of sorting out the environments as we don't really > need it for this example) but when we try to use it, it fails even > though in the second example if we run it
2007 Jul 31
1
Getting variable name used in function...
...file names) and I would like to get object name. Is it possible to get data object's name. And if it is possible, how can I assign this name as an new data object name with an extra addition, for example, data objects name+"2". Thanks for your help. Example: function1(var1,var2) function2(var1) function2(var2) ... With my best regards, Levent TERLEMEZ. [[alternative HTML version deleted]]
2006 Oct 07
3
ifelse(logical, function1, function2) does not work
Why this kind of assignment does not work? n <- 1 f <- ifelse(n == 1, sin, cos) f(pi) this must be rewritten as: n <- 1 f <- cos if (n == 1) f <- sin f(pi) [oops. 1.224606e-16 instead of zero. Damn floating point errors :-/] Alberto Monteiro
2014 Jun 11
3
[LLVMdev] How do clang & clang++ choose function names for LLVM IR?
Hello all, I'm getting started on a project using LLVM's opt tool to do static analysis, printing call graphs and such. When compiling C programs to IR (and eventually to call graphs), function names remain the same (main, function1, function2 etc.), but when compiling the same program as C++, the function names often have cruft added to them (_Z9function1v, _Z9function2v etc.) which doesn't make for a very pretty graph. Why are these extra characters added when going to IR from C++, but not C? I'm interested in what they're...
2010 Feb 03
1
Calculating subsets "on the fly" with ddply
...- function(df, my.val) { ddply(df, .(w=Sepal.Length < my.val, Species), transform, grmean=mean(Petal.Width)) } R> my.function(iris, 5.5) Error in eval(expr, envir, enclos) : object 'my.val' not found I can work around this by editing `df` in my function to add a w column first: my.function2 <- function(df, my.val) { df$w <- df$Sepal.Length < my.val ddply(df, .(w, Species), transform, grmean=mean(Petal.Width)) } R> my2 <- my.function2(iris, 5.5) R> head(my2) Sepal.Length Sepal.Width Petal.Length Petal.Width Species w grmean 1 5.8 4.0...
2009 Dec 03
2
Error in namespaceExport(ns, exports) :
Dear all, I get the error "Error in namespaceExport(ns, exports) : undefined exports function1 , function2" when compiling or even when I roxygen my package. The two function I once had in my package but I deleted them including their .Rd files. I also can't find them in any other function or help file. So does anybody know where these functions are still listed that causes this error? Many...
2009 Dec 03
2
Error in namespaceExport(ns, exports) :
Dear all, I get the error "Error in namespaceExport(ns, exports) : undefined exports function1 , function2" when compiling or even when I roxygen my package. The two function I once had in my package but I deleted them including their .Rd files. I also can't find them in any other function or help file. So does anybody know where these functions are still listed that causes this error? Many...
2008 Feb 20
1
Problem Using the %in% command
Hello all! I have the following problem with the %in% command: 1) I have a data frame that consists of functions (rows) and genes (columns). The whole has been loaded with the "read.delim" command because of gene-duplications between the different rows. 2) Now, there is another data frame that contains all the genes (only the genes and without duplicates) from all the functions of
2012 Oct 05
2
Using variables from different environments in one function
...imple "inner" functions: ############## INNER FUNCTION1 ################# innerfunction1<-function() { ab<-a+b cd<-c+d innerfunctionlist<-list("ab"=ab,"cd"=cd) } ################################################ ############## INNER FUNCTION2 ################# innerfunction2<-function() { print(AB+CD) } ################################################ #And we have a main script with a number of predefined variables. #This shapes an environment in which variables that will be used #by the inner function are defined. #########...
2011 Mar 06
1
Procedural prgramming
Hi!,i would really appreciate any help on that matter.I am currently programming a procedure on RI have few functions,1. Choose Excel file function2. Choose Excel sheet function.3.Choose columns for variables function4.Few plots functions and analisys5.Main function that runs these functions one after the anotherThe porblem which i m desperate to solve is with the Main function, it seems that R is not reading/processing Top to Bottom, Anyone he...
2010 May 30
1
Calling fft from C
...tion convolve2 in C and use it in a function used from R with .Call - e.g. I need to call fft in C. All I can find in the source code is do_fft in Internals.h - but how do I use do_fft? Or should I call another C routine (and how)? How do I solve the problem in the most appropriate way? convolve2=function2(x,y) { x<- c(rep.int(0,exp.length-1),x) n <- length(y<-c(y, rep.int(0, irf.length -1))) x <- fft(fft(x) * Conj(fft(y)), inverse=TRUE) return(Re(x)/n) } -- Best wishes/bedste hilsner Gunnar Hellmund cand. scient., PhD http://staff.pubhealth.ku.dk/~guhe/ --- ?If everyone is thinking...
2015 Aug 26
2
declaring dependencies of shiny app in inst/
...("inst/...")) However, the app itself uses functions from packages which are not used elsewhere in the code. What is the best way to declare these dependencies (using roxygen2)? My 2-cents would be e.g a doc.R file with something along the lines of: [...] #' @importFrom pkg function1 function2 NULL But are their better ways / best practices? On a related topic: are there plans of formally incorporating shiny apps in the structure of a R package, so that the checks will run through the code of the apps as well? Cheers Thibaut ============================== Dr Thibaut Jombart MRC Cent...
2010 May 01
3
Resize Graphics Window
Need way to resize an existing graphics window. This should be applicable across platforms (as part of a package). Context: function1() draws main plot (I'm using grid), function2() adds smaller plot above main plot, but this one can sometimes overflow the original graphics window area. Thanks, Sigal
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...player/Makefile.am | 28 +- player/swfdec_playback_none.c | 38 +++ test/trace/Makefile.am | 6 test/trace/color-new.swf |binary test/trace/color-new.swf.trace | 10 test/trace/function1.swf |binary test/trace/function1.swf.trace | 50 ++++ test/trace/function2.swf |binary test/trace/function2.swf.trace | 2 22 files changed, 621 insertions(+), 98 deletions(-) New commits: diff-tree 9335e136a9a1f2f3dbbbda7a7b156b55d94e7c4c (from 90bd9323aab5388329dfac37a165bd421818875c) Author: Benjamin Otte <otte@gnome.org> Date: Wed Jan 31 16:28:09 2...
2006 Aug 16
7
ActionWebService: XMLRPC Server Multicall possible?
Hi all, I have a question concerning ActionWebService XMLRPC servers: Is it possible to send multicall requests to the Web service? I tried to use multicall and get the error message: no such method ''system.multicall'' on API [MyAPI] In Changeset 2021 there is the following commit message: add ''system.multicall'' support to XML-RPC. boxcarred methods must