Skip to content

Instantly share code, notes, and snippets.


Dason Kurkiewicz Dasonk

View GitHub Profile
Dasonk / monitor_object.R
Last active Dec 11, 2017
Function to create a function to use as a taskCallBack to monitor changes in objects easily
View monitor_object.R
#' Monitor objects using output
#' This creates a function that is meant to be used as a taskCallBack.
#' You can call the resulting function directly yourself when you want
#' to monitor changes but that isn't the intended use.
#' @param object_name Character string. The object name you want to montior
#' @param FUN function - The function used to monitor the object for changes.
#' The only time notifications will be messaged is when
#' the output from FUN changes.
Dasonk / normalProbabilities.R
Created Feb 20, 2014
How to calculate normal distribution probabilities in various languages
View normalProbabilities.R
# dnorm gives the pdf for the normal at x
# pnorm gives the cdf for the normal at x
# P(Z < 1)
# They also accept parameters to specify the mean and standard deviation
# X ~ N(mean = 2, sd = 4)
# P(X < 1)
pnorm(1, 2, 4)