Description
1. Choosing a Default Working Directory:
a. Download all the files for this Assignment into a folder on your computer you will create. Give it a name and choose this folder as your Default Working Directory. Putting all the files you will use in R into one folder will make it easy to save and find your data files.
d. Open R Studio, and in the lower right pane, select Files and take a screen shot of the directory you have chosen. Copy and paste this screen shot here (1 pt): Results:
2. Input the following DATA as a vector:
a. Name the following DATA num1 and input as a vector in R Studio:
(11,13,15,20,22,23,25)
b. Name the following DATA num2 and input as a vector in R Studio:
(22,24,27,19,16,31,21)
c. Name the following DATA num3 and input as a vector in R Studio:
(77,66,55,44,33,22,11)
d. View all three DATA sets.
e. Copy and paste your commands and results in R Studio Console here (2pt):
Results:
3. Input the following CSV file into R that has the variable name in first row (heading): gnats.csv Take a screen shot of the Global Environment and console in R (1 pt):
Results:
4. Input the following .xlsx file into R that has the variable name in first row (heading):
car_color.xlsx
Take a screen shot of the Global Environment and console in R (1 pt):
Results:
5. Input the following .Rmd file into R that has the variable name in first row (heading) ) then use
View to view file: ratings.RData
Take a screen shot of the Global Environment and console in R (1 pt):
Results:
6. Simulate a sample of 100 from a Normal Distribution for the height of an oak tree with a mean of 60 feet and a standard deviation of 20.2 ft. Give the name of the column vector Height_of_Oak.
Take a screen shot of the Global Environment and console in R (1 pt):
Results:
7. Create a random sample of 4 without replacement from the following DATA num1 you created earlier, call the column vector, sample_of_4. Then type sample_of_4 to view the column vector Take a screen shot of the Global Environment and console in R (1 pt):
Results:
8. Upload the data set Student_Grades.xlxs , then edit the following data set, Student_Grades.xlsx in the following ways:
a. Name the new file we shall create and get ready to edit using the edit command (new file name is ( Adjusted_Student_Grades.csv ) Take a Screen shot of the edit window (0.5 pts): Results:
b. For Person 2 (P2), change the 0 for MT1 to 79 and MT2 to an 83. Close the edit screen. Then View the new file, Adjusted_Student_Grade.csv using the view command. Take a Screen shot (0.5 pts):
Results:
c. Create a new file called MT_Grades.csv from the Adjusted_Student_Grade.csv file where you will select only the Person, MT1, MT2, MT3, MT4 and MT5 Grades, calling the subset file temp_MT Save the file.
Then View the new file, MT_Grades.csv, using the view command.
Make sure you have the file tab open in the bottom right of R Studio.
Take a Screen shot (0.5 pts): Results:
d. Create a new file called Exam_Grades.csv from the Adjusted_Student_Grade.csv file where you will delete MT1, MT2, MT3, MT4 and MT5 Grades, calling the subset file temp_Exam
Save the file.
Then View the new file, Exam_Grades.csv, using the view command.
Make sure you have the file tab open in the bottom right of R Studio.
Take a Screen shot (0.5 pts): Results




Reviews
There are no reviews yet.