[R] julia language unfair comparisons against R

2012-12-04 Thread Suzen, Mehmet
Hello List, Probably many of you aware of the Julia language (http://julialang.org/), It is a promising project. However it seems like R is very slow in their benchmarks. Very important point they omit, they did not use R's own JIT ! I had a feeling that R is mistreaded there :) Also another imp

Re: [R] monte carlo simulation on R

2012-12-04 Thread Suzen, Mehmet
There is a book on MC with R: Introducing Monte Carlo Methods with R by Robert/Casella: http://www.springer.com/statistics/computational+statistics/book/978-1-4419-1575-7 On 4 December 2012 19:21, Adel ESSAFI wrote: > Hello, > > How can I make a monte carlo simulation on R? > > Regards > Adel >

Re: [R] monte carlo simulation on R

2012-12-04 Thread Suzen, Mehmet
There is a book on MC with R: Introducing Monte Carlo Methods with R by Robert/Casella: http://www.springer.com/statistics/computational+statistics/book/978-1-4419-1575-7 On 4 December 2012 19:38, R. Michael Weylandt wrote: > replicate(1000, sum(rnorm(50)^2-rchisq(50, 3))) > > Or you know, many

[R] stiff delay differential equations

2012-12-05 Thread Suzen, Mehmet
Hello List, Can you recommend me if odeSolve can handle stiff delay differential equations with discontinuities? Or any other package? Best, -m __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] How to know what device I am using

2012-12-12 Thread Suzen, Mehmet
dev.cur() On 12 December 2012 10:45, Williams wrote: > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minima

[R] recursion depth limitations

2012-12-13 Thread Suzen, Mehmet
Hello List, I am aware that one can set with recursion depth 'options(expressions = #)', but it has 500K limit. Why do we have a 500K limit on this? While some algorithms are only "solvable" feasibility with recursion and 500K sounds not too much i.e. graph algorithms for example dependency trees

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-13 Thread Suzen, Mehmet
On 13 December 2012 17:52, Simon Urbanek wrote: > Because it's far beyond what you can handle without changing a lot of other > things. 500k expressions will require at least about 320Mb of stack (!) in > the eval() chain alone -- compare that to the 8Mb stack size which is default > in most OS

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 14 December 2012 12:13, Suzen, Mehmet wrote: > On 13 December 2012 23:21, Rui Barradas wrote: >> But it does, each recursive call will load another copy of the function, and >> another copy of the variables used. >> In fact, the cost can become quite large since ev

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 13 December 2012 23:21, Rui Barradas wrote: > But it does, each recursive call will load another copy of the function, and > another copy of the variables used. > In fact, the cost can become quite large since everything is loaded in > memory again. > > Hope this helps, > Many thanks for the r

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 14 December 2012 13:46, Simon Urbanek wrote: > You may be a bit misinformed about with tail recursion means - it still needs > to evaluate the function for each recursion step, the only difference is that > in > such special case there is no additional information that needs to be stored > -

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread Suzen, Mehmet
I wouldn't blame R for floating-point arithmetic and our personal feeling of what 'zero' should be. > options(digits=20) > pi [1] 3.141592653589793116 > sqrt(pi)^2 [1] 3.1415926535897926719 > (pi - sqrt(pi)^2) < 1e-15 [1] TRUE There was a similar post before, for example see: http://r.789695.n4.n

Re: [R] Sampling according to type

2014-03-05 Thread Suzen, Mehmet
If I understood correctly, you need weighted sampling. Try 'prob' argument from 'sample'. For your example: n <- 10 ntype <- rbinom(n, 1, 0.5) myProbs <- rep(1/10, 10) # equally likely myProbs[ which(ntype == 0)] <- 0.75/7 # Divide so the sum will be 1.0 myProbs[ which(ntype == 1)] <- 0.25/3 samp

Re: [R] Sampling according to type

2014-03-05 Thread Suzen, Mehmet
> myProbs[ which(ntype == 0)] <- 0.75/7 # Divide so the sum will be 1.0 > myProbs[ which(ntype == 1)] <- 0.25/3 Here of course you need to divide by number of 0s and 1s, 7 and 3 were was just an example. __ R-help@r-project.org mailing list https://sta

Re: [R] Shortest connected path in a matrix

