could not find function "summarise"

summarise(titanic_dataset, survival=sum(Survived)/nrow(titanic_dataset)*100)

Here's my code. Copy & paste from my teacher. What is wrong?

before using a function from a library in a new session, you must load the library, this can be done with either library() or require()
i.e.

library(tidyverse)

then your code that will use summarise

Yes, that it typed first.

did you not only type that, but also send it to the console first ?
what happens when you do

dplyr::summarise(titanic_dataset, survival=sum(Survived)/nrow(titanic_dataset)*100)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.