Re: [R] ggplot2 stat_density2d issue.

2012-04-18 Thread Dmitriy Lyubimov
mvnorm(100,mu2,sigm2))) sample <- sample[! (sample[,1] <1 | sample[,2] <1 | sample[,1]> 100 | sample[,2]>100),] d <- as.data.frame(sample) names(d)<-c("x","y") ==== On Wed, Apr 18, 2012 at 4:46 PM, Dmitriy Lyubimov wrote: > Thanks

Re: [R] ggplot2 stat_density2d issue.

2012-04-18 Thread Dmitriy Lyubimov
On Wed, Apr 18, 2012 at 4:31 PM, David Winsemius wrote: > > On Apr 18, 2012, at 6:55 PM, Dmitriy Lyubimov wrote: > >> Hello, >> >> I'd be very grateful for help with some ggplot2's stat_density2d issues. >> >> First issue is with data limits. x

[R] ggplot2 stat_density2d issue.

2012-04-18 Thread Dmitriy Lyubimov
Hello, I'd be very grateful for help with some ggplot2's stat_density2d issues. First issue is with data limits. xlim() and ylim() doesn't seem to work; instead, estimates (and plotting) seems to be constrained to range(x), range(y) no matter what i do. The documentation says i can pass in kde2d'

Re: [R] rJava call performance

2012-03-16 Thread Dmitriy Lyubimov
PM, Dmitriy Lyubimov wrote: > The "low level" seems to be much-much better though... not sure why > the difference would be so fundamental... > > f <- function() system.time( for( i in 1:1000) > .jcall("java/lang/Math", returnSig="D", "ab

Re: [R] rJava call performance

2012-03-16 Thread Dmitriy Lyubimov
apsed 0.080 0.000 0.083 On Fri, Mar 16, 2012 at 3:27 PM, Dmitriy Lyubimov wrote: > PS caching reference to the class doesn't change anything fundamentally: > > clazz <- J("java.lang.Double") > system.time( for( i in 1:1000) clazz$ parseDouble(as.character(i))

Re: [R] rJava call performance

2012-03-16 Thread Dmitriy Lyubimov
alling for what it does: > clazz <- J("java.lang.Math") > system.time( for( i in 1:1000) clazz$abs(i) ) user system elapsed 3.492 0.000 3.497 On Fri, Mar 16, 2012 at 3:17 PM, Dmitriy Lyubimov wrote: > Hello, > > I am getting pretty poor rJava call performa

[R] rJava call performance

2012-03-16 Thread Dmitriy Lyubimov
Hello, I am getting pretty poor rJava call performance > system.time(for (i in 1:1000) > J("java.lang.Double")$parseDouble(as.character(i))) user system elapsed 4.884 0.000 4.900 i.e. 5 milliseconds per very simple call on a very fast cpu. JNI calls themselves are said to be pretty

Re: [R] GLM with regularization

2012-03-01 Thread Dmitriy Lyubimov
t; > On Wed, Feb 29, 2012 at 6:22 PM, Dmitriy Lyubimov wrote: >> Hello, >> >> Thank you for probably not so new question, but i am new to R. >> >> Does any of packages have something like glm+regularization? So far i >> see probably something close to that

[R] GLM with regularization

2012-02-29 Thread Dmitriy Lyubimov
Hello, Thank you for probably not so new question, but i am new to R. Does any of packages have something like glm+regularization? So far i see probably something close to that as a ridge regression in MASS but I think i need something like GLM, in particular binomial regularized versions of poly