2014-03-05 Thread Suzen, Mehmet
You may want to check bioconductor packages doing graph algorithms. Maybe this one: http://www.bioconductor.org/packages/release/bioc/manuals/RBGL/man/RBGL.pdf See for example ?dijkstra.sp On 5 March 2014 18:44, McCloskey, Bryan wrote: > Here is some example data (hopefully the monospace formatt

Re: [R] Why does sin(pi) not return 0?

2013-09-26 Thread Suzen, Mehmet
On 26 September 2013 11:30, Rainer M Krug wrote: Why doesn't return me 0? It isn't R question at all. You might want to read about representing real numbers in a computer using floating point http://en.wikipedia.org/wiki/Floating_point If you want more precision for some reason, you may wan

Re: [R] DEoptim inconsistent output

2013-09-30 Thread Suzen, Mehmet
On 29 September 2013 19:17, Aya Anas wrote: > doesn't make sense at all. I got parameters that don't satisfy the > constraint. In addition, when i substituted with the resulting parameters Maybe you have issues with your interpretation of the usage of the package and expected output. So, Can you

Re: [R] Image Classification in R

2013-10-14 Thread Suzen, Mehmet
Hello Lorenzo, Try to locate related R packages from here: http://cran.r-project.org/web/views/MedicalImaging.html On 14 October 2013 22:23, Lorenzo Isella wrote: > Dear All, > For a project I am given a set of images. They represent either healthy or > tumoral tissue, but the specific nature of

Re: [R] RStudio with Revolution-R

2013-10-15 Thread Suzen, Mehmet
On 15 October 2013 01:27, Maxim Linchits wrote: > Hello, > Is it possible to use Revolution-R's multithreading capability with > RStudio as the IDE? Apparently, RevoR is available for Ubuntu, Wrong list! But for reference: http://stackoverflow.com/questions/10835122/multithreading-with-r __

Re: [R] Incorporate Julia into R

2013-10-17 Thread Suzen, Mehmet
On 17 October 2013 15:38, Timo Schmid wrote: > I have some code in R with a lot of matrix multiplication and inverting. R > can be very slow for larger matrices like 5000x5000. > I have seen the new programming language Julia (www.julialang.org) which is > quite fast in doing matrix algebra. It

Re: [R] Revo R for Arima Implementation

2013-10-30 Thread Suzen, Mehmet
On 28 October 2013 14:26, Anindita Chattopadhyay wrote: > We need to understand how we can implement this in Revo R. Most of the people here contribute to community of R not Revo R. I think it is unfair of you to request from this list to solve your Revo R issue.

Re: [R] computation of hessian matrix

2013-11-01 Thread Suzen, Mehmet
On 1 November 2013 11:06, IZHAK shabsogh wrote: > below is a code to compute hessian matrix , which i need to generate 29 > number of different matrices for example first You may consider using Numerical Derivatives package for that instead, see: http://cran.r-project.org/web/packages/numDeriv/v

Re: [R] Fitting arbitrary curve to 1D data with error bars

2013-11-13 Thread Suzen, Mehmet
If you are after adding error bars in a scatter plot; one example is given below : #some example data set.seed(42) df <- data.frame(x = rep(1:10,each=5), y = rnorm(50)) #calculate mean, min and max for each x-value library(plyr) df2 <- ddply(df,.(x),function(df) c(mean=mean(df$y),min=min(df$y),ma

Re: [R] Fitting arbitrary curve to 1D data with error bars

2013-11-14 Thread Suzen, Mehmet
you will see that my > question has nothing to do with drawing error bars on a plot. > > What I want is to do a curve fit to a data with error bars. > > Best, > e. > > On 14 Nov 2013, at 04:21, Suzen, Mehmet wrote: > >> If you are after adding error bars in a scat

Re: [R] Sending a matrix in an email

2013-11-18 Thread Suzen, Mehmet
On 18 November 2013 05:37, Ira Fuchs wrote: > I have a matrix which has colnames and I would like to send this matrix using > sendmailR. How can I convert this simple matrix My 1 cent; In case of large objects or full session, suitable for attachment; RData might be more convenient, i.e., ?save

Re: [R] Functional Programming patterns

2013-11-20 Thread Suzen, Mehmet
Have you checked the r.lambda package of Brian Lee Yung Rowe ? http://cran.r-project.org/web/packages/lambda.r/index.html On 20 November 2013 10:02, wrote: > Hi, > ' > Not specific to 'R'. I search for patterns and found > http://patternsinfp.wordpress.com/ which is too heavy for me. There is a

<    1   2