1.

Write r code using data "imdb_data" to a. Load csv in r by skipping second row. b. Extract the unique genres and its count and store in data frame with index key.

Answer»

a).FIRST, I have cleared the ENVIRONMENT using code in R: rm(list = ls()). Then, I set my directory using code: settled("D:/disorder/Predictive analysis using R and Python/Analytics Basics/directory (R PROGRAMMING)"),where the csv FILE “IMDB_data” was present. I have used the following codes to remove the 2ndcolumn entries. – IMDB_data=read.csv("IMDB_data.csv", header=TRUE)[-2,]b). df =length(unique(IMDB_data$Genre)) - 249c). IMDB_data=as.numeric(IMDB_data)d). IMDB_data=IMDB_data[ORDER(IMDB_data$Genre),]e). x = (as.numeric (IMDB_data$imdbRating))^ 2; y =(as.numeric (IMDB_data$imdbVotes))^ 2; IMDB_data$Square_Diff = with(IMDB_data, (x-y)Explanation:



Discussion

No Comment Found