Skip to content

Instantly share code, notes, and snippets.

@jacoby
Created March 19, 2012 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacoby/2120153 to your computer and use it in GitHub Desktop.
Save jacoby/2120153 to your computer and use it in GitHub Desktop.
data.R
# R file template in Template-Toolkit
w_avg <- c( [% weight_average %] )
date <- c( [% dates %] )
w_count <- c( [% measurement_count %] )
weight <- c( [% weight %] )
png(
filename="data.png" ,
width = 600 ,
height = 400 ,
pointsize = 12
)
plot (
weight ,
col="red" ,
name="Weight Record - [% name %]" ,
type="o" ,
xlab="time" ,
ylab="weight in lbs"
)
lines(
w_avg ,
col="blue",
type="o"
)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment