aboutsummaryrefslogblamecommitdiff
path: root/docs/reference/drplot.html
blob: b07ae34bf3ee5f5f8c02ad80e4c4689bac287dcf (plain) (tree)
1
2
3
4
5
6
7
8
9
               

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

                                                                               

                                                              
 
                                                    
                                                                                    

                               

                                                                                                                               



                                      

                                                             
                                                                                                                     
             
          
 
                                                      
                                     

                                                 
                                                                                    



                           
 
                                


                                      

                                                         

          
                                 
                                                                             
                                                                
          
 












                                                                                                                                                                                                                                                                                                                                               



                                                                           



                                                                                 

                                                                              







                                                                                   


                                                                        



































                                                                                                                       
                                                              



                                                                   
                                                                      



                                                                       
                                                                           
















                                                                                               
                                                                                   



                                                                            
                                                                              
                                                  
 



                                                                                  
 




                                                                                

                                                                                    


                   
                                                               


                                
                   
                     

















                                                                                                                                                                                                                                                                                       
        


                                                                                      

      
 

                                            


                     
                                                                                                             

      
                     
 

  
 
  
 
                
 
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Plot dose-response models — drplot • drfit</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Plot dose-response models — drplot"><meta property="og:description" content="Produce graphics of dose-response data and dose-response relationships
  either combined or separately, for one or more substances."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
    

    <div class="container template-reference-topic">
      <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">drfit</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.7.4</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav"><li>
  <a href="../reference/index.html">Reference</a>
</li>
      </ul><ul class="nav navbar-nav navbar-right"></ul></div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header><div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Plot dose-response models</h1>
    
    <div class="hidden name"><code>drplot.Rd</code></div>
    </div>

    <div class="ref-description">
    <p>Produce graphics of dose-response data and dose-response relationships
  either combined or separately, for one or more substances.</p>
    </div>

    <div id="ref-usage">
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">drplot</span><span class="op">(</span><span class="va">drresults</span>, <span class="va">data</span>, <span class="va">dtype</span>, <span class="va">alpha</span>, <span class="va">ctype</span>, <span class="va">path</span>,</span>
<span>     <span class="va">fileprefix</span>, <span class="va">overlay</span>, <span class="va">xlim</span>, <span class="va">ylim</span>, <span class="va">xlab</span>, <span class="va">ylab</span>, <span class="va">axes</span>, <span class="va">frame.plot</span>, <span class="va">postscript</span>,</span>
<span>     <span class="va">pdf</span>, <span class="va">png</span>, <span class="va">bw</span>, <span class="va">pointsize</span>, <span class="va">colors</span>, <span class="va">ltys</span>, <span class="va">pchs</span>, <span class="va">devoff</span>, <span class="va">lpos</span><span class="op">)</span></span></code></pre></div>
    </div>

    <div id="arguments">
    <h2>Arguments</h2>
    <dl><dt>drresults</dt>
<dd><p>A data frame as returned from <code><a href="drfit.html">drfit</a></code>.</p></dd>

  <dt>data</dt>
<dd><p>A data frame as returned from <code><a href="drdata.html">drdata</a></code>. The data frame has to
    contain at least a factor called "substance", a vector called "unit"
    containing the unit used for the dose, a column "response" with the
    response values of the test system normalized between 0 and 1, a column
    "dose" with the numeric dose values and a factor called "dosefactor"
    containing the dose as a factor.</p></dd>

  <dt>dtype</dt>
<dd><p>A string describing if the raw data should be plotted ("raw"), or an error
    bar should be constructed from the standard deviations of the responses at
    each dose level ("std", default value) or from the confidence intervals
    ("conf"). If you don't want to see the data, set it to "none".</p></dd>

  <dt>alpha</dt>
<dd><p>The confidence level, defaulting to 0.95, only used if dtype "conf" has been
    chosen.</p></dd>

  <dt>ctype</dt>
<dd><p>This argument decides if horizontal lines are drawn to show the scatter of
    the control values (dose = 0), if there are more than three of them.
    Defaults to "none", further allowed values are "std" and "conf" for
    displaying the standard deviation of the controls or the confidence
    interval for the mean of the controls.</p></dd>

  <dt>path</dt>
<dd><p>The path where graphic files should be put if any are produced. Defaults
    to "./" i.e. the current working directory of R.</p></dd>

  <dt>fileprefix</dt>
