Programming > Quiz > Assignment No 1. Introduction To R | Download for quality grades | (All)
1.Create a vector with 10 numbers (3, 12, 6, -5, 0, 8, 15, 1, -10, 7) and assign it to x. Code x <- c(3,12,6,-5,0,-8,15,1,-10,7) Output 2.What is the data type of x? How can you find out? Code Cla... ss(x) Output 3.Subtract 5 from the 2nd, 4th, 6th, etc. element in x. Code x <- x – c(0,5) This study source was downloaded by 100000857952895 from CourseHero.com on 01-24-2023 00:32:49 GMT -06:00 https://www.coursehero.com/file/174566368/Assignment-No-1docx/Output 4.Compute the sum and the average for x. Code sum(x) mean(x) Output 5.Reverse the order of the elements in x. Code x <- rev(x) This study source was downloaded by 100000857952895 from CourseHero.com on 01-24-2023 00:32:49 GMT -06:00 https://www.coursehero.com/file/174566368/Assignment-No-1docx/Output 6.Find out which numbers in x are negative. Code which (x <0) Output [Show More]
Last updated: 2 years ago
Preview 1 out of 6 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jan 25, 2023
Number of pages
6
Written in
This document has been written for:
Uploaded
Jan 25, 2023
Downloads
0
Views
39
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·