General Statistics: Difference between revisions

Updated general statistics wiki page
Fixed tags on this page
 
Line 1: Line 1:
<div class="cell">
[[ Category: General ]]
 
[[ Category: Data ]]
<syntaxhighlight lang="r">library(knitr)
[[ Category: Statistics ]]
#figures makde will go to directory called figures, will make them as both png and pdf files
opts_chunk$set(fig.path='figures/',dev=c('png','pdf'))
options(scipen = 2, digits = 3)
# set echo and message to TRUE if you want to display code blocks and code output respectively
 
knitr::knit_hooks$set(inline = function(x) {
  knitr:::format_sci(x, 'md')
})
 
 
superpose.eb <- function (x, y, ebl, ebu = ebl, length = 0.08, ...)
  arrows(x, y + ebu, x, y - ebl, angle = 90, code = 3,
  length = length, ...)
 
 
se <- function(x) sd(x, na.rm=T)/sqrt(length(x))
 
#load these packages, nearly always needed
library(tidyr)
library(dplyr)</syntaxhighlight>
<div class="cell-output cell-output-stderr">
 
<pre>
Attaching package: 'dplyr'</pre>
 
</div>
<div class="cell-output cell-output-stderr">
 
<pre>The following objects are masked from 'package:stats':
 
    filter, lag</pre>
 
</div>
<div class="cell-output cell-output-stderr">
 
<pre>The following objects are masked from 'package:base':
 
    intersect, setdiff, setequal, union</pre>
 
</div>
<syntaxhighlight lang="r"># sets maize and blue color scheme
color.scheme <- c('#00274c', '#ffcb05')</syntaxhighlight>
 
</div>
<span id="general-statistical-methods"></span>
= General Statistical Methods =
= General Statistical Methods =