Here is a simple R script as well
# FutureDifficulty <-
http://blockexplorer.com/q/estimate# H = HashRate
# R is the Current Reward (25BTC)
# Prints out Coins per day in BTC or fractions
CurrDiff <-readLines("
http://blockexplorer.com/q/getdifficulty")
D <- as.numeric(CurrDiff)
#Set Hash Rate in Next Line
H=1600
R=25
BTC_Day <- 24 / (D * 2^32 / (H * 10^6) / 60 / 60) * R
BTC_Day
The Final Line simply outputs the BTC per day to the R COnsole.