Error saying Error in map x f argument x is missing with no default in R

0 votes
Error saying "Error in map(.x, .f, ...) : argument ".x" is missing, with no default" in R

This is my code:

url_base <- "https://cran.r-project.org/web/packages/available_packages_by_name.html"
map_df(, 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
Nov 21, 2018 in Data Analytics by Ali
• 11,360 points

edited Nov 21, 2018 by Ali 8,945 views

1 answer to this question.

0 votes

There is small mistake in your code. map_df() should have two parameters. number of iterations and the function. In your case number of iterations is missing. 

map_df(1:10, function(i))

something like this

answered Nov 21, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

+5 votes
0 answers
0 votes
0 answers

Error in xy.coords(x, y, xlabel, ylabel, log) : argument "x" is missing, with no default

Hi, my code is showing this, what's ...READ MORE

Sep 7, 2020 in Data Analytics by Nurdiana
• 120 points

recategorized Sep 7, 2020 by Gitika 1,956 views
0 votes
1 answer

Error in unique.default(x, nmax = nmax) : unique() applies only to vectors in R

This error is displayed if you used ...READ MORE

answered Oct 30, 2019 in Data Analytics by Cherukuri
• 33,030 points
13,940 views
0 votes
1 answer

Is there any way to check for missing packages and install them in R?

There are 2 options: Either you can use ...READ MORE

answered Apr 17, 2018 in Data Analytics by nirvana
• 3,130 points
874 views
+1 vote
1 answer
+1 vote
1 answer
0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,840 points
3,332 views
0 votes
1 answer

Error saying "Error in lag(x, 1) : unused argument (1)"

lag only works as expected with time-series ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
1,693 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