15 etc. 1. What are the arguments for the Sequence Generation function seq() and give an example. Hint, use the methods you have learned to search for help in RStudio. 2. Use R as a calculator to compute the following values. a. 27(38-17) b. In(14') 436 с. 12 3. Create the following vectors in R and use R commands to answer the questions. а %3 [5, 10, 15, 20, ..., 160) b = (87, 86, 85, ..., 56)
15 etc. 1. What are the arguments for the Sequence Generation function seq() and give an example. Hint, use the methods you have learned to search for help in RStudio. 2. Use R as a calculator to compute the following values. a. 27(38-17) b. In(14') 436 с. 12 3. Create the following vectors in R and use R commands to answer the questions. а %3 [5, 10, 15, 20, ..., 160) b = (87, 86, 85, ..., 56)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question

Transcribed Image Text:а.
What is the 10th element of b?
b.
What are the 19th, 20th, and 21st elements of a?
с.
What are all of the elements of b which are less than 65?
d.
How many elements of a are greater than 50?
Is the length of a equal to the length of b?
е.
4. Use R to create the following two vectors and answer the questions below using R.
v_1 = (TRUE, TRUE, TRUE, FALSE, FALSE)
v_2 = (TRUE, FALSE, FALSE, TRUE, FALSE)
Add v_1 to v_2 and assign it
a new variable called v_3. What is the result?
a.
b.
What is data type of v 3 and why is this the case?
C.
Coerce v_1 and v_2 to character type and output the result.
d.
What happens now when adding v_1 to v_2? Explain your result.
How can you add v_1 and v_2 in their current form? Hint: refer to the Base R Cheatsheet
for help.
е.
5. Calculate the monthly loan payments given the following variables:
The principal amount, L, is $1,500
The interest rate, i, is 1%
The number of payments, n, is 10
The formula for calculating monthly payment, M, is:
M = L* (i / (1- (1 + i)^-n))
а.
Create objects for L, i, and n.
b.
Calculate M and store it in a new object rounded to 2 decimal places. Output your result.
*Exercise 5 taken from FAO-Global Soil Partnership Training onDigital Soil Organic Carbon Mapping, 20-24 January 2018, Yusuf YIGINI,
PhD -FAO, Land and Water Division (CBL) & Guillermo Federico Olmedo, PhD - FAO, Land and Water Division (CBL)

Transcribed Image Text:HW2b: R Exercises 1
Complete R Swirl 2 first! It will help you in this assignment!
Instructions: Write one R script title HW26.R that contains your answers to problems 1- 5. At the top of
the script write your name in a comment. Label each problem number using a comment and then type the
code that solves that problem. Here's an example of the script format (where you should fill in the R code to
solve each problem):
1
# Your Name
# Assignment
3 , # Thu Feb 03 07:39:07 2022
2
4
5
# 1.
6
7
type the R commands
solve problem 1
9.
# 2.
10
11
type the R commands to solve problem 2
12
13
# 3.
|14
15
etc.
1. What are the arguments for the Sequence Generation function seq() and give an example. Hint, use
the methods you have learned to search for help in RStudio.
2. Use R as a calculator to compute the following values.
а.
27(38-17)
b.
In(147)
436
V
С.
12
3. Create the following vectors in R and use R commands to answer the questions.
а 3 (5, 10, 15, 20, ..., 160)
b = (87, 86, 85,..., 56)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education