<dd><p>A string which will form the beginning of each filename, if graphic files
    are created. Defaults to "drplot".</p></dd>

  <dt>overlay</dt>
<dd><p>If TRUE, all output will be put into one graph, otherwise a separate graph
    will be created for each substance.</p></dd>

  <dt>xlim</dt>
<dd><p>The plot limits (min,max) on the dose axis.</p></dd>

  <dt>ylim</dt>
<dd><p>The plot limits (min,max) on the response axis.</p></dd>

  <dt>xlab</dt>
<dd><p>The axis title for the x axis. Defaults to "Concentration in" <code>unit</code>.</p></dd>

  <dt>ylab</dt>
<dd><p>The axis title for the y axis. Defaults to "Normalized response".</p></dd>

  <dt>axes</dt>
<dd><p>Specifies if axes should be drawn. Default is TRUE, as in
    <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot.default</a></code></p></dd>

  <dt>frame.plot</dt>
<dd><p>Specifies if the plot should be framed. Default is TRUE, as in
    <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot.default</a></code></p></dd>

  <dt>postscript</dt>
<dd><p>If TRUE, (a) postscript graph(s) will be created. Otherwise, and if
    the pdf and png arguments are also FALSE, graphics will be
    displayed with a screen graphics device.</p></dd>

  <dt>pdf</dt>
<dd><p>If TRUE, (a) pdf graph(s) will be created. Otherwise, and if
    the postscript, and png arguments are also FALSE, graphics will be
    displayed with a screen graphics device.</p></dd>

  <dt>png</dt>
<dd><p>If TRUE, (a) png graph(s) will be created. Otherwise, and if the
    postscript and pdf arguments are also FALSE, graphics will be displayed
    with a screen graphics device.</p></dd>

  <dt>bw</dt>
<dd><p>A boolean deciding if the plots will be black and white or not. Default
    is TRUE.</p></dd>

  <dt>pointsize</dt>
<dd><p>The pointsize used for pdf, png and postscript graphics.</p></dd>

  <dt>colors</dt>
<dd><p>This is a vector of colors, defaulting to 1:8, used for plotting the data.</p></dd>

  <dt>ltys</dt>
<dd><p>This is a vector of line types for the dose-response models, defaulting to 1:8.</p></dd>

  <dt>pchs</dt>
<dd><p>This is a vector of character types for the data. The default uses built-in
    characters 1:n with n being the number of substances for which data are plotted
    for overlays, or always 1 when no overlay plot is generated.</p></dd>

  <dt>lpos</dt>
<dd><p>An optional argument defaulting to "topright" specifying the position
    of the legend by being passed to the legend function. See the help for the
    legend function for all possiblities.</p></dd>

  <dt>devoff</dt>
<dd><p>If set to FALSE, the device will not be closed after creation of an overlay
    pdf, png or postscript graph, so texts and other elements can
    be added.</p></dd>

</dl></div>
    <div id="value">
    <h2>Value</h2>
    <dl><dt>results</dt>
<dd><p>You will get plots of data and/or the fitted dose-response curves, on the
    screen and/or as postscript/pdf/png files, depending on the parameters.</p></dd>

</dl></div>
    <div id="note">
    <h2>Note</h2>
    <p>There is a demo for each dataset that can be accessed by
  <code>demo(dataset)</code></p>
    </div>
    <div id="author">
    <h2>Author</h2>
    <p>Johannes Ranke
  <a href="mailto:jranke@uni-bremen.de">jranke@uni-bremen.de</a></p>
    </div>

    <div id="ref-examples">
    <h2>Examples</h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">antifoul</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">r</span> <span class="op">&lt;-</span> <span class="fu"><a href="drfit.html">drfit</a></span><span class="op">(</span><span class="va">antifoul</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> TBT: Fitting data...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Waiting for profiling to be done...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Zn Pyrithion: Fitting data...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Waiting for profiling to be done...</span>
<span class="r-in"><span><span class="fu">drplot</span><span class="op">(</span><span class="va">r</span>,<span class="va">antifoul</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="drplot-1.png" alt="" width="700" height="433"></span>
<span class="r-plt img"><img src="drplot-2.png" alt="" width="700" height="433"></span>
</code></pre></div>
    </div>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
    </nav></div>
</div>


      <footer><div class="copyright">
  <p></p><p>Developed by Johannes Ranke.</p>
</div>

<div class="pkgdown">
  <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>

      </footer></div>

  


  

  </body></html>

Contact - Imprint