Computer Science, asked by jason3068, 11 months ago

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.

Answers

Answered by adityabiswas4u
1

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:

Similar questions