Browse Source

Set numeric types beforehand

master
Maxime Wack 6 years ago
parent
commit
f680c32710
2 changed files with 1 additions and 1 deletions
  1. +0
    -1
      app.R
  2. +1
    -0
      preprocess.R

+ 0
- 1
app.R View File

@@ -28,7 +28,6 @@ server <- function(input, output, session)

imdb %>%
filter(id == show_id) %>%
mutate_at(vars(season, episode, averageRating, numVotes), as.numeric) %>%
by(.$season, function(x){
fit <- lm(averageRating ~ episode, data = x)
x %>%


+ 1
- 0
preprocess.R View File

@@ -21,6 +21,7 @@ tvseries %>%
inner_join(ratings, by = c("eptconst" = "tconst")) %>%
inner_join(tvepisodes, by = c("eptconst" = "tconst")) %>%
select(-eptconst, episodeTitle = primaryTitle) %>%
mutate_at(vars(season, episode, averageRating, numVotes), as.numeric) %>%
arrange(seriesTitle, season, episode) ->
final



Loading…
Cancel
Save