Hey everyone I'm new to Rstudio and I'm taking a class and is stuck trying to make a function that inputs a vector then I have to run some standard test like mean, median, mode and having that come out with a vector as well with the name so mean= 5 and etc.

part2_function <- function(x){

length(x)

sum( is.na(x))

mean(x)

median(x)

max(x)

min(x)

sd(x)

return(x)

}

this is what I have kinda put together so far but super lost still.

Thanks!