:78 Function create_function() is deprecated [8192]
Filename | |
---|---|
plottingTools.R |
diff --git a/plottingTools.R b/plottingTools.R new file mode 100644 index 0000000..02603b0 --- /dev/null +++ b/plottingTools.R @@ -0,0 +1,17 @@ +# MSC1090, Fall 2018 - UofT/SciNet %%% Marcelo Ponce +# this script is used to visually explore the results of your +# assignment #5 + +# this function receives as arguments two vectors +# containing the sample sizes and probabilities values + +# function to generate a semi-log plot of two vectors with connecting lines +plotMC <- function(NS,probs) { + # check that the arguments have matching dimensions + if (length(NS)!=length(probs)) { + stop("The function requires two vectors with the same number of eleemnts!") + } + + # semi-log plot of probs vs NS with connecting lines + plot(log(NS),probs,'b') +}