[R] cbind, row names
Henrique Dallazuanna
wwwhsd at gmail.com
Fri Jan 29 12:21:29 CET 2010
This gives what you want:
rbind.data.frame(
x=cbind(N=length(x), M=mean(x), SD=sd(x)),
y=cbind(N=length(y), M=mean(y), SD=sd(y))
)
On Fri, Jan 29, 2010 at 8:49 AM, <soeren.vogel at eawag.ch> wrote:
> Hello,
>
> I read the help as well as the examples, but I can not figure out why the
> following code does not produce the *given* row names, "x" and "y":
>
> x <- 1:20
> y <- 21:40
> rbind(
> x=cbind(N=length(x), M=mean(x), SD=sd(x)),
> y=cbind(N=length(y), M=mean(y), SD=sd(y))
> )
>
> Could you please help?
>
> Thank you
>
> Sören
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
More information about the R-help
mailing list