Question: R script Create a vector with 1 0 numeric values using the colon operator. Coerce the numeric data to integer. Check the output and data

R script 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.
Create a vector with 100 numeric values starting from 10, with each value equal to the previous value +8. Check output.
Create a vector with at least 50 data elements repeating 6 different words of your choice. Check output.
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.
Create a data frame named 'student'Table' with 5 columns and at least 10 rows. Each column should contain appropriate data type that fits the column name.
a. The first column is called 'student ID'.
b. The second column is 'firstiName'.
c. The third column is TastiName'.
d. The fourth column is a factor variable called 'major'. It should contain 3 different values corresponding to: 'CS','IS','IT'(labels).
e. The fifth column is 'GPA'.
f. Print the data frame.
Export the 'studentTable' data frame you created in task 5 to a txt file titled "student table.txt". Import "student table.txt" to a data frame called 'readiXX" using the R built-in function.
Export the 'studentTable' data frame you created in task 5 to a csv file titled "student table.csv", Import "student tabel.csv" to a data frame called readCSV using the R builtin function.
R script Create a vector with 1 0 numeric values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!