Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

RStudio File Edit ) 65% D Fri 9:33 PM = Code View Plots Session Build Debug Profile Tools Window Help RStudio Gato filc function -

image text in transcribedimage text in transcribed

RStudio File Edit ) 65% D Fri 9:33 PM = Code View Plots Session Build Debug Profile Tools Window Help RStudio Gato filc function - Addins - 3. Project (None) - Primality.Rr >> - Run List - 2. nt 1-2.md x assignment2.RmdX assignment2-2.Rdx ActivitiesOnProbabilities, Rmx 9 Knit Insert - 28 29 2 2. Use a for loop, and the built in function "sort", to do the following: 30 31 loop over the elements of x-C(16,-9.9,4,-1,0) 32 33 if the element x[i] is positive, print x[i] and the square root of x[i] 34 or else if X[1] is negative, print("x[1] is negative) 35 36 {r} 37 X-C(16, 9,9,4,-1,0) 38 #for .. 39 # if (condition ) [print(c(someting, sartCsomething) 43 # } else 41 # {print message here}} 42 } Environment History Connections Tutorial TH - Import Dataset - Global Environment Data M1 num [1:3, 1:4] 5 8 7 8 2 7 9 4 2 1 ... M2 num [1:4, 1:3] 5 1 4 7 8 8 & 292 ... Mprod num [1:3, 1:3] 76 114 113 178 128 146 133 176 172 Values fx 0.135335283236613 Gq 2.08791208791209 i 3L j 10L k 6 Files Plots Packages Help Viewer 13 - Home. Find in upic RR Resources RStudio Learning R Online CRAN Task Views Ron Stack Overflow Getting Help with R 45 Your output should be equivalent to: 46 I 47 16 4 48 49 "x[i] is negative 50 51 93 52 53 4 2 54 55 "x[i] is negative" 56 57 58 59 wa 61 (+5 points) 62 63 64 3. Use a "ror" loop lo i Lerole over the elements of a vector x, and increment a counter 65 nodd when the element of x is odd. Then print the number of even and odd elements of x. 17:5 Top Level: R Markdown: RStudio IDE Support RStudio Community Forum RStudio Cheat Sheets RStudio Tip of the Day RStudio Packages RStudio Products Manuals An Introduction to R Writing R Extensions R Data Import/Export The R Language Definition R Installation and Administration R Internals Reference Packages Search Engine & Keywords Console GO Lliccalled Mstavil 5 P W T Brid RStudio File Edit ) 65% D Fri 9:33 PM = Code View Plots Session Build Debug Profile Tools Window Help RStudio Gato filc function - Addins - 3. Project (None) - Primality.Rr >> - Run List - 2. nt 1-2.md x assignment2.RmdX assignment2-2.Rdx ActivitiesOnProbabilities, Rmx 9 Knit Insert - 28 29 2 2. Use a for loop, and the built in function "sort", to do the following: 30 31 loop over the elements of x-C(16,-9.9,4,-1,0) 32 33 if the element x[i] is positive, print x[i] and the square root of x[i] 34 or else if X[1] is negative, print("x[1] is negative) 35 36 {r} 37 X-C(16, 9,9,4,-1,0) 38 #for .. 39 # if (condition ) [print(c(someting, sartCsomething) 43 # } else 41 # {print message here}} 42 } Environment History Connections Tutorial TH - Import Dataset - Global Environment Data M1 num [1:3, 1:4] 5 8 7 8 2 7 9 4 2 1 ... M2 num [1:4, 1:3] 5 1 4 7 8 8 & 292 ... Mprod num [1:3, 1:3] 76 114 113 178 128 146 133 176 172 Values fx 0.135335283236613 Gq 2.08791208791209 i 3L j 10L k 6 Files Plots Packages Help Viewer 13 - Home. Find in upic RR Resources RStudio Learning R Online CRAN Task Views Ron Stack Overflow Getting Help with R 45 Your output should be equivalent to: 46 I 47 16 4 48 49 "x[i] is negative 50 51 93 52 53 4 2 54 55 "x[i] is negative" 56 57 58 59 wa 61 (+5 points) 62 63 64 3. Use a "ror" loop lo i Lerole over the elements of a vector x, and increment a counter 65 nodd when the element of x is odd. Then print the number of even and odd elements of x. 17:5 Top Level: R Markdown: RStudio IDE Support RStudio Community Forum RStudio Cheat Sheets RStudio Tip of the Day RStudio Packages RStudio Products Manuals An Introduction to R Writing R Extensions R Data Import/Export The R Language Definition R Installation and Administration R Internals Reference Packages Search Engine & Keywords Console GO Lliccalled Mstavil 5 P W T Brid

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

Step: 3

blur-text-image

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

Why should a business be socially responsible?

Answered: 1 week ago

Question

Discuss the general principles of management given by Henri Fayol

Answered: 1 week ago

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago