s-news
[Top] [All Lists]

Re: questions

To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Subject: Re: questions
From: "Ramaswamy, Ratna [PRDUS]" <RRamaswa@PRDUS.JNJ.COM>
Date: Fri, 18 Jul 2003 11:34:27 -0400

Dear Suser.

I am trying to put two histograms on top of each other(overlay). I have looked into many books and users guide. I do not seem to find right way of handling this. Please see the code below. Is there a way to do this. Many thanks


hist(x,col=2,xlab="Variable Name")
abline(v=-10,col=1,lwd=4,lty=1,lwd=4)

hist(y,col=3,xlab="Variable Name")
abline(v=-11,col=1,lwd=4,lty=1,lwd=4)
Ratna Ramaswamy, Ph.D
Johnson & Johnson Pharmaceutical Research and Development.
Phone: 908-704-5779
Email: rramaswa@PRDUS.jnj.com




     -----Original Message-----
    From:   Ramaswamy, Ratna  [PRI] 
    Sent:   Tuesday, May 29, 2001 2:50 PM
    To:     's-news@wubios.wustl.edu'
    Subject:        questions

    Dear Splus mailing list;

    My fuction below does not work. can you please help me

    varb
              [,1]     [,2]     [,3]     [,4]     [,5]     [,6]
     [1,] 62.18503 35.24559 31.43211 40.08627 39.86139 36.19768
     [2,] 69.88067 51.48075 32.53058 28.38477 37.39414       NA
     [3,] 79.54057 55.90447 61.39566 57.02813 53.88375 33.02118
     [4,] 98.41927 56.02784 56.06016 38.55285 50.67501       NA
     [5,] 62.58358 94.31371 88.41855 80.12720 82.04642 44.66216
     [6,] 57.06580 60.32257 51.72664 66.48371 61.22568 53.99425
     [7,] 47.63295 70.60729 39.16315 37.68639 23.28021 21.55479
     [8,] 23.61806 24.70059 44.63369 24.92768 43.09528 35.26709
     [9,] 77.88619 42.70993 37.49013       NA       NA       NA
    [10,] 58.18059 57.82355 84.63887 75.86851 83.64842       NA


    The above matrix here is N by v (=6). I am trying to pick last obervation prior to NA
    The out put should be
     [1,] 36.19768
     [2,] 37.39414      
     [3,] 33.02118
     [4,] 50.67501     
     [5,] 44.66216
     [6,] 53.99425
     [7,] 21.55479
     [8,] 35.26709
     [9,] 37.49013    
    [10,] 83.64842     





    callm24_function(varb,N,v)

            {
                    mvec_c(rep(0, N*1), N,1)
                    mvec
                     for( i in c(1:N))
                    {for(j in  c(1:v))
                                    {
                                            if (varb[i,j]=="NA"){mvec[i]_varb[i,j-1]}
                                    }
                           
                                   
            print(paste(mvec,i,j))
      
                    }
                    }
    mat_matrix(mvec,ncol=1,byrow=F)
    mat
    }


    Ratna Ramaswamy, Ph.D
    The R.W.Johnson, Pharmaceutical Research Institute
    920 Route 202 South
    Raritan,NJ,08869
    TEL:908-704-5779
    FAX: 908-704-5166

<Prev in Thread] Current Thread [Next in Thread>
  • Re: questions, Ramaswamy, Ratna [PRDUS] <=