Factor and Data Frame in R language | R Programming Solved Assignment

Assignment 6: Factor and Data Frame in R language


Assignment 6: Factor and Data Frame in R language


1. Write a R program to find the levels of factor of a given vector.

Answer : 



2. Write a R program to create a data frame from four given vectors.

Answer :


3. Write a R program to count the number of NA values in a data frame column.

Answer :


SET A:

1. Write a R program to change the first level of a factor with another level of a given factor.

Answer :


2. Write a R program to create a data frame from four given vectors and display the structure and statistical summary of a data frame.

Answer ;


3. Write a R program to display second row using row index and third column using column name of a data frame.

Answer :


4. Write a R program to create a data frame using two given vectors and display the duplicated elements and unique rows of the said data frame.

Answer :


5. Write a R program to call the (built-in) dataset airquality. Remove the variables 'Solar.R' and 'Wind' and display the data frame.

Answer :


SET B:

1. Write an R program to concatenate two given factor in a single factor and display in descending order.

Answer :


2. Write a R program to extract the five of the levels of factor created from a random sample from the LETTERS.

Answer : 


3. Write a R program to compare two data frames to find the row(s) in first data frame that are not present in second data frame.

Answer :


4. Write a R program to create a data frame from four given vectors and perform the following

Answer :


a. add a new column in a given data frame

Answer :


b. add new row to data frame.

Answer :


c. drop specific column by name from a given data frame.

Answer :


d. drop row by number from a given data frame.

Answer:


5. Write a R program to create a data frame from four given vectors and perform the following

Answer :


a. Extract 3rd and 5th rows with 1st and 3rd columns from a given data frame.

Answer :


b. Sort and display given data frame by specific column.

Answer :


SET C:

1. Write a R program to create inner, outer, left, right join(merge) from given two data frames.

Answer :


2. Write a R program to save the information of a data frame in a file and display the information of the file.

Answer :


Factor and Data Frame in R language | R Programming Solved Assignment Factor and Data Frame in R language  | R Programming Solved Assignment Reviewed by technical_saurabh on February 23, 2021 Rating: 5

No comments:

Powered by Blogger.