How sapply simplifies the result in R

r

#1

I have created a vector in which I am trying to calculate mean of data in list so I tried both sapply and lapply and I want to know that I am getting the same result but my result are representing in different ways I want to how sapply formalized the data
for example

x<-list(1:10,b=rnorm(1,20),c=rnorm(100,5))
sapply(x,mean)
                  b         c 
 5.500000 19.704309  5.021585 
lapply(x,mean)
[[1]]
[1] 5.5

$b
[1] 19.70431

$c
[1] 5.021585

#2

from the manual

https://stat.ethz.ch/R-manual/R-devel/library/base/html/lapply.html

lapply returns a list of the same length as X, each element of which is the result of applying FUN to the corresponding element of X.

sapply is a user-friendly version and wrapper of lapply by default returning a vector,