i have a list of movies and List of workers like directors and players for each film. i need to show a list of the movies and the number of workers to each movie with the help of table and dataframe.
What the result should look like
but when i make the table to director and onther table to workers and want to make dataframe from them it gives me an error because there is a different amount of lines because they don't add to the table movies without workers to the workers table or and the same with director.
any help please? thank you,
numDirectors <- table(imdb.players[imdb.players$role == "Director",]$id)
numWriter <- table(imdb.players[imdb.players$role == "Writer",]$id)
numall.df <- data.frame(numDirectors,numWriter)