*** The following relates to turning in code for homework and other out-of-class assignments: When you prepare your homework file that you will submit in Blackboard, please do the following to keep the format as plain text (.txt), making it possible to grade it: If you are typing your HW document on Windows: * The simplest and BEST way is to type your program in Notepad (or copy/paste it into Notepad), the simple text editor that is available in all Windows versions. Saving it in Notepad creates a .txt file. * Otherwise, if you type the program in Word, be sure to choose File --> Save As --> Plain Text (*.txt). Even this can cause some weird formatting with quote characters, though, so using Notepad is best. If you are typing your HW document on a Mac: * First of all, type your program in TextEdit (or copy/paste it into TextEdit), which is the Mac equivalent of Notepad. * To make it a plain text file, go to the menu "Format" and choose "Make Plain Text". Then save the file. *** About the content of your text file: Remember, every line in your submitted text file except your code should be preceded by a #. That way, the grader will be able to copy everything in the file into R and have the program run without a problem. Do NOT simply copy your R coding straight from the R console and paste it into a text file. This results in something that looks like (not a real HW problem): > my.vec <- c(1,2,3) > my.vec2 <- 1:3 > my.mat <- cbind(my.vec,my.vec2) > my.mat my.vec my.vec2 [1,] 1 1 [2,] 2 2 [3,] 3 3 > This sort of thing is NOT OK to submit as your file. If the grader tried to copy this into R, it would not run because of all of the ">" symbols. If you did this, you need to delete these ">" symbols from your text file. In addition, you don't need to include the output such as my.vec my.vec2 [1,] 1 1 [2,] 2 2 [3,] 3 3 in your submission. If you really want to include the output, you must put comment characters in front of it so that it doesn't run, such as: # my.vec my.vec2 #[1,] 1 1 #[2,] 2 2 #[3,] 3 3 And get into the habit of putting PLENTY of explanatory comments into your file along with your code. Your comments should explain in plain English what each part of your code does. You should address your comments to an R novice, not to an R expert. For some homeworks, you will be graded in part on the quality and sufficient amount of your comments, so be expansive in your explanations!