Very important thing to remember while making RMarkdown file.

---------------------------------------------------------------------------------


When coding the different r code chunks of a markdown file it is very intuitive and tempting to copy paste code from other chunks in the same file for similar analysis. 

Please do not just copy paste codes from other chunks. When you use same variable names in more than on code chunks, evaluation of new chunks will effect the working of earlier chunks from where we have copy pasted. I faced this issue and it took me lots and lots of time to realize that, my variable values were being manipulated in many chunks so i was getting wrong values.

Even if you copy paste the logic from other code chunks, Dont forget to rename the variables , so that each chunk has its own variables and chunks don't modify variables from other code chunks. 

Comments

Popular posts from this blog