similar to: Integration of two lines

Displaying 20 results from an estimated 4000 matches similar to: "Integration of two lines"

2013 Jul 17
2
Using RasterBricks
Dear listers, I am trying to create a RasterLayer of the values of a rasterbrick object. The rasterbrick object has, for example, 100cells library(raster) r <- raster(ncol=10, nrow=10) r[]=1:ncell(r) s <- brick(r,r,r) s <- s * 1:3 Each cell of the rasterfinal will have the AREA UNDER CURVE formed by the values in each cell of the three original rasters. For example: s[4] has the
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
Dear R users, subject: How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track or subject as: How to filter XY pairs of inacurate gps position: (latitude, longtitude) to get estimated correct position before calculating track i.e. How to estimate (time series? )? How to filter XY pairs of
2012 Mar 19
2
by output into data frame
I could do this in various hacky ways, but what's the right way? I have a nice application of the by function, which does what I want. The output looks like this: > auc_stress lab.samples.stress$subid: 2 cortisol amylase 1 919.05 6834.8 ---------------------------------------------------------------------------------------------------------------------------
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List: Thank you for the replies to my post yesterday. Gabor and Phil also gave useful replies on how to improve the function by relying on mapply rather than the explicit for loop. In general, I try and use the family of apply functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU
2012 Sep 08
0
Help on calculating AUC with caTools trapz(a,b) command
Dear All,   I have the following example:   a <-matrix(c(1:100),ncol=10) b <-matrix(c(2,4,6,8,10,12,14,16,18,20))   trapz(b,a)   will give me a result of 99, which it seems to me is the AUC of the 1st column only. Is it possible to get the AUC results by columns of "a" using the same "b" values in the calculations as opposed to just generating the result for the 1st
2011 Oct 28
2
Equivalent of win.print for Linux
Hi! In Windows the "win.print" function allows plotting directly to a printer (or copying an open device to the printer). This is very convenient to quickly print a plot once it looks good. Is there an equivalent function under Linux? For example through CUPS, IPP, LPD or other ? Obviously with a printer on the parallel port one could write postscript("/dev/lp0") but what
2007 Sep 17
4
Must be easy, but haven't found the function (numerical integration)
Hi, I have a data frame of 2 columns with the following types : data$day char data$value num And I plot my data with : plot(strptime(donnees$day,format="%Y-%m-%d %H:%M:%S"),donnees$value, type="l") And I'd just like to get the numerical value of the integration of this graph. I looked at ?integrate but, as far as I understood (that is, not very much, due to my poor
2008 Jun 03
3
Rpart and case weights: working with functions
I can't get rpart accept case weights defined inside a function. It keeps using the copy defined in the "global" environment (if they exists) instead of the function-defined ones. Here is what I do: test.function <- function (formula, data) { weights <- rep(.1, 100) rpart(formula, data, weights) } test.function(x~y, data) And I get an error: > Error in
2008 Oct 23
3
xy.coords in text
Hello, I want to add text annotation about correlation on "pairs" plots. I found that I could pass a function to the "panel" argument of pairs : panel.annot <- function(x, y, ...) { points(x, y, ...) c <- cor.test(x, y) legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f", c$estimate))), bty="n") } And then :
2012 Dec 19
2
pROC and ROCR give different values for AUC
Packages pROC and ROCR both calculate/approximate the Area Under (Receiver Operator) Curve. However the results are different. I am computing a new variable as a predictor for a label. The new variable is a (non-linear) function of a set of input values, and I'm checking how different parameter settings contribute to prediction. All my settings are predictive, but some are better. The AUC i
2023 Nov 09
1
Dependency errors for package pracma
I tried to update my package {pracma} on CRAN from 2.4.2 (2022-09-21) to version 2.4.4 (2023-11-08). This package reverse depends / imports / suggests on 350 packages on CRAN and 25 packages on Bioconductor. The only changes are small corrections on some help files, a new function for stereographic projection, and `gcd` and `Lcm` require integer inputs now (these functions are not used in the
2007 Apr 09
1
How to solve differential and integral equation using R?
Hello, I want to know if there are some functions or packages to solve differential and integral equation using R. Thanks. Shao chunxuan. [[alternative HTML version deleted]]
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings, I have the following? Problem: Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k. Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with their probabilities. I tried several approaches: (A) Convolution: each X_j is approximated with
2008 Aug 25
3
name conflicts
Everyone, I've got code in my package that uses LogitBoost from the caTools package. caTools does not have a namespace. My package also uses loads RWeka, which has a namespace, and also has a function called LogitBoost. After loading both packages, how can I be specific about running the version from caTools (since caTools:::LogitBoost won't work)? Thanks, Max
2007 Oct 26
3
SOLUTION - Compiled Kernel and modules for XEN3.1 on PowerEdge 1950
Dear all, since it could be of interest for the list, here I post a link to compiled kernel for XEN 3.1 on a DELL PowerEdge 1950 compiled with gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) on a Debian4 distribution. This is provided AS IS AND WITHOUT ANY SUPPORT AND/OR ANY RESPONSIBILITY :-) The first link (7 MB) pack all the files you should have in /boot. The second link (12 MB)
2012 Mar 13
2
"gplots" packages does not work
I had installed de "gplots" package and then I loaded the library but the package did not work. I recieved a message like this: > install.packages("gplots", dependencies = TRUE) Installing package(s) into ‘/home/fpiston/R/x86_64-pc-linux-gnu-library/2.14’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where
2005 Jun 29
2
"all connections are in use" error during lazyload stage of packa ge installation
Hi, I suddenly started getting strange errors while working on my caTools package: >RCMD install C:/programs/R/rw2011/src/library/caTools ...... preparing package caTools for lazy loading Error in file(file, "r", encoding = encoding) : all connections are in use Execution halted make: *** [lazyload] Error 1 *** Installation of caTools failed *** I searched
2007 Oct 10
1
caTools package
Hi, I tried to install the caTools package manually from the main R Project website and I get the following error message when typing library('caTools') Error in library("caTools") : 'caTools' is not a valid package -- installed < 2.0.0? What am I doing wrong? Also, why is this package not available in the list of packages for direct installation from the R
2010 Jul 08
1
download gplots and caTools
Dear list, I am using R.2.11.1 version on a PC. I downloaded successfully gplots_2.8.0 but I could not find where to download caTools > library("gplots") Loading required package: caTools Error: package 'caTools' could not be loaded In addition: Warning message: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) : there is no package called