0

The below code worked few hours ago without changing anything it shows error of 'unused arguments'

model_gbm <- finaldata %>%
  nest(-frqGroup) %>% 
  mutate(
    fit = map(data, ~ train(Eng_Class ~ ., data = .x,
                            method = "gbm",
                            trControl = control,
                            verbose = TRUE))) 

Tried updating dplyr as well but same error.

mnist
  • 6,571
  • 1
  • 18
  • 41
  • Please consult [How to make a great reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). In particular we need to know what packages are loaded, what `finaldata` looks like and the complete error message. My guess is that you have since loaded another library which has a function with the same name as one of the functions you were using (nest, mutate, map or train) and it conflicts. – neilfws May 06 '20 at 01:06

1 Answers1

0

It might be due to the conflicts between the loaded packages. I would recommend you declare your preference with the assignment as

packagename::functionNames

I have added for dplyr, please add for map and train functions too.

model_gbm=finaldata %>%
  dplyr::nest(-frqGroup) %>% 
  dplyr::mutate(
    fit = map(data, ~ train(Eng_Class~.,data=.x,
                            method="gbm",
                            trControl=control,
                            verbose=TRUE))) 

rj-nirbhay
  • 649
  • 7
  • 23