hello,
I wanna print something like this
Class Levels Values
Id_TrT1 1 2
Id_Geno 7 64208 64209 64210 64211 64212 64213
64214
Id_Rep 2 12
Is it possible?
I have some problem I think taht I should use data.frame with matrix but I'm
not sure and perhaps it's false
___________________________________________________________________________
[[alternative HTML version deleted]]
how about: ?str ever considered reading an introductory text? find some here: http://cran.r-project.org/other-docs.html Stefan elyakhlifi mustapha wrote:> hello, > I wanna print something like this > > Class Levels Values > Id_TrT1 1 2 > Id_Geno 7 64208 64209 64210 64211 64212 64213 64214 > Id_Rep 2 12 > > Is it possible? > I have some problem I think taht I should use data.frame with matrix but I'm not sure and perhaps it's false >
You can build the data frame with:
dat <- data.frame(Class=I("Id_TrT1"), Levels=I("1"),
Values=I("2"))
new.info <- c(Class="Id_Geno", Levels="7" ,
Values="64208 64209 64210 64211 64212 64213 64214")
dat <- rbind(dat, new.info)
dat
new.info <- c(Class=" Id_Rep ", Levels="2" ,
Values="12")
dat <- rbind(dat, new.info)
dat
It works. The R console result can be seen in the attachment.
CU, Corinna
-----Urspr?ngliche Nachricht-----
Von: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at
stat.math.ethz.ch] Im Auftrag von elyakhlifi mustapha
Gesendet: Montag, 23. April 2007 16:02
An: R-help at stat.math.ethz.ch
Betreff: [R] data frame
hello,
I wanna print something like this
Class Levels Values
Id_TrT1 1 2
Id_Geno 7 64208 64209 64210 64211 64212 64213
64214
Id_Rep 2 12
Is it possible?
I have some problem I think taht I should use data.frame with matrix but I'm
not sure and perhaps it's false
___________________________________________________________________________
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
Hallo
You can build the data frame with:
dat <- data.frame(Class=I("Id_TrT1"), Levels=I("1"),
Values=I("2"))
new.info <- c(Class="Id_Geno", Levels="7" ,
Values="64208 64209 64210 64211 64212 64213 64214")
dat <- rbind(dat, new.info)
dat
new.info <- c(Class=" Id_Rep ", Levels="2" ,
Values="12")
dat <- rbind(dat, new.info)
dat
It works. The R console result can be seen in the attachment.
CU, Corinna
-----Urspr?ngliche Nachricht-----
Von: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at
stat.math.ethz.ch] Im Auftrag von elyakhlifi mustapha
Gesendet: Montag, 23. April 2007 16:02
An: R-help at stat.math.ethz.ch
Betreff: [R] data frame
hello,
I wanna print something like this
Class Levels Values
Id_TrT1 1 2
Id_Geno 7 64208 64209 64210 64211 64212 64213
64214
Id_Rep 2 12
Is it possible?
I have some problem I think taht I should use data.frame with matrix but I'm
not sure and perhaps it's false
___________________________________________________________________________
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
Its not usual to represent structures in this form in R but you can do it if you really want: data.frame(A = letters[1:3], B = 1:3, C = I(list(2, 1:6, 9))) Note the I (capital i) to make sure the list gets passed in asis. On 4/23/07, elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:> hello, > I wanna print something like this > > Class Levels Values > Id_TrT1 1 2 > Id_Geno 7 64208 64209 64210 64211 64212 64213 64214 > Id_Rep 2 12 > > Is it possible? > I have some problem I think taht I should use data.frame with matrix but I'm not sure and perhaps it's false > > > > ___________________________________________________________________________ > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >