Be sure to explain your code and results in R-notebook text blocks (rather than comments...
60.1K
Verified Solution
Question
Finance
Be sure to explain your code and results in R-notebook text blocks (rather than comments in R-code blocks).
1. Write the tinting file found in the DAAG package to disk in R data format. Use setwd to set the working directory. 2. Read the saved tinting dataset file from disk and assign to a new file name. Create a table of gender (sex) by age (agegp) using the table command. 3. Interest on $1000, compounded annually at 7.5% for five years can be determined with: 1000 ((1 + 0.075)51) (a) Evaluate the above expression. (b) Modify the expression to determine the amount of interest paid if the rate is 3.5%. (c) Explain result obtained when the exponent 5 is changed to seq(1, 10)? 4. Use R to calculate the following: (a) Calculate the first 50 powers of 2, i.e., 22, 23, . . . etc. (b) Calculate the squares of the integers from 1 to 50. (c) Which pairs from (a) and (b) are equal? (i.e. which fulfill the condition 2n = n2) (d) How many pairs from (c) are there? 5. Create a vector x and: (a) Assign to x the values 3, 11, 8, 15, 12 (b) Extract only elements in the 2nd and 4th positions. (c) Use negative subscripts to omit the elements in the 2nd and 3rd positions (d) Extract values of x that are greater than 10. 6. Use the RSiteSearch command in R to find the function which performs a spectral decomposition of a matrix. (Hint) RSiteSearch works only with a single word at a time. Once an initial word is found, an additional word may be added to the search. 7. Use help to determine what floor, trunc, round and ceiling do and how to use them. What do you think each would do to the numbers -3.7 and 3.8? 8. The orings data frame (in DAAG) gives data on the damage that had occurred in US space shuttle launches prior to the disastrous Challenger launch of January 28, 1986. Only observations in rows 1, 2, 4, 11, 13, and 18 were included in the pre-launch charts. (a) Create a new data frame by extracting these rows from orings (b) Plot total incidents against temperature for pre-launch and using all the data in side by side plots in a single frame. 9. IMPORTANT: Be sure to explain your code and results in R-notebook text blocks (rather than comments in R-code blocks).
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Other questions asked by students
StudyZin's Question Purchase
1 Answer
$0.99
(Save $1 )
One time Pay
- No Ads
- Answer to 1 Question
- Get free Zin AI - 50 Thousand Words per Month
Unlimited
$4.99*
(Save $5 )
Billed Monthly
- No Ads
- Answers to Unlimited Questions
- Get free Zin AI - 3 Million Words per Month
*First month only
Free
$0
- Get this answer for free!
- Sign up now to unlock the answer instantly
You can see the logs in the Dashboard.