inst/allknotplotter.R

# This is an R script to make a PDF of all the knots in the package.

# Compare file knotplotter.R. which plots knots up to seven crossings
# and creates knot_table.pdf

# I can't figure out a way to do plot all knots automatically from the
# contents of the data/ directory.  To create this file from scratch,
# use something like:

# for i in ../data/*.R ; do sed -n "1p" $i |tr -d '`<-' ; done

# Use this to generate a text file of all knot names.  Then add the
# three setup lines below, which define function f(), load the
# package, and open a PDF file.  Then use your friendly neighbourhood
# emacs to change "foo" to "f('foo')"; then add "dev.off()" at the
# end.


## setup lines start
f <- function(s){knotplot(get(s),main=s)}
library("knotR")
pdf(file="allknots.pdf")
## setup lines end

f('k10_123')
f('k10_1')
f('k10_47')
f('k10_61')
f('k12a1202')
f('k12n838')
f('k3_1a')
f('k3_1')
f('k4_1a')
f('k4_1')
f('k5_1')
f('k5_2')
f('k6_1')
f('k6_2')
f('k6_3')
f('k7_1')
f('k7_2')
f('k7_3')
f('k7_4')
f('k7_5')
f('k7_6')
f('k7_7a')
f('k7_7')
f('k8_10')
f('k8_11')
f('k8_12')
f('k8_13')
f('k8_14')
f('k8_15')
f('k8_16')
f('k8_17')
f('k8_18')
f('k8_19a')
f('k8_19')
f('k8_1')
f('k8_20')
f('k8_21')
f('k8_2')
f('k8_3')
f('k8_4a')
f('k8_4')
f('k8_5')
f('k8_6')
f('k8_7')
f('k8_8')
f('k8_9')
f('k9_10')
f('k9_11')
f('k9_12')
f('k9_13')
f('k9_14')
f('k9_15')
f('k9_16')
f('k9_17')
f('k9_18')
f('k9_19')
f('k9_1')
f('k9_20')
f('k9_21')
f('k9_22')
f('k9_23a')
f('k9_23')
f('k9_24')
f('k9_25')
f('k9_26')
f('k9_27')
f('k9_28')
f('k9_29')
f('k9_2')
f('k9_30')
f('k9_31')
f('k9_32')
f('k9_33')
f('k9_34')
f('k9_35')
f('k9_36')
f('k9_37')
f('k9_38')
f('k9_39')
f('k9_3')
f('k9_40')
f('k9_41')
f('k9_42')
f('k9_43')
f('k9_44')
f('k9_45')
f('k9_46')
f('k9_47')
f('k9_48')
f('k9_49')
f('k9_4')
f('k9_5')
f('k9_6')
f('k9_7')
f('k9_8')
f('k9_9')
f('amphichiral15')
f('celtic3')
f('D16')
f('fiveloops')
f('flower')
f('fourloops')
f('hexknot2')
f('hexknot')
f('k_infinity')
f('k11a179')
f('k11a1')
f('k11a361')
f('k11n157_morenodes')
f('k11n157')
f('k11n22')
f('k12n_0242')
f('k12n_0411')
f('longthin')
f('ochiai')
f('ornamental20')
f('perko_A')
f('perko_B')
f('pretzel_2_3_7')
f('pretzel_7_3_7')
f('pretzel_p3_p5_p7_m3_m5')
f('reefknot')
f('satellite')
f('sum_31_41')
f('T20')
f('three_figure_eights')
f('trefoil_of_trefoils')
f('triloop')
f('unknot')
dev.off()
RobinHankin/knotR documentation built on Feb. 18, 2024, 12:41 a.m.