The exercise 1: using vectors and objects.
Provide in the plain text R commands that finds/solves the following:
- Create an integer variable e holding the value 42! Check the object class of e with class()!
- Convert e to the character data type with as.character()! Check the object class again!
- Create a character vector friends with four names from your circle of friends or acquaintances!
- Index the second element from the vector friends!
- Replace the first element of the vector friends with “Isolde” and check the updated vector again!
- Create a vector v1 from the following elements 1, “Hello”, 2, “World” ! Check the object class!
- Create a vector v2 with numerical values (only integers) ranging from 4 to 10!
- Index the first three elements from v2!
- Index all elements of v2 except the second element and save the result as v2.subset!
- Use the length() function to find out the length of v2.subset (= the number of elements in the vector)!
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
