Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Given a triangle with sides L1, L2, L3 , its area is calculated via the formula Area = sqrt(p * (p - L1) *

1. Given a triangle with sides L1, L2, L3, its area is calculated via the formula Area = sqrt(p * (p - L1) * (p - L2) * (p - L3)), where p = (L1 + L2 + L3) / 2. Write an R function called tri_area that outputs the area of a triangle given its sides, and calculate the area of a triangle with sides L1 = 3, L2 = 4, L3 = 5.

2. in R, we use square brackets [ ] to refer to specific elements of a vector. How would you look up the third element of vector v?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago