0

Following is my R code.

data <-  read.csv(file = "vgsales.csv", header = TRUE, sep = ",")
data1 = group_by(data, Genre)
summarize(data1, mean(NA_Sales)

The last line generates the following error

Error in check_dots_empty(action = warn) : 
  unused argument (action = warn)

I've tried numerous solutions on the stackoverflow but none worked. However, we I changed my code to the following,

data <-  read.csv(file = "vgsales.csv", header = TRUE, sep = ",")
data1 = group_by(data, Genre)
x <- summarize(data1, mean(NA_Sales)

..it worked but when I print x, i again get the same error.

Can someone help?

Fahad
  • 1
  • 1
    there shuld be a closing bracket for `)` – akrun Apr 20 '21 at 23:39
  • 1
    What packages do you have loaded? Does `dplyr::summarize(data1, mean(NA_Sales))` work? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Apr 21 '21 at 00:32
  • your code is missing a closing parenthesis ,as in `... mean(NA_Sales))` – GuedesBF Apr 21 '21 at 01:51

0 Answers0