From 64bd009271158eb4e763e28f660adbacd56ed609 Mon Sep 17 00:00:00 2001 From: Maxime Wack Date: Thu, 13 Jan 2022 17:24:05 +0100 Subject: [PATCH] Remove NA shows only if they exist\n\nIn previous versions of the db, some shows had no title. This is not the case anymore, and all shows were removed as a consequence. --- app.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.R b/app.R index 2323ed2..302539f 100644 --- a/app.R +++ b/app.R @@ -11,7 +11,8 @@ imdb %>% shows$id %>% setNames(shows$title) -> shows -shows <- shows[- (names(shows) %>% is.na %>% which)] +if (shows %>% names %>% is.na %>% which %>% length > 0) + shows <- shows[- (names(shows) %>% is.na %>% which)] ui <- fluidPage( inputPanel(width = "20%", height = "100%",