diff --git a/playground/test.R b/playground/test.R index 7c31428..bb37ec0 100644 --- a/playground/test.R +++ b/playground/test.R @@ -153,6 +153,67 @@ sumCalTest2 |> # }; # }; +# the following two results are equal +system('currycarbon "((A,3000,20)+(B,2900,200)+(C,2800,70))+(((D,3500,60)+(E,3400,60))+(F,3300,30))" --densityFile /tmp/currycarbonSumCalTest1.tsv') + +sumCalTest1 <- readr::read_tsv( + "/tmp/currycarbonSumCalTest2.tsv", + col_types = readr::cols() +) + +system('currycarbon "(A,3000,20)+(B,2900,200)+(C,2800,70)+(D,3500,60)+(E,3400,60)+(F,3300,30)" --densityFile /tmp/currycarbonSumCalTest2.tsv') + +sumCalTest2 <- readr::read_tsv( + "/tmp/currycarbonSumCalTest2.tsv", + col_types = readr::cols() +) + +ggplot() + + geom_line( + data = sumCalTest2, + mapping = aes(x = yearBCAD, y = density), + color = "red" + ) + + geom_line( + data = sumCalTest2, + mapping = aes(x = yearBCAD, y = density), + color = "blue" + ) + +# but the following two oxcal scripts are not - only the second one is similar to the currycarbon result +# I think that's how it should be (2023-12-01) + +# Oxcal: +# +# Sum("(A+B+C)+((D*E)+F)") +# { +# Sum("A+B+C") +# { +# R_Date("A",3000,20); +# R_Date("B",2900,200); +# R_Date("C",2800,70); +# }; +# Sum("(D*E)+F") +# { +# Sum("D*E") +# { +# R_Date("D",3500,60); +# R_Date("E",3400,60); +# }; +# R_Date("F",3300,30); +# }; +# }; + +# Sum("(A+B+C)+((D*E)+F)") +# { +# R_Date("A",3000,20); +# R_Date("B",2900,200); +# R_Date("C",2800,70); +# R_Date("D",3500,60); +# R_Date("E",3400,60); +# R_Date("F",3300,30); +# }; + #### another test of the random age sampling #### system('currycarbon "A,3000,30+B,3200,40*C,3300,30" --samplesFile /tmp/currySamples.tsv -n 10000')