Assignment 1 - R programming Questions PDF

Title Assignment 1 - R programming Questions
Author Dixon Ah_Di
Course Programming Languages for Statistics
Institution 香港中文大學
Pages 3
File Size 170.6 KB
File Type PDF
Total Downloads 76
Total Views 147

Summary

R programming Questions...


Description

STAT2005ProgrammingLanguagesforStatistics Assignment1 Due:30September2020,5pm  1. Using rep() and seq() as needed to create the following vectors. (The use of c() functionisprohibitedinthisquestion.) (a)10 12 14 16 18 20 22 24 26 28 30 (b)1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 1(a). seq(10,30, by=2)  (b). rep(seq(1:5)+rep(0:4,each=5)) 2.SearchforanRfunctionthatsolvestherootsofpolynomialequations. (a)Findallrootsofthefollowingequationandsaveitasroots.

5x 5  4x 4  3x 3  2x 2  x  0. (b)Whatisthemodeofroots?

numeric/complex

(c)Useasinglelinecommandtosortthevaluesinrootsbyascendingorderofits imaginarypart. (Note:theimaginarypartofacomplexnumbera+biisb,where𝑖  √1.Youcanreadthe helpdocumentoftheorder()functionbyenteringhelp(order).) 

roots...


Similar Free PDFs