[R] matrix construction

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Mar 26 11:42:43 CEST 2007


Have a look at ?cbind, ?rbind and ?matrix

C <- cbind(A, B)
C <- rbind(A, B)
C <- matrix(c(0:3, 0:3), ncol = 2)

Cheers,

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be 

Do not put your faith in what statistics say until you have carefully
considered what they do not say.  ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney

 

> -----Oorspronkelijk bericht-----
> Van: r-help-bounces op stat.math.ethz.ch 
> [mailto:r-help-bounces op stat.math.ethz.ch] Namens Schmitt, Corinna
> Verzonden: maandag 26 maart 2007 11:34
> Aan: r-help op stat.math.ethz.ch
> Onderwerp: [R] matrix construction
> 
> Hallo,
> 
> can anyone tell me how I can create a matrix in R? I have two 
> arrays A = c(0:3), B=c(0:3). C should be the matrix. I just 
> found the description that a matrix is just an array with two 
> substricpts. 
> 
> Thanks,
> 
> Corinna
> 
> ______________________________________________
> R-help op stat.math.ethz.ch 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.
>



More information about the R-help mailing list