Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

mainly need the code for 4-7 Tasks: Please write an R script that performs the following operations in the order listed. At the beginning of

mainly need the code for 4-7 image text in transcribed
Tasks: Please write an R script that performs the following operations in the order listed. At the beginning of each task, write a comment marking the task number. Name the file as: lab2-.R 1. Create a vector with 10 numeric values using the colon operator. Coerce the numeric data to integer. Check the output and data type both before and after the coercion. 2. Create a vector with 100 numeric values starting from 10 , with each value equal to the previous value +8. Check output. 3. Create a vector with at least 50 data elements repeating 6 different words of your choice. Check output. 4. Create a matrix with 5 rows and 4 columns. Coerce the matrix to data frame. Check the output and data type both before and after the coercion. 5. Create a data| frame with 3 columns and 20 rows. The first column should contain 4 different values from 1 to 4 . Check output. Define the first column/variable as a factor with 4 levels. Check output. Create labels for each level of the factor. Check output. 6. Export the data frame your created in task 5 to a txt file titled "export.txt". Import "export.txt" to a data frame using the R built-in function. 7. Export the data frame your created in task 5 to a csv file titled "export.csv". Import "export.csv" to a data frame using the R built-in function

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_2

Step: 3

blur-text-image_3

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 Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

e. What do you know about your ethnic background?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago