[R] Odp: column and row

Petr PIKAL petr.pikal at precheza.cz
Wed Jun 4 11:42:45 CEST 2008


Hi

use 
str(object)
to see what is a structure of object
then use standard selecting by [..., ...]

In your case you shall probably use extracting function

coef(fit1)[1,] 
for the first row and similarly for the second.

Regards
Petr
petr.pikal at precheza.cz
724008364, 581252140, 581252257


r-help-bounces at r-project.org napsal dne 04.06.2008 03:55:47:

> <-fit1$coefficients
> 
>                      y.control     y.low    y.high
> (Intercept)            19.628713 21.883999 20.023814
> log(1 + (age - 45)/10) -7.383725 -6.017342 -5.084431
> 
> here is my outcome,I need one vector say b1=first row without the 
intercept
> ,like:(19.628713, 21.883999, 20.023814)
> and  another b2=second row without the log(1 + (age - 45)/10),only the
> data,how to do this in R?
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.



More information about the R-help mailing list