Skip to content

Instantly share code, notes, and snippets.

@perrygeo
Created April 20, 2012 01:53
Show Gist options
  • Save perrygeo/2425260 to your computer and use it in GitHub Desktop.
Save perrygeo/2425260 to your computer and use it in GitHub Desktop.
Use R to summarize GoldenCheetah metrics database
library(RSQLite)
con <- dbConnect("SQLite", dbname = "/Users/perry/Library/GoldenCheetah/MattPerry/metricDB")
d <-dbGetQuery(con, "select * from metrics")
# Correlate heartrate and time riding with "bike score"
cor((d$Xaverage_hr / LTHR) ^2 * (d$Xtime_riding/3600 * 100), d$Xskiba_bike_score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment