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
• 10,450 points

edited Nov 20, 2018 by Ali 463 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,040 points

Related Questions In Data Analytics

+5 votes
0 answers
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,060 points
36 views
0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
93 views
0 votes
1 answer
0 votes
1 answer
0 votes
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,040 points
140 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,040 points
47 views