search for: trapezoid

Displaying 20 results from an estimated 52 matches for "trapezoid".

2002 Aug 06
1
Questions about lexical scope
...function name from "integrate" to "bv.integrate". To integrate f(x,y)=sin(x + y) over the unit square, it works: > bv.integrate(function(x, y) sin(x + y), c(0,0), c(1,1)) [1] 0.773651 (compare with .7736445 calculated from 2sin(1)*(1 - cos(1))) Then I write a function using trapezoidal rule as follows: trapezoidal <- function(f, a, b, n=100) { h <- (b - a)/n i <- 1:n sum(f(a + (i - 1)*h), f(a + i*h))*h/2 } I checked with > trapezoidal(sin, 0, 1) [1] 0.4596939 > 1 - cos(1) [1] 0.4596977 and > trapezoidal(dnorm, -3, 3) [1] 0.9972922 > diff(pnor...
2010 Oct 08
1
Trapezoid Rule
Dear R Users, I've never used R before and my professor has asked us to do some pretty intense programming (or it's intense to me at least). Here is the question: Modify the function myquadrature inside the script so that it returns the quadrature of descrete data using the trapezoidal rule. Modify the call to the function at the bottom of the script so that is uses your modifies routine to compute the total volume flux through a transect using descrete observations of bathymetry and vertically-averaged velocity. The professor supplied us with some sample code and i'm pre...
2009 Sep 10
1
Friday 11th: Aswath Rao: "Trapezoidal VoIP is Evil" on VoIP Users Conference at Noon EDT
Hi, We're pleased have a 25-year telephony veteran with us tomorrow, Aswath Rao. Aswath maintains that "Trapezoidal VoIP is Evil". Join us and ask questions, make comments, argue about geeky details... and maybe win a Gigaset S675IP SIP/DECT g722-capable phone with an additional handset. Those of us who have these phones like them a lot. All dial in info is here: http://VUC.me - we have a g722 bridge yo...
2010 Oct 11
1
MATLAB vrs. R
I need to find the area under a trapezoid for a research-related project. I was able to find the area under the trapezoid in MATLAB using the code: function [int] = myquadrature(f,a,b) % user-defined quadrature function % integrate data f from x=a to x=b assuming f is equally spaced over the interval % use type % determine number of da...
2009 Oct 22
5
How to calculate the area under the curve
Hi all, I would like to calculate the area under the ROC curve for my predictive model. I have managed to plot points giving me the ROC curve. However, I do not know how to get the value of the area under. Does anybody know of a function that would give the result I want using an array of specificity and an array of sensitivity as input? Thanks, Olivier -- View this message in context:
2012 Sep 08
3
Apply a function to columns of a matrix
Dear All,   as a follow up to my previous e-mail (I think I am getting closer...):   I am trying to apply the trapezoidal functions to a matric column by column. I have the following code:   a <-matrix(c(1:100),ncol=10) b <-matrix(c(2,4,6,8,10,12,14,16,18,20))   apply(a,2,function(b,a) sum(diff(b)*(a[-1]+a[-length(a)]))/2)   for some reason i get an error message: Error in FUN(newX[[, i], ...): argument "...
2012 Sep 13
2
Shading in prediction intervals
...d maximum of my prediction interval > y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) > y.up=lines(x[x.order], set1.pred[,3][x.order], col=109) domain=min(x):max(x) polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109) It doesnt seem to shade the right region, it gives me a trapezoid. Any help? Thanks! [[alternative HTML version deleted]]
2013 Feb 20
0
[ANNOUNCE] xf86-video-intel 2.21.3
...sertions that we forcibly attach pixmaps correctly sna: Assert that the gpu_bo exists if it is entirely damaged sna: Assert that the GPU damage is NULL before destroy a proxy test: Add generated vsync.avi to gitignore sna/video: Only setup XvMC if we first setup Xv sna/trapezoids: Perform the cell allocation upfront sna/trapezoids: Embed a few cells into the stack sna/trapezoids: Clamp cells to valid range 2.21.3 release Damien Lespiau (1): uxa/gen7: Don't use a message register to store vl git tag: 2.21.3 http://xorg.freedesktop.org/archive/...
2007 Dec 17
3
integration
Dear All, I need to perform a numerical integration of one dimensional fucntions. The extrems of integration are both finite and the functions I'm working on are quite complicated. I have already tried both area() and integrate(), but they do not perform well: area() is very slow and integrate() does not converge. Are in R other functions for numerical integration of one dimentional
2007 Feb 15
4
integrate over polygon
Hi there, I want to integrate a function over an irregular polygon. Is there any function which can implement this easily? Otherwise, I am thinking of divide the polygon into very small rectangles and use "adapt" to approximate it. Do you have any suggestions to get the fine division? Any advice is appreciated. Haiyong
2005 Sep 28
1
Fast AUC computation
...r Curve (AUC) for many parameter combinations. I am using the ROC library and the following commands to generate each AUC: rocobj=rocdemo.sca(truth = ymis, data = model$fitted.values, rule = dxrule.sca) #generation of observed ROC object aucobj=AUC(rocobj) #pulling out just the observed AUC - trapezoidal not integrated but they are pretty slow. Does anyone know of a faster way to get the AUC? Thanks, Nina [[alternative HTML version deleted]]
2011 Aug 22
0
CRAN packages maintained by you
...l On 8/8/2011 9:46 AM, Kurt Hornik wrote: > Dear maintainers, > > This concerns the packages > > CITAN ENmisc Formula MSBVAR RExcelInstaller RcmdrPlugin.mosaic > Rd2roxygen Rz SGP betareg expectreg fastcluster glmc gptk heplots pxR > sideChannelAttack sp spacetime trapezoid vcd > > maintained by one of you. > > I see that you have added Author at R fields providing enhanced information > on package authors to your DESCRIPTION files, which since R 2.12.0 is > used for auto-generating citations. > > In current r-devel, we have finally added funct...
2013 Feb 05
1
Predictions from the Segmented Package
Hi, I would like to calculate the area under segmented regression lines (single breakpoints). I had thought that I could do this using the predict() function to ascertain some key x y values in order to determine the dimensions for two trapezoids (under each segment of my regression). However, I've not had any success with this and have just read online that the predict function does not work for segmented. Has anyone successfully done what I describe? Or is able to provide some advice on how best to approach this task? Cheers,Oli...
2011 Mar 24
2
[Bug 35630] New: NV31: PFIFO_DMA_PUSHER while running x11perf
...2.6.37.1_1.2-1.1.i586 xorg-x11-server-7.6_1.9.3-15.18.4.i586 Mesa-7.10.99.git20110318.0231-1.1.i586 Mesa-nouveau3d-7.10.99.git20110318.0231-1.1.i586 xorg-x11-driver-video-nouveau-0.0.16.git20110303.2117-1.1.i586 (git versions are UTC dates) $ x11perf -all 1st try: 3 Testing Fill 10x10 aa pre-added trapezoid 2nd try: 3 Testing Fill 100x100 aa pre-added trapezoid [drm] nouveau 0000:01:00.0: PFIFO_DMA_PUSHER - Ch 1 Get 0x000102c0 Put 0x000102d0 State 0x80002054 (err: INVALID_CMD) Push 0x00000000 [drm] nouveau 0000:01:00.0: PFIFO_DMA_PUSHER - Ch 1 Get 0x000102d4 Put 0x000102e0 State 0x60000000 (err: RET_...
2003 Jul 11
1
3d plot with different levels done in different colors
I would like a 3d plot of a matrix such that individual trapezoids that make up the surface are colored according to the z-value of that point (or preferably the midpoint of its four corners, or something similar). MS Excel has something like that. I know that persp can have an nx by ny matrix its "col" argument, I just don't know how to generate t...
2004 Oct 26
2
integration problem
Dear R users, I have spectral data (say, wavelength vs. extinction coefficient) for which I??d like to calculate an integral (i.e. the area underneath the curve). Suppose the (artificial) dataset is lambda E 1 2 2 4 3 5 4 8 5 1 6 5 7 4 8 9 9 8 10 2 How can I calculate an integral for these values using R? Many thanks for any help! Regards Christoph
2011 Aug 02
2
Help with aggregate syntax for a multi-column function please.
Dear R-experts: I am using a function called AUC whose arguments are data, time, id, and dv. data is the name of the dataframe, time is the independent variable column name, id is the subject id and dv is the dependent variable. The function computes area under the curve by trapezoidal rule, for each subject id. I would like to embed this in aggregate to further subset by each Cycle, DoseDayNominal and Drug, but I can't seem to get the aggregate syntax correct. All the examples I can find use single column function such as mean, whereas this AUC function requires four ar...
2013 Feb 01
0
[ANNOUNCE] xf86-video-intel 2.21.0
Release 2.21.0 (2013-02-01) =========================== A few new features: * Enable render acceleration for Haswell GT1/GT2. * Enable multi-threaded rasterisation of trapezoids and fallback composition * Utilile a new kernel interface (v3.9) for processing relocations along with a few older features from the 2.20.x series: * PRIME support for hotplug GPUs and hybrid systems * Support for IvyBridge GT1 machines, aka HD2500 graphics. * Stable 830gm/845g support, a...
2006 Jan 18
2
Display an Image on a Plane
Hi, I am new to R and I would like to display an image on a plane in a 3D plot, i.e. I would like to be able to specify a theta and a phi parameters like in the function persp to display a 2D image on an inclined plane. Regards, vincent [[alternative HTML version deleted]]
2006 Jan 18
2
Display an Image on a Plane
Hi, I am new to R and I would like to display an image on a plane in a 3D plot, i.e. I would like to be able to specify a theta and a phi parameters like in the function persp to display a 2D image on an inclined plane. Regards, vincent [[alternative HTML version deleted]]