similar to: Complex integration in R

Displaying 20 results from an estimated 1000 matches similar to: "Complex integration in R"

2008 Dec 20
2
Print a list in columns
Dear R-Users I have a list with two vectors of doubles tha have different lengths. I want to export it to a file and I also want to print it in two columns. I try with write.table but it need vectors of the same length. Does anyone know how to do it? Thanks Borja [[alternative HTML version deleted]]
2010 Jul 30
3
simple table/matrix problem
Hi Given three vectors x <- c(fish=3, dogs=5, bats=2) y <- c(dogs=1, hogs=3) z <- c(bats=3, dogs=5) How do I create a multi-way table like the following? > out x y z bats 2 0 3 dogs 5 1 5 fish 3 0 0 hogs 0 3 0 ('out' is a matrix). See how the first line shows 'x' has 2 bats, 'y' has zero bats, and 'z' has 3 bats and so on for each
2008 Oct 22
2
Weibull parameter estimation
Dear R-users I would like to fit weibull parameters using "Method of moments" in order to provide the inital values of the parameter to de function 'fitdistr' . I don`t have much experience with maths and I don't know how to do it. Can anyone please put me in the rigth direction? Borja [[alternative HTML version deleted]]
2009 Sep 08
5
sparse vectors
Hi I deal with long vectors almost all of whose elements are zero. Typically, the length will be ~5e7 with ~100 nonzero elements. I want to deal with these objects using a sort of sparse vector. The problem is that I want to be able to 'add' two such vectors. Toy problem follows. Suppose I have two such objects, 'a' and 'b': > a $index [1] 20 30 100000000
2009 Jun 12
1
bundle deprecation
Hi I read that bundles are to be deprecated in 2.10. The BACCO bundle contains three packages (emulator, calibrator, approximator) which I am happy to unbundle. But the 'BACCO' moniker has some considerable cachet for me in terms of recognizability (eg with grant-giving bodies), as it has become an umbrella term for a whole bunch of related statistical functionality of which the three
2009 Jan 22
1
pdf() and pch problems
Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when viewing the graphics window. I also get the same under r47678. Does anyone else get this? le112:~/scratch/R-2.8.1% R --vanilla --quiet >
2009 Jan 22
1
pdf() and pch problems
Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when viewing the graphics window. I also get the same under r47678. Does anyone else get this? le112:~/scratch/R-2.8.1% R --vanilla --quiet >
2008 Nov 05
1
CPU usage on Windows (R 2.7.1)
Dear R-users, I'm using R (2.7.1) under windows and I've got a function written in R that calls a Fortran 77 subroutine using both interface function (.C and .Fortran). The Fortran 77 source was compiled to a shared library using g77 (3.4.5). When I call the R wrapper function, it will use the 100% of my CPU during 25 minutes (the fortran algorithm require a lot of time of execution) .
2006 Jun 02
2
Problem with mle
R 2.3.0 Linux, SuSE 10.0 Hi I have two problems with mle - probably I am using it the wrong way so please let me know. I want to fit different distributions to an observed count of seeds and in the next step use AIC or BIC to identify the best distribution. But when I run the script below (which is part of my original script), I get one error message for the first call of mle: Error in
2010 Nov 10
1
S4 package warning
Hello everyone. R-2.12.0, suse linux 11.3. I am debugging a package that uses S4 methods and R CMD check gives the following warning: > Warning in methods::findMethods(g, env) : > non-generic function 'mdm' given to findMethods() > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. I
2009 Jan 22
1
reshape() problems
Hi I have a data frame with timeseries information like this: year cell Q1 Q2 Q3 Q4 1940 1 1.2 1.4 1.4 1.9 1941 1 2.9 2.1 3.4 2.4 1942 1 2.7 3.2 1.5 2.6 1940 2 1.4 2.1 2.6 2.4 1941 2 2.4 1.4 1.4 3.4 1942 2 1.4 2.4 2.5 4.4 where the Qs mean 'quarter'. I want to extract from
2004 May 13
5
code for functions in base package
Is there any way that I can see the step by step code for functions in the base package? For instance the dexp function. I am a student working on writing my own function for something that is similar to this dexp function and I would like to see the step by step code. Brittany Laine GTA WVU Statistics Department 331 Hodges
2010 Jun 29
3
table() of a factor
Hi suppose I have a factor 'x': > x <- as.factor(c(rep("a",3),"b","d")) > table(x) x a b d 3 1 1 > > But this is not what I want because I need to include the fact that the count of "c" is zero. I can't just change the levels of x: > levels(x) <- c("a","b","c","d") >
2004 Oct 27
1
Warning messages in function fitdistr (library:MASS)
Why the warning messages (2:4)? > x <- rexp(1000,0.2) > fitdistr(x,"exponential",list(rate=1)) rate 0.219824219 (0.006951308) Warning messages: 1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, mylogfn, x = x, hessian = TRUE, ...) 2: NaNs produced in: dexp(x, 1/rate, log) 3: NaNs produced in: dexp(x, 1/rate, log) 4: NaNs
2008 Oct 16
1
Suppressing error messages in a for loop
Hi, Is there any way that I can supress error messages so that they don't stop for loops running? I'm using the gstat package and have created a variogram model for the double exponential model: "dexp <- vgm( .5, "Exp", 10,.1, add.to = vgm(.5, "Exp", 100))" and fitted it using "dexp.fit <- fit.variogram(temp2, dexp, fit.method=6,
2009 Oct 16
1
generalization of tabulate()
Hi I want a generalization of tabulate() which works on rows of a matrix. Suppose I have an integer matrix 'observation': > observation y1 y2 y3 1 4 0 1 4 0 2 0 3 4 1 0 0 5 0 0 1 4 2 0 3 Each row corresponds to a (multivariate) observation. Note that the first two rows are identical: this means that data "c(1,4,0)" was observed twice. Now suppose I can list the sample
2008 Jun 02
2
Problemas usando jri0.4-1 y R 2.7.0
Hola, es la primera vez que mando un correo a cualquiera de las listas de correo de R y no se si esta consulta se ajusta al próposito de la r-help list o debería haberlo mandado a otra de las listas que hay. Mi problema es el siguiente: Estoy desarrollando un programa en java con llamadas a R y no puedo usar jri 0.4-1 con la version 2.7 o 2.6 de R. Curiosamente si me funciona si uso jri 0.4 o la
2011 Sep 06
2
Generalizing call to function
Hello guys, I would like to ask for help to understand what is going on in "func2". My plan is to generalize "func1", so that are expected same results in "func2" as in "func1". Executing "func1" returns... 0.25 with absolute error < 8.4e-05 But for "func2" I get... Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,
2010 Jan 26
1
add points to 3D plot using p3d {onion}
Hi, Can anyone guide me as to how I can add points to a p3d() plot from the onion package?? I want to plot points with different colors on the same 3D plot.? Perhaps I can do this without adding points but somehow directing the 'h' parameter to give different color to points based on a factor I assign to them? FYI, I can do this using using scatterplot3d() and points3d(), but these plots
2009 Mar 02
2
Goldbach partitions code
Folks, I put up a brief note describing my naive attempts to compute Goldbach partitions, starting with a brute-force approach and refining progressively. http://jostamon.blogspot.com/2009/02/goldbachs-comet.html I'd welcome your suggestions on improvements, alternatives, other optimisations, esp. to do with space vs time tradeoffs. Is this an example interesting enough for