Re: [R] Help! What does this R command mean?

From: Michael <comtech.usa_at_gmail.com>
Date: Mon 30 Jan 2006 - 16:49:09 EST

After reading your pointers, I still don't understand that particular usage of ":":

btw, the data after read.table():

   Year V I D W G P N

1  1916 0.5168  1  1 0   2.229  4.252  3
2  1920 0.3612  1  0 1 -11.463 16.535  5
3  1924 0.4176 -1 -1 0  -3.872  5.161 10

On 1/29/06, Gabor Grothendieck <ggrothendieck@gmail.com> wrote:
>
> ?":"
> ?"["
>
> Also try
> ?"?"
>
> Also
> 1. read the "An Introduction to R" manual. On R Home page click on
> Manuals under Documentation in the left hand column.
> 2. go to:
> http://cran.r-project.org/other-docs.html
> and read your choice of documents.
> 3. print out this reference card and keep it handy:
> http://www.rpad.org/Rpad/R-refcard.pdf
>
> On 1/29/06, Michael <comtech.usa@gmail.com> wrote:
> > Hi all,
> >
> > R is so difficult. I am so desperate.
> >
> > What does the ":" mean in the following statement?
> >
> > What does the "[, -1]" mean?
> >
> > >
> > > # Leaps takes a design matrix as argument: throw away the intercept
> > > # column or leaps will complain
> > >
> > > X <- model.matrix(lm(V ~ I + D + W +G:I + P + N, election.table))[,-1]
> >
> > Thanks a lot!
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > 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
> >
>

        [[alternative HTML version deleted]]



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 Mon Jan 30 16:55:52 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:14 EST