forked from JoachimGoedhart/PlotsOfData
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedefine-notch.rtf
More file actions
36 lines (34 loc) · 949 Bytes
/
Redefine-notch.rtf
File metadata and controls
36 lines (34 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;}
{\colortbl;\red255\green255\blue255;\red52\green52\blue52;\red6\green0\blue135;}
{\info
{\author J.Goedhart}
{\*\company SILS/UvA}}\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 \
\
\pard\pardeftab720\partightenfactor0
\b\fs32 \cf2 \expnd0\expndtw0\kerning0
notchlower =
\b0 \cf2 median - 1.58 * IQR / sqrt(n)
\b \cf2 \
\
notchupper =
\b0 \cf2 median + 1.58 * IQR / sqrt(n)\
\
\
\
\
\
gg <- ggplot_build(p)\
\
\
#This gives a list of the values of the lower notches\
gg$data[[1]]$notchlower\
\
#Change the lower notch of first data point\
gg$data[[1]]$notchlower[1] <- 40
\f1\fs23\fsmilli11729 \cf3 \kerning1\expnd0\expndtw0 \
\
#Plot\
plot(ggplot_gtable(gg))}