similar to: Writing functions. please help

Displaying 18 results from an estimated 18 matches similar to: "Writing functions. please help"

2004 May 05
3
sample
Dear List: I have the following simple program: x<- sample(site) VarGuilda1<- var(tapply(x,site,func1)) VarGuilda2<- var(tapply(x,site,func2)) VarGuilda3<- var(tapply(x,site,func3)) VarGuilda4<- var(tapply(x,site,func4)) VarGuilda5<- var(tapply(x,site,func5)) VarGuilda6<- var(tapply(x,site,func6)) VarGuilda7<- var(tapply(x,site,func7)) VarGuilda8<-
2012 Jul 17
0
[LLVMdev] RFC: Profiling Enhancements (GSoC)
Hi Alastair, In addition to your planned tasks, you might want to put in some work to ensure branch probabilities are not lost during optimization. One known issue is LLVM optimizer can turn branchy code into switch statements and it would completely discard probability. Here is a simple example: static void func2(int N, const int *a, const int *b, int *c) __attribute__((always_inline)); void
2018 Jan 11
1
LLVM EH tables much larger than GCC's
On Wed, Jan 10, 2018 at 5:21 AM, James Y Knight <jyknight at google.com> wrote: > > On Fri, Jan 5, 2018 at 9:58 PM, Ryan Prichard via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> 2. *Termination landing pads.* >> >> Clang sometimes uses a landing pad that calls __clang_call_terminate to >> terminate the program. GCC instead leaves a gap in
2011 Feb 17
1
Integration with an Indicator Function in R
Hi all, I have some some problem with regard to finding the integral of a function containing an indicator function. please see the code below: func1 <- function(x, mu){ (mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)} m1star <- function(x){ integrate(func1, lower = 0, upper = Inf,x)$val} T <- function(x){ 0.3*dnorm(x)/(0.3*dnorm(x)+0.7*m1star(x))} func2 <-
2011 Feb 17
1
Integrate with an indicator function
Hi all, I have some some problem with regard to finding the integral of a function containing an indicator function. please see the code below: func1 <- function(x, mu){ (mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)} m1star <- function(x){ integrate(func1, lower = 0, upper = Inf,x)$val} T <- function(x){ 0.3*dnorm(x)/(0.3*dnorm(x)+0.7*m1star(x))} func2 <-
2012 Sep 27
1
Is there a way to source from a specific Git repository without hardcoding the location everywhere?
Folks, A small group of us are working together to develop a set of R functions to support data management and analysis using Eclipse/StatET in a Windows environment. We are using Git/EGit for version control. We work within our own repository and occasionally push to a common remote location. I'd like to have the code source files from the 'local' git repository without
2005 Aug 02
1
plotting 3 functions on same graph
hi all, I wish to draw on the same graphic device 3 functions. But i don't want them to be on different graph, i want to compare them on the same I don't need mfrow or mfcol, I need something else... 1 graph on 1 device inside this graph 3 ploted function. I saw something unsing data.frame, but i think it's overkill, and something less complicated must exist, if not why? why not
2005 Aug 02
1
(no subject)
hi all, I wish to draw on the same graphic device 3 functions. But i don't want them to be on different graph, i want to compare them on the same I don't need mfrow or mfcol, I need something else... 1 graph on 1 device inside this graph 3 ploted function. I saw something unsing data.frame, but i think it's overkill, and something less complicated must exist, if not why? why not
2003 Feb 28
2
optim
Dear all, I have a function MYFUN which depends on 3 positive parameters TETA[1], TETA[2], and TETA[3]; x belongs to [0,1]. I integrate the function over [0,0.1], [0.1,0.2] and [0.2,0.3] and want to choose the three parameters so that these three integrals are as close to, resp., 2300, 4600 and 5800 as possible. As I have three equations with three unknowns, I expect the exact fit, i.e., the SS
2003 Dec 09
2
: global and local variables
Hi all I have a problem pertaining to local and global variables. Say I have a function defined as follows: a<-function(x) {y<x^2} i.e a(2) [1] 4 function b is now defined to take the value of y and do some manipulation with it. As it stands I dont know how to store the variable y such that other functions are able to reference its value. I know that I
2012 Jul 16
2
[LLVMdev] RFC: Profiling Enhancements (GSoC)
Hi all, In light of the expected removal of ProfileInfo this is a request for comments on the next few items that I now plan to work on for GSoC. Planned tasks: #0 Add support for determining branch weight metadata by profiling At the absolute minimum this will require writing a new profile loader which will set branch weight metadata based on profiling data. #1 Optionally use profiling
2010 Sep 10
8
convert "1", "10", and "100" to "0001", "0010", "0100" etc.
Hi, Is there an easy way to convert numbers into a form such that they all have the same number of digits? e.g.: "1", "10", and "100" ...become... "0001", "0010", "0100" etc. I ask because I am producing a large number of files that need to sort consistently by filename. Currently I get this kind of sorting: filename1 filename10
2018 Jan 10
0
LLVM EH tables much larger than GCC's
On Fri, Jan 5, 2018 at 9:58 PM, Ryan Prichard via llvm-dev < llvm-dev at lists.llvm.org> wrote: > 2. *Termination landing pads.* > > Clang sometimes uses a landing pad that calls __clang_call_terminate to > terminate the program. GCC instead leaves a gap in the call site table, > and the personality routine calls std::terminate. For the 4MB > libQt5Core.so sample I'm
2015 Jan 08
2
[LLVMdev] Separating loop nests based on profile information?
> On Jan 7, 2015, at 5:33 PM, Chandler Carruth <chandlerc at google.com> wrote: > > > On Wed, Jan 7, 2015 at 5:19 PM, Philip Reames <listmail at philipreames.com <mailto:listmail at philipreames.com>> wrote: > I've been playing with approaches to getting better optimization of loops which contain infrequently executed slow paths. I've gotten as far as
2018 Jan 06
2
LLVM EH tables much larger than GCC's
Hi, I'm investigating the size of Clang's generated binaries relative to GCC, when targeting Android, and I've noticed that Clang's exception tables are much larger -- the .ARM.extab section is about 2.5 times as large in two examples. I noticed a couple of differences between Clang and GCC: 1. *ULEB128 encoding.* In the call site table, GCC encodes offsets using a ULEB128
2008 Jan 11
1
MRCP Asterisk Integration
Hello asterisk users! Does asterisk (or any of its plugin) support MRCP to interface with 3rd party professional TTS engine? I've found very little information about this, for example: http://www.zen-turkey.com/blog/default.aspx?id=12&t=Asterisk-MRCP-Integr ation Thanks in advance! Regards, Claudio Internet Email Confidentiality Footer
2012 Feb 16
0
Need For Help about audio data compression
Hi all, I am new to the mailing list , and i need your help. i want to compress audio raw data (PCM) after i have captured them in (sensor) and get them as 16-bit integr samples. that is, when i capture voice for,say, 1 second, i get an array of 8 kilo sample, and I NEED TO COMPRESS THIS SO THAT I GET A SMALLER SIZE BEFORE I TRANSMIT THEM WIRELESSLY. Does Speex allow me to such compression ? Any
2009 Aug 13
4
un run run...
Hi All, I am running an Rscript with a bunch of algorithms that are UNSTABLE under some parameter settings. At a certain point one of them sends error massage and my whole run STOPS! What I would like is to save the error massage in some file or variable and carry on to the next command line without stopping this run... Any help or ideas would be welcome, please, with a concrete example (not