Hi Jethi,

On Sat, Sep 25, 2010 at 3:42 PM, jethi <kart...@hotmail.com> wrote:
>
> hey, how can i plot this function??? thanks for ur help

I don't really have the time (or inclination, sorry) to look through
your code, but if it relates to your subject line, then there are
several ways to plot 3d objects in R.

You can look at the scatterplot3d package, or more interestingly (I
think) the rgl package, and its plot3d, lines3d, etc. functions.

-steve

>
> n=1000
> m=2
> k=n/m
> N=100
> myfun <- function(n, m, alpha = .05, seeder = 1000) {
> l=matrix(0,nrow=m,ncol=N)
> for(i in 1:N){
> set.seed(i)
> for(j in 1:m){
> x=rnorm(n,0,0.5)
> y=rnorm(n,0,0.8)
> l[j,i]=cor((x[(((j-1)*k)+1):(((j-1)*k)+k)]),
> (y[(((j-1)*k)+1):(((j-1)*k)+k)]))
> }
> }
>
> for(i in 1:N){
> for (j in 1:m){
> gute <- function() {
>    q_1 <- qnorm(alpha, 0, 0.05)
>
>    q_2 <- qnorm(1 - alpha, 0, 0.05)
>
> p=matrix(0,nrow=m,ncol=N)
> H=matrix(0,nrow=N,ncol=1)
>
> p[j,i]=x[j]^2/sum(x[,i]^2)
> }
> H[i]=log(m)-sum(p[,i]*log(p[,i]))
> }
>   1 - mean(q_1 <= H & H <= q_2)
> }
> output <- gute(a = l[,i])
>  return(output)
> }
>
> regards
> jethi
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/3D-plot-tp2713818p2713818.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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, minimal, self-contained, reproducible code.
>



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
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, minimal, self-contained, reproducible code.

Reply via email to