Page 1 of 1

5. Write R code that will create a vector object named y that contains the values 1...., 10. Using the attr function cre

Posted: Sun Sep 05, 2021 5:13 pm
by answerhappygod
5 Write R Code That Will Create A Vector Object Named Y That Contains The Values 1 10 Using The Attr Function Cre 1
5 Write R Code That Will Create A Vector Object Named Y That Contains The Values 1 10 Using The Attr Function Cre 1 (48.5 KiB) Viewed 90 times
5. Write R code that will create a vector object named y that contains the values 1...., 10. Using the attr function create two attributes for the vector. The first attribute should be called emotion and should be assigned the value "happy". The second attribute should be called outlook and should be assigned the value "good". Use the str function to demonstrate that the attributes were added correctly. Repeat this exercise using the attributes and structure functions instead of the attr function. Use the str function to demonstrate that the attributes were added correctly in each case. 6. What are the attributes of the vector x if it is created using the command x