Your data file should be a .csv file with variable names in the first row. To create a .csv file, enter your variable names and data into a spreadsheet such as Excel, do a Save As from the File menu and choose the "Comma Separated Values" option. More detailed video instructions are available.
My data file is on ...
One variable in your data file is Y, the variable for which to generate the histogram and density graphs. Specify the name of the Y variable exactly as it appears in the first line of your data file.
The created R program is color coded to assist in understanding. Blue: necessary keyword, Green: optional keyword Red: Variable or other name, Gray: commentBlack: user supplied values that can be changed