You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
an error occurs when applying tidyfeed() to the following feed: "https://feed.ksta.de/feed/rss/index.rss". The reason seems to be that in rss_parse() the creation of the object "entries" as a tibble is done such that item_title and item_description need to have the same number of entries. However, this does not seem to be the case for all feeds. The problem is the transformation via unlist(), which does not preserve the length of the original list object created by map(). A possible solution is to pipe the item_description (or any other) object at this stage into the following function:
replace_null <- function(x){
x <- purrr::map(x, ~ replace(.x, is.null(.x), NA_character_))
purrr::map(x, ~ if(is.list(.x)) replace_null(.x) else .x)
}
But there might be a more efficient way!
The text was updated successfully, but these errors were encountered:
Hi,
an error occurs when applying tidyfeed() to the following feed: "https://feed.ksta.de/feed/rss/index.rss". The reason seems to be that in rss_parse() the creation of the object "entries" as a tibble is done such that item_title and item_description need to have the same number of entries. However, this does not seem to be the case for all feeds. The problem is the transformation via unlist(), which does not preserve the length of the original list object created by map(). A possible solution is to pipe the item_description (or any other) object at this stage into the following function:
replace_null <- function(x){
x <- purrr::map(x, ~ replace(.x, is.null(.x), NA_character_))
purrr::map(x, ~ if(is.list(.x)) replace_null(.x) else .x)
}
But there might be a more efficient way!
The text was updated successfully, but these errors were encountered: