Error saying Error in map df 1 function i could not find function map df in R

+1 vote

I have the following code wrt web scraping using R

url_base <- "https://cran.r-project.org/web/packages/available_packages_by_name.html"
map_df(1:100, function(i){
                page <- read_html(sprintf(url_base,i))
                data.frame(IssueID = html_text(html_nodes(page,"h1")),
                       heading = html_text(html_nodes(page,"td")),
                       description = html_text(html_nodes(page,"td")))
}) -> packages

But I end up with the following error, idk why?

Error in map_df(1, function(i) { : could not find function "map_df"
Nov 21, 2018 in Data Analytics by Ali
• 11,360 points
6,226 views

1 answer to this question.

0 votes

Make sure you’ve installed the package purr and in case you’ve already installed it and still facing the same error then load that into the library using the following command

library(purr)
answered Nov 21, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

0 votes
1 answer

Error: could not find function ... in R

If you encounter an error stating "'some.function' ...READ MORE

answered Jun 22, 2023 in Data Analytics by anonymous
• 1,180 points
328 views
+3 votes
2 answers

Error: could not find function - R Programming

Yes, Just like @Maverik said, It happens ...READ MORE

answered Aug 23, 2019 in Data Analytics by anonymous
• 33,030 points
32,856 views
+1 vote
1 answer
0 votes
1 answer

Error saying "could not find function "read_html"" when trying to use read_html function

Hey @Ali, Execute the following two commands: install.packages(&l ...READ MORE

answered Nov 21, 2018 in Data Analytics by Maverick
• 10,840 points
3,920 views
+1 vote
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,840 points
2,318 views
+1 vote
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,118 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP