move Rmd sturr over to R file