Question: Let x = ( x 1 , x 2 , . . . , x 3 0 0 ) and y = ( y 1

Let x =(x1, x2,..., x300) and y =(y1, y2,..., y300) be two R vectors created as follows:
set.seed(1)
x <- sample(1:1000,300, replace=T)
y <- sample(1:1000,300, replace=T)
1. Using R code, create a function called inner_prod that will calculate
the inner product of two vectors
2. Create a new vector called my_vec by selecting the elements of x that are larger than 500

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!