讲解R编程语言、csv讲解留学生、解析R语言程序、R设计解析
- 首页 >> Matlab编程Submission:
R script file with R commands/comments showing how you got what was requested and a Word File that shows output and answers questions.
All graphs should have labels for x-axis (xlab), y-axis (ylab), main title (main)
All requested R output must be transferred to WORD.
Data Sets required:
1.boston_corrected_f2013.csv
2.mpgdata.csv
3.lakeveg.csv
4.dodata.csv
Working Directory: Lab3 (all files should be in working directory called Lab3)
Script File Format – all code should be described:
#Lab 3
#Your name
# description of step code
Part A: Dataset 1: boston_corrected_f2013.csv, please load as boston
Examine the two variables RM and AGE.
AGE variable:
1. Create 2 stripcharts of variable with data shown as stacked not overlapped.
Stripchart No.1 should be all values in one line.
Stripchart No. 2 should use the CHAS variable to split data.
Q1. What do the plots show? – ie any clumps, even distribution.
Q2. Did adding CHAS variable reveal any patterns in the data? (compare two lines within plot).
2. Create 2 histograms of variable.
Histogram 1: standard using Scott method for bin calculation
Histogram 2: Relative Frequency (also use Scott for starting point)
3. Create a Quantile plot (method 2 or method 3, make sure to annotate R)
4. Calculate Five number summary
5. Create a Box and Whisker Plot with Whiskers to Adjacent points (1.5 setting)
6. Calculate: Mean, Median, Estimated Mode – please summarize in a table
Q3. How would you describe the distribution of this variable based on what you have plotted and calculated?
Q4. Look at the Quantile-Quantile plot for this variable in lab on bottom of page 17, how do the two distributions compare?
RM variable (basically same as above)
7. Create 2 stripcharts of variable with data shown as stacked not overlapped.
Stripcharts No.1 should be all values in one line.
Stripcharts No. 2 should use the CHAS variable to split data.
Q5. What do the plots show? – ie any clumps, even distribution.
Q6. Did adding CHAS variable reveal any patterns in the data? (compare two lines within plot).
8. Create 2 histograms of variable.
Histogram 1: standard using Scott method for bin calculation
Histogram 2: Relative Frequency (also use Scott for starting point)
9. Create a Quantile plot (method 2 or method 3, make sure to annotate R)
10. Calculate Five number summary
11. Create a Box and Whisker Plot with Whiskers to Adjacent points (1.5 setting)
12. Calculate: Mean, Median, Estimated Mode – please summarize in a table
Q7. How would you describe the distribution of this variable based on what you have plotted and calculated?
13. Plot a Quantile-Quantile plot of AGE on X and RM on Y.
Q8. What does this plot show?
Part B: Dataset 2: mpgdata.csv, please load as mpgdata
MPG variable (check case)
14. Create 2 stripchart of variable with data shown as stacked not overlapped.
Stripchart No.1 should be all values in one line.
Stripchart No. 2 should use the Origin a variable to split data.
15. Create a standard histogram, document method used for bins.
16. Do a Box and Whiskers Plot, show min/max values ( 0 setting )
Q9. Which of the above provides you with the best idea of data distribution.
Q10. How would you describe the data?
Part C: Dataset 3: vegdata.csv, please load as vegdata
17. Calculate: Frequency, Percent Frequency and Cumulative Percent Frequency and summarize in a table in Word.
Part D: Dataset 4: dodata.csv, please load as dodata
18. Create histogram but put into a variable so you can examine counts.
Q11. What happens when you set right=FALSE?