Re: [R] correct syntax

From: venomousanimal <venomousanimal_at_web.de>
Date: Thu 29 Sep 2005 - 07:26:54 EST

Stephen Choularton schrieb:

>Hi
>
>I am trying to produce a little table like this:
>
>0 1
>0 601 408
>1 290 2655
>
>but I cannot get the syntax right.
>
>Can anyone help.
>
>Stephen
>
>
>

 > vec1= c(0,0,1)
 > vec2= c(NA,601,290)
 > vec3= c(1,408,2655)
 > table = as.table(cbind(vec1,vec2,vec3))
 > table
  vec1 vec2 vec3
A    0         1

B 0 601 408
C 1 290 2655

Greetz, Sonja



R-help@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 Received on Thu Sep 29 07:33:55 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 17:52:58 EST