Skip to content

Instantly share code, notes, and snippets.

@krisselden
Last active July 5, 2016 09:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisselden/55ddfa5b081fec16d88c8881768ec472 to your computer and use it in GitHub Desktop.
Save krisselden/55ddfa5b081fec16d88c8881768ec472 to your computer and use it in GitHub Desktop.
# Plot and Test Samples in R

Plot and Test Samples in R

Install R

https://cran.r-project.org/bin/

Setup

chmod a+x plot.R

Run

./plot.R <samples.csv
open boxplot.svg
open histogram.svg

Notes:

The wilcox.test does not assume the data to be normal and is only answering a yes/no for whether the sample sets came from the same overall set (the null hypothesis).

The dots in the box plot are outliers defined as outside 1.5 x IQR (Interquartile Range; the length between the 25th and 75th percentile).

Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="504pt" height="504pt" viewBox="0 0 504 504" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d="M 0.390625 0 L 0.390625 -8.609375 L 7.21875 -8.609375 L 7.21875 0 Z M 6.140625 -1.078125 L 6.140625 -7.53125 L 1.46875 -7.53125 L 1.46875 -1.078125 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
<path style="stroke:none;" d="M 3.390625 -6.421875 C 3.835938 -6.421875 4.269531 -6.316406 4.6875 -6.109375 C 5.101562 -5.898438 5.421875 -5.628906 5.640625 -5.296875 C 5.847656 -4.972656 5.988281 -4.601562 6.0625 -4.1875 C 6.125 -3.894531 6.15625 -3.429688 6.15625 -2.796875 L 1.546875 -2.796875 C 1.566406 -2.160156 1.71875 -1.648438 2 -1.265625 C 2.28125 -0.878906 2.71875 -0.6875 3.3125 -0.6875 C 3.863281 -0.6875 4.300781 -0.867188 4.625 -1.234375 C 4.8125 -1.441406 4.945312 -1.6875 5.03125 -1.96875 L 6.0625 -1.96875 C 6.039062 -1.738281 5.953125 -1.484375 5.796875 -1.203125 C 5.640625 -0.921875 5.46875 -0.6875 5.28125 -0.5 C 4.957031 -0.1875 4.554688 0.0195312 4.078125 0.125 C 3.828125 0.1875 3.539062 0.21875 3.21875 0.21875 C 2.4375 0.21875 1.773438 -0.0625 1.234375 -0.625 C 0.691406 -1.195312 0.421875 -1.992188 0.421875 -3.015625 C 0.421875 -4.023438 0.691406 -4.84375 1.234375 -5.46875 C 1.785156 -6.101562 2.503906 -6.421875 3.390625 -6.421875 Z M 5.0625 -3.640625 C 5.019531 -4.097656 4.921875 -4.460938 4.765625 -4.734375 C 4.484375 -5.242188 4.003906 -5.5 3.328125 -5.5 C 2.835938 -5.5 2.425781 -5.320312 2.09375 -4.96875 C 1.769531 -4.625 1.597656 -4.179688 1.578125 -3.640625 Z M 3.28125 -6.421875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 0.171875 -6.28125 L 1.546875 -6.28125 L 2.984375 -4.0625 L 4.4375 -6.28125 L 5.71875 -6.25 L 3.609375 -3.21875 L 5.8125 0 L 4.46875 0 L 2.90625 -2.359375 L 1.40625 0 L 0.0625 0 L 2.28125 -3.21875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
<path style="stroke:none;" d="M 3.421875 -0.703125 C 3.910156 -0.703125 4.316406 -0.910156 4.640625 -1.328125 C 4.972656 -1.742188 5.140625 -2.359375 5.140625 -3.171875 C 5.140625 -3.671875 5.066406 -4.101562 4.921875 -4.46875 C 4.648438 -5.15625 4.148438 -5.5 3.421875 -5.5 C 2.691406 -5.5 2.191406 -5.132812 1.921875 -4.40625 C 1.773438 -4.019531 1.703125 -3.523438 1.703125 -2.921875 C 1.703125 -2.429688 1.773438 -2.019531 1.921875 -1.6875 C 2.191406 -1.03125 2.691406 -0.703125 3.421875 -0.703125 Z M 0.6875 -6.25 L 1.71875 -6.25 L 1.71875 -5.421875 C 1.925781 -5.703125 2.15625 -5.921875 2.40625 -6.078125 C 2.757812 -6.304688 3.175781 -6.421875 3.65625 -6.421875 C 4.375 -6.421875 4.976562 -6.148438 5.46875 -5.609375 C 5.96875 -5.066406 6.21875 -4.289062 6.21875 -3.28125 C 6.21875 -1.90625 5.859375 -0.925781 5.140625 -0.34375 C 4.691406 0.03125 4.164062 0.21875 3.5625 0.21875 C 3.09375 0.21875 2.695312 0.113281 2.375 -0.09375 C 2.1875 -0.21875 1.976562 -0.421875 1.75 -0.703125 L 1.75 2.5 L 0.6875 2.5 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
<path style="stroke:none;" d="M 0.796875 -6.28125 L 1.8125 -6.28125 L 1.8125 -5.1875 C 1.882812 -5.40625 2.082031 -5.664062 2.40625 -5.96875 C 2.726562 -6.269531 3.097656 -6.421875 3.515625 -6.421875 C 3.535156 -6.421875 3.566406 -6.414062 3.609375 -6.40625 C 3.660156 -6.40625 3.742188 -6.398438 3.859375 -6.390625 L 3.859375 -5.28125 C 3.796875 -5.289062 3.738281 -5.296875 3.6875 -5.296875 C 3.632812 -5.296875 3.578125 -5.296875 3.515625 -5.296875 C 2.984375 -5.296875 2.570312 -5.125 2.28125 -4.78125 C 2 -4.445312 1.859375 -4.054688 1.859375 -3.609375 L 1.859375 0 L 0.796875 0 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
<path style="stroke:none;" d="M 0.78125 -6.25 L 1.84375 -6.25 L 1.84375 0 L 0.78125 0 Z M 0.78125 -8.609375 L 1.84375 -8.609375 L 1.84375 -7.40625 L 0.78125 -7.40625 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-6">
<path style="stroke:none;" d="M 0.78125 -6.28125 L 1.8125 -6.28125 L 1.8125 -5.390625 C 2.0625 -5.691406 2.289062 -5.914062 2.5 -6.0625 C 2.84375 -6.300781 3.238281 -6.421875 3.6875 -6.421875 C 4.1875 -6.421875 4.585938 -6.296875 4.890625 -6.046875 C 5.054688 -5.910156 5.210938 -5.703125 5.359375 -5.421875 C 5.585938 -5.765625 5.859375 -6.015625 6.171875 -6.171875 C 6.492188 -6.335938 6.851562 -6.421875 7.25 -6.421875 C 8.09375 -6.421875 8.664062 -6.113281 8.96875 -5.5 C 9.132812 -5.175781 9.21875 -4.734375 9.21875 -4.171875 L 9.21875 0 L 8.125 0 L 8.125 -4.359375 C 8.125 -4.773438 8.019531 -5.0625 7.8125 -5.21875 C 7.601562 -5.375 7.347656 -5.453125 7.046875 -5.453125 C 6.628906 -5.453125 6.269531 -5.3125 5.96875 -5.03125 C 5.675781 -4.757812 5.53125 -4.300781 5.53125 -3.65625 L 5.53125 0 L 4.453125 0 L 4.453125 -4.09375 C 4.453125 -4.519531 4.398438 -4.832031 4.296875 -5.03125 C 4.140625 -5.320312 3.84375 -5.46875 3.40625 -5.46875 C 3.007812 -5.46875 2.644531 -5.3125 2.3125 -5 C 1.988281 -4.695312 1.828125 -4.140625 1.828125 -3.328125 L 1.828125 0 L 0.78125 0 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-7">
<path style="stroke:none;" d="M 0.78125 -6.28125 L 1.78125 -6.28125 L 1.78125 -5.390625 C 2.070312 -5.753906 2.382812 -6.015625 2.71875 -6.171875 C 3.050781 -6.335938 3.421875 -6.421875 3.828125 -6.421875 C 4.710938 -6.421875 5.3125 -6.109375 5.625 -5.484375 C 5.800781 -5.140625 5.890625 -4.65625 5.890625 -4.03125 L 5.890625 0 L 4.8125 0 L 4.8125 -3.953125 C 4.8125 -4.335938 4.753906 -4.644531 4.640625 -4.875 C 4.453125 -5.269531 4.113281 -5.46875 3.625 -5.46875 C 3.375 -5.46875 3.171875 -5.441406 3.015625 -5.390625 C 2.722656 -5.304688 2.46875 -5.132812 2.25 -4.875 C 2.070312 -4.664062 1.957031 -4.453125 1.90625 -4.234375 C 1.851562 -4.015625 1.828125 -3.695312 1.828125 -3.28125 L 1.828125 0 L 0.78125 0 Z M 3.25 -6.421875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-8">
<path style="stroke:none;" d="M 0.984375 -8.03125 L 2.046875 -8.03125 L 2.046875 -6.28125 L 3.046875 -6.28125 L 3.046875 -5.421875 L 2.046875 -5.421875 L 2.046875 -1.3125 C 2.046875 -1.09375 2.125 -0.945312 2.28125 -0.875 C 2.351562 -0.832031 2.488281 -0.8125 2.6875 -0.8125 C 2.738281 -0.8125 2.789062 -0.8125 2.84375 -0.8125 C 2.90625 -0.820312 2.972656 -0.828125 3.046875 -0.828125 L 3.046875 0 C 2.929688 0.03125 2.804688 0.0507812 2.671875 0.0625 C 2.546875 0.0820312 2.40625 0.09375 2.25 0.09375 C 1.757812 0.09375 1.425781 -0.03125 1.25 -0.28125 C 1.070312 -0.53125 0.984375 -0.859375 0.984375 -1.265625 L 0.984375 -5.421875 L 0.140625 -5.421875 L 0.140625 -6.28125 L 0.984375 -6.28125 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-9">
<path style="stroke:none;" d="M 3.1875 -6.453125 C 3.894531 -6.453125 4.46875 -6.28125 4.90625 -5.9375 C 5.351562 -5.59375 5.625 -5.003906 5.71875 -4.171875 L 4.6875 -4.171875 C 4.625 -4.554688 4.484375 -4.875 4.265625 -5.125 C 4.046875 -5.382812 3.6875 -5.515625 3.1875 -5.515625 C 2.519531 -5.515625 2.039062 -5.1875 1.75 -4.53125 C 1.5625 -4.101562 1.46875 -3.578125 1.46875 -2.953125 C 1.46875 -2.328125 1.597656 -1.796875 1.859375 -1.359375 C 2.128906 -0.929688 2.550781 -0.71875 3.125 -0.71875 C 3.5625 -0.71875 3.90625 -0.851562 4.15625 -1.125 C 4.414062 -1.394531 4.59375 -1.757812 4.6875 -2.21875 L 5.71875 -2.21875 C 5.601562 -1.382812 5.3125 -0.773438 4.84375 -0.390625 C 4.375 -0.00390625 3.773438 0.1875 3.046875 0.1875 C 2.222656 0.1875 1.566406 -0.113281 1.078125 -0.71875 C 0.585938 -1.320312 0.34375 -2.070312 0.34375 -2.96875 C 0.34375 -4.070312 0.609375 -4.925781 1.140625 -5.53125 C 1.679688 -6.144531 2.363281 -6.453125 3.1875 -6.453125 Z M 3.03125 -6.421875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-10">
<path style="stroke:none;" d="M 3.265625 -0.6875 C 3.960938 -0.6875 4.441406 -0.945312 4.703125 -1.46875 C 4.960938 -2 5.09375 -2.585938 5.09375 -3.234375 C 5.09375 -3.828125 5 -4.304688 4.8125 -4.671875 C 4.507812 -5.242188 4 -5.53125 3.28125 -5.53125 C 2.632812 -5.53125 2.164062 -5.285156 1.875 -4.796875 C 1.582031 -4.304688 1.4375 -3.710938 1.4375 -3.015625 C 1.4375 -2.347656 1.582031 -1.789062 1.875 -1.34375 C 2.164062 -0.90625 2.628906 -0.6875 3.265625 -0.6875 Z M 3.3125 -6.453125 C 4.113281 -6.453125 4.789062 -6.179688 5.34375 -5.640625 C 5.90625 -5.109375 6.1875 -4.316406 6.1875 -3.265625 C 6.1875 -2.253906 5.941406 -1.414062 5.453125 -0.75 C 4.960938 -0.09375 4.203125 0.234375 3.171875 0.234375 C 2.304688 0.234375 1.617188 -0.0546875 1.109375 -0.640625 C 0.597656 -1.234375 0.34375 -2.019531 0.34375 -3 C 0.34375 -4.050781 0.609375 -4.890625 1.140625 -5.515625 C 1.679688 -6.140625 2.40625 -6.453125 3.3125 -6.453125 Z M 3.265625 -6.421875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph0-11">
<path style="stroke:none;" d="M 0.796875 -8.609375 L 1.859375 -8.609375 L 1.859375 0 L 0.796875 0 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-0">
<path style="stroke:none;" d="M 0 -0.390625 L -8.609375 -0.390625 L -8.609375 -7.21875 L 0 -7.21875 Z M -1.078125 -6.140625 L -7.53125 -6.140625 L -7.53125 -1.46875 L -1.078125 -1.46875 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-1">
<path style="stroke:none;" d="M 0 -0.375 C -0.71875 -0.414062 -1.34375 -0.566406 -1.875 -0.828125 C -2.414062 -1.085938 -2.90625 -1.59375 -3.34375 -2.34375 L -4 -3.46875 C -4.289062 -3.96875 -4.539062 -4.320312 -4.75 -4.53125 C -5.070312 -4.851562 -5.441406 -5.015625 -5.859375 -5.015625 C -6.347656 -5.015625 -6.734375 -4.863281 -7.015625 -4.5625 C -7.304688 -4.269531 -7.453125 -3.882812 -7.453125 -3.40625 C -7.453125 -2.675781 -7.179688 -2.175781 -6.640625 -1.90625 C -6.335938 -1.75 -5.929688 -1.664062 -5.421875 -1.65625 L -5.421875 -0.578125 C -6.148438 -0.585938 -6.742188 -0.722656 -7.203125 -0.984375 C -8.015625 -1.441406 -8.421875 -2.25 -8.421875 -3.40625 C -8.421875 -4.363281 -8.160156 -5.0625 -7.640625 -5.5 C -7.117188 -5.945312 -6.539062 -6.171875 -5.90625 -6.171875 C -5.238281 -6.171875 -4.664062 -5.9375 -4.1875 -5.46875 C -3.90625 -5.195312 -3.566406 -4.707031 -3.171875 -4 L -2.734375 -3.1875 C -2.523438 -2.8125 -2.320312 -2.515625 -2.125 -2.296875 C -1.789062 -1.898438 -1.414062 -1.648438 -1 -1.546875 L -1 -6.140625 L 0 -6.140625 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-2">
<path style="stroke:none;" d="M -2.140625 -1.484375 C -1.535156 -1.554688 -1.117188 -1.835938 -0.890625 -2.328125 C -0.773438 -2.578125 -0.71875 -2.863281 -0.71875 -3.1875 C -0.71875 -3.8125 -0.914062 -4.273438 -1.3125 -4.578125 C -1.707031 -4.878906 -2.148438 -5.03125 -2.640625 -5.03125 C -3.222656 -5.03125 -3.675781 -4.847656 -4 -4.484375 C -4.320312 -4.128906 -4.484375 -3.703125 -4.484375 -3.203125 C -4.484375 -2.835938 -4.410156 -2.523438 -4.265625 -2.265625 C -4.128906 -2.003906 -3.9375 -1.785156 -3.6875 -1.609375 L -3.734375 -0.6875 L -8.25 -1.328125 L -8.25 -5.6875 L -7.234375 -5.6875 L -7.234375 -2.125 L -4.90625 -1.765625 C -5.050781 -1.960938 -5.160156 -2.148438 -5.234375 -2.328125 C -5.359375 -2.640625 -5.421875 -3 -5.421875 -3.40625 C -5.421875 -4.175781 -5.171875 -4.828125 -4.671875 -5.359375 C -4.179688 -5.898438 -3.554688 -6.171875 -2.796875 -6.171875 C -2.003906 -6.171875 -1.300781 -5.921875 -0.6875 -5.421875 C -0.0820312 -4.929688 0.21875 -4.148438 0.21875 -3.078125 C 0.21875 -2.398438 0.0234375 -1.796875 -0.359375 -1.265625 C -0.742188 -0.742188 -1.335938 -0.453125 -2.140625 -0.390625 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-3">
<path style="stroke:none;" d="M -8.390625 -3.25 C -8.390625 -4.332031 -7.941406 -5.117188 -7.046875 -5.609375 C -6.359375 -5.984375 -5.410156 -6.171875 -4.203125 -6.171875 C -3.066406 -6.171875 -2.125 -6 -1.375 -5.65625 C -0.300781 -5.164062 0.234375 -4.359375 0.234375 -3.234375 C 0.234375 -2.234375 -0.203125 -1.484375 -1.078125 -0.984375 C -1.816406 -0.578125 -2.800781 -0.375 -4.03125 -0.375 C -4.976562 -0.375 -5.796875 -0.5 -6.484375 -0.75 C -7.753906 -1.207031 -8.390625 -2.039062 -8.390625 -3.25 Z M -0.734375 -3.234375 C -0.734375 -3.785156 -0.972656 -4.222656 -1.453125 -4.546875 C -1.941406 -4.867188 -2.847656 -5.03125 -4.171875 -5.03125 C -5.117188 -5.03125 -5.898438 -4.910156 -6.515625 -4.671875 C -7.128906 -4.441406 -7.4375 -3.988281 -7.4375 -3.3125 C -7.4375 -2.6875 -7.144531 -2.226562 -6.5625 -1.9375 C -5.976562 -1.65625 -5.117188 -1.515625 -3.984375 -1.515625 C -3.128906 -1.515625 -2.441406 -1.609375 -1.921875 -1.796875 C -1.128906 -2.078125 -0.734375 -2.554688 -0.734375 -3.234375 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-4">
<path style="stroke:none;" d="M 0.234375 -3.125 C 0.234375 -2.125 -0.0351562 -1.398438 -0.578125 -0.953125 C -1.128906 -0.503906 -1.796875 -0.28125 -2.578125 -0.28125 L -2.578125 -1.390625 C -2.035156 -1.429688 -1.640625 -1.53125 -1.390625 -1.6875 C -0.953125 -1.96875 -0.734375 -2.460938 -0.734375 -3.171875 C -0.734375 -3.734375 -0.878906 -4.179688 -1.171875 -4.515625 C -1.472656 -4.847656 -1.859375 -5.015625 -2.328125 -5.015625 C -2.898438 -5.015625 -3.300781 -4.835938 -3.53125 -4.484375 C -3.769531 -4.128906 -3.890625 -3.640625 -3.890625 -3.015625 C -3.890625 -2.941406 -3.882812 -2.867188 -3.875 -2.796875 C -3.875 -2.722656 -3.875 -2.648438 -3.875 -2.578125 L -4.8125 -2.578125 C -4.789062 -2.691406 -4.78125 -2.785156 -4.78125 -2.859375 C -4.78125 -2.929688 -4.78125 -3.007812 -4.78125 -3.09375 C -4.78125 -3.488281 -4.84375 -3.8125 -4.96875 -4.0625 C -5.1875 -4.507812 -5.578125 -4.734375 -6.140625 -4.734375 C -6.554688 -4.734375 -6.875 -4.582031 -7.09375 -4.28125 C -7.320312 -3.988281 -7.4375 -3.644531 -7.4375 -3.25 C -7.4375 -2.550781 -7.203125 -2.066406 -6.734375 -1.796875 C -6.484375 -1.648438 -6.117188 -1.566406 -5.640625 -1.546875 L -5.640625 -0.5 C -6.265625 -0.5 -6.796875 -0.625 -7.234375 -0.875 C -8.015625 -1.300781 -8.40625 -2.054688 -8.40625 -3.140625 C -8.40625 -3.992188 -8.210938 -4.65625 -7.828125 -5.125 C -7.453125 -5.59375 -6.898438 -5.828125 -6.171875 -5.828125 C -5.660156 -5.828125 -5.242188 -5.691406 -4.921875 -5.421875 C -4.722656 -5.242188 -4.566406 -5.019531 -4.453125 -4.75 C -4.328125 -5.1875 -4.09375 -5.53125 -3.75 -5.78125 C -3.40625 -6.03125 -2.984375 -6.15625 -2.484375 -6.15625 C -1.679688 -6.15625 -1.023438 -5.890625 -0.515625 -5.359375 C -0.015625 -4.835938 0.234375 -4.09375 0.234375 -3.125 Z "/>
</symbol>
<symbol overflow="visible" id="glyph1-5">
<path style="stroke:none;" d="M -2.96875 -3.96875 L -6.78125 -3.96875 L -2.96875 -1.28125 Z M 0 -3.984375 L -2.046875 -3.984375 L -2.046875 -0.3125 L -3.078125 -0.3125 L -8.421875 -4.15625 L -8.421875 -5.046875 L -2.96875 -5.046875 L -2.96875 -6.28125 L -2.046875 -6.28125 L -2.046875 -5.046875 L 0 -5.046875 Z "/>
</symbol>
</g>
</defs>
<g id="surface1">
<rect x="0" y="0" width="504" height="504" style="fill:rgb(100%,100%,100%);fill-opacity:1;stroke:none;"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 93.601562 382.367188 L 247.199219 382.367188 L 247.199219 343.144531 L 93.601562 343.144531 Z "/>
<path style="fill:none;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 93.601562 358.332031 L 247.199219 358.332031 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:3,3;stroke-miterlimit:10;" d="M 170.398438 416.800781 L 170.398438 382.367188 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:3,3;stroke-miterlimit:10;" d="M 170.398438 340.726562 L 170.398438 343.144531 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 132 416.800781 L 208.800781 416.800781 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 132 340.726562 L 208.800781 340.726562 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 93.601562 382.367188 L 247.199219 382.367188 L 247.199219 343.144531 L 93.601562 343.144531 L 93.601562 382.367188 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 173.101562 195.757812 C 173.101562 199.355469 167.699219 199.355469 167.699219 195.757812 C 167.699219 192.15625 173.101562 192.15625 173.101562 195.757812 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 173.101562 258.667969 C 173.101562 262.269531 167.699219 262.269531 167.699219 258.667969 C 167.699219 255.070312 173.101562 255.070312 173.101562 258.667969 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 173.101562 222.652344 C 173.101562 226.253906 167.699219 226.253906 167.699219 222.652344 C 167.699219 219.054688 173.101562 219.054688 173.101562 222.652344 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 173.101562 72.800781 C 173.101562 76.398438 167.699219 76.398438 167.699219 72.800781 C 167.699219 69.199219 173.101562 69.199219 173.101562 72.800781 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 173.101562 232.882812 C 173.101562 236.484375 167.699219 236.484375 167.699219 232.882812 C 167.699219 229.285156 173.101562 229.285156 173.101562 232.882812 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 285.601562 372.363281 L 439.199219 372.363281 L 439.199219 258.390625 L 285.601562 258.390625 Z "/>
<path style="fill:none;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 285.601562 326.804688 L 439.199219 326.804688 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:3,3;stroke-miterlimit:10;" d="M 362.398438 404.214844 L 362.398438 372.363281 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:3,3;stroke-miterlimit:10;" d="M 362.398438 120.917969 L 362.398438 258.390625 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 324 404.214844 L 400.800781 404.214844 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 324 120.917969 L 400.800781 120.917969 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 285.601562 372.363281 L 439.199219 372.363281 L 439.199219 258.390625 L 285.601562 258.390625 L 285.601562 372.363281 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 170.398438 430.558594 L 362.398438 430.558594 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 170.398438 430.558594 L 170.398438 437.761719 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 362.398438 430.558594 L 362.398438 437.761719 "/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph0-1" x="140.71875" y="456.480469"/>
<use xlink:href="#glyph0-2" x="147.392578" y="456.480469"/>
<use xlink:href="#glyph0-3" x="153.392578" y="456.480469"/>
<use xlink:href="#glyph0-1" x="160.066406" y="456.480469"/>
<use xlink:href="#glyph0-4" x="166.740234" y="456.480469"/>
<use xlink:href="#glyph0-5" x="170.736328" y="456.480469"/>
<use xlink:href="#glyph0-6" x="173.402344" y="456.480469"/>
<use xlink:href="#glyph0-1" x="183.398438" y="456.480469"/>
<use xlink:href="#glyph0-7" x="190.072266" y="456.480469"/>
<use xlink:href="#glyph0-8" x="196.746094" y="456.480469"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph0-9" x="344.390625" y="456.480469"/>
<use xlink:href="#glyph0-10" x="350.390625" y="456.480469"/>
<use xlink:href="#glyph0-7" x="357.064453" y="456.480469"/>
<use xlink:href="#glyph0-8" x="363.738281" y="456.480469"/>
<use xlink:href="#glyph0-4" x="367.072266" y="456.480469"/>
<use xlink:href="#glyph0-10" x="371.068359" y="456.480469"/>
<use xlink:href="#glyph0-11" x="377.742188" y="456.480469"/>
</g>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 413.707031 L 59.039062 105.257812 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 413.707031 L 51.839844 413.707031 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 362.296875 L 51.839844 362.296875 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 310.890625 L 51.839844 310.890625 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 259.480469 L 51.839844 259.480469 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 208.074219 L 51.839844 208.074219 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 156.667969 L 51.839844 156.667969 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 105.257812 L 51.839844 105.257812 "/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-1" x="41.761719" y="430.390625"/>
<use xlink:href="#glyph1-2" x="41.761719" y="423.716797"/>
<use xlink:href="#glyph1-3" x="41.761719" y="417.042969"/>
<use xlink:href="#glyph1-3" x="41.761719" y="410.369141"/>
<use xlink:href="#glyph1-3" x="41.761719" y="403.695312"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-4" x="41.761719" y="378.980469"/>
<use xlink:href="#glyph1-3" x="41.761719" y="372.306641"/>
<use xlink:href="#glyph1-3" x="41.761719" y="365.632812"/>
<use xlink:href="#glyph1-3" x="41.761719" y="358.958984"/>
<use xlink:href="#glyph1-3" x="41.761719" y="352.285156"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-4" x="41.761719" y="327.574219"/>
<use xlink:href="#glyph1-2" x="41.761719" y="320.900391"/>
<use xlink:href="#glyph1-3" x="41.761719" y="314.226562"/>
<use xlink:href="#glyph1-3" x="41.761719" y="307.552734"/>
<use xlink:href="#glyph1-3" x="41.761719" y="300.878906"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-5" x="41.761719" y="276.164062"/>
<use xlink:href="#glyph1-3" x="41.761719" y="269.490234"/>
<use xlink:href="#glyph1-3" x="41.761719" y="262.816406"/>
<use xlink:href="#glyph1-3" x="41.761719" y="256.142578"/>
<use xlink:href="#glyph1-3" x="41.761719" y="249.46875"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-5" x="41.761719" y="224.757812"/>
<use xlink:href="#glyph1-2" x="41.761719" y="218.083984"/>
<use xlink:href="#glyph1-3" x="41.761719" y="211.410156"/>
<use xlink:href="#glyph1-3" x="41.761719" y="204.736328"/>
<use xlink:href="#glyph1-3" x="41.761719" y="198.0625"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-2" x="41.761719" y="173.351562"/>
<use xlink:href="#glyph1-3" x="41.761719" y="166.677734"/>
<use xlink:href="#glyph1-3" x="41.761719" y="160.003906"/>
<use xlink:href="#glyph1-3" x="41.761719" y="153.330078"/>
<use xlink:href="#glyph1-3" x="41.761719" y="146.65625"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph1-2" x="41.761719" y="121.941406"/>
<use xlink:href="#glyph1-2" x="41.761719" y="115.267578"/>
<use xlink:href="#glyph1-3" x="41.761719" y="108.59375"/>
<use xlink:href="#glyph1-3" x="41.761719" y="101.919922"/>
<use xlink:href="#glyph1-3" x="41.761719" y="95.246094"/>
</g>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 59.039062 430.558594 L 473.761719 430.558594 L 473.761719 59.039062 L 59.039062 59.039062 L 59.039062 430.558594 "/>
</g>
</svg>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env Rscript
samples = read.csv('stdin')
# by default levels for string factor is alphabetical
# but we want experiment to be x
samples$set <- relevel(samples$set, ref = "experiment")
# test whether the true location of the distribution is shifted
# does not require data to be normally distributed
wilcox.test(µs ~ set, data=samples, conf.int=TRUE)
svg(file = "boxplot.svg")
boxplot(µs ~ set, data=samples)
dev.off()
require(lattice)
svg(file = "histogram.svg")
histogram(~µs | set, data=samples, breaks=nclass.FD)
dev.off()
µs set
43313 control
28189 control
27637 control
33314 control
53477 control
34702 control
26953 control
26048 control
27371 control
40655 control
39419 control
38938 control
29021 control
39428 control
39855 control
25923 control
27741 control
46040 control
31118 control
30566 control
45420 control
30097 control
30534 control
42314 control
30593 control
33346 control
33558 control
37621 control
40106 control
40221 control
46198 experiment
31762 experiment
32098 experiment
27719 experiment
30731 experiment
28709 experiment
40079 experiment
27907 experiment
27790 experiment
25135 experiment
30395 experiment
27865 experiment
29005 experiment
25567 experiment
31863 experiment
43582 experiment
30878 experiment
24699 experiment
31193 experiment
30376 experiment
29083 experiment
28794 experiment
58157 experiment
31611 experiment
32067 experiment
30361 experiment
42587 experiment
28048 experiment
30454 experiment
30126 experiment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment