Copied code to new rmd file to see if there was corruption.