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 20, 2018 in Data Analytics by Ali
• 11,270 points

edited Nov 20, 2018 by Ali 3,282 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 20, 2018 by Maverick
• 10,820 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 in Data Analytics by Nurdiana
• 120 points

recategorized Sep 7 by Gitika 67 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
• 32,490 points
2,844 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,120 points
151 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,820 points
840 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,820 points
577 views