You can print out the nomogram, and use a ruler to read off the solutions to the quadratic equation, where the line from to intersects the scale.
The example above shows the solutions to the equation . The dashed line connecting to shows the positive solution (4.2), and the dotted line connecting to shows the negative solution (-1.2).
In this example (), both solutions are positive (0.2 and 4.8), thus only the dashed line intersects the scale.
We want to draw lines from to that will pass through a point labeled with , where is a root, satisfying . The equation for our line is . Solve the quadratic to obtain , and substitute into the line equation to get .
If we want all lines corresponding to to go through our point, we must find one independent of . We do this by setting , to yield .
Define and call a nomogram function.
Use make to make the example code below depend on the R environment from above (using our custom R rules).
Make a nomogram, then define and make example lines.
Here’s another example.
This project is designed for reproducible research.
- This entire website (including the source text of this blog post, with all the source code included) is available for cloning at https://github.com/worden-lee/github-pages-sandbox. I’m planning to write instructions for processing it soon.
- To reproduce the full blog post you’ll need to have the following installed: Jekyll, git, R, latexml, GNU make, perl (and maybe other things - bug reports welcome).
- Here is an automatically-generated tar file of the source file contents: wmd_export.tgz. You should be able to unpack this directory and simply run ‘make example.Rout.png’ to build the first image above, and similar commands to build the other output files.
- To reproduce these outputs you will need GNU make, perl, and R installed.
To see the source text of this blog post, with the R and makefile code embedded, see https://github.com/worden-lee/github-pages-sandbox/blob/master/_posts/2014-10-15-nomogram.md.wmd.