Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer hy giving the code for numbers 3 and 4. the program being used is r studio DATA TYPES and STRUCTURES 0. Download homework4.Rmd

please answer hy giving the code for numbers 3 and 4. the program being used is r studio image text in transcribed
DATA TYPES and STRUCTURES 0. Download homework4.Rmd notebook and employee.csv files from the course website your working directory. You will read employee.csv data later in Question 8. 1. Create a vector named country with the following 7 elements: USA, USA, USA, USA, France, Italy, Germany (Consider these values as the countries of 6 people) 2. Use class(country) to see the data type in this vector. What is the data type? 3. Create a logical vector citizen to indicate if the individual is a USA citizen based on the countries included in the vector country 4. Display the vector citizen to see if the entries are correct. (Hint: The first four entries must be TRUE, TRUE, TRUE, TRUE) 5. Use class(citizen) to see the data type in this vector. What is the data type? 6. Create a data frame (called df) containing two columns: country and citizen 7. Create a 2x3 matrix (call it mtr), enter the values as shown below, and display the matrix to see if the values are entered correctly. 12 13 128 READ DATA and DISPLAY (SELECT) SUBSET OF DATA 8. Read the dataset employee.csv in the workspace 9. Write the code to display the following rows/columns in the employee object (a) Data in the first 6 rows of 3 931 words Display Settings D.Focus 2

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

Database Support For Data Mining Applications Discovering Knowledge With Inductive Queries Lnai 2682

Authors: Rosa Meo ,Pier L. Lanzi ,Mika Klemettinen

2004th Edition

3540224793, 978-3540224792

More Books

Students also viewed these Databases questions

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago