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

Simon Blomberg blomsp at ozemail.com.au
Mon Jan 30 06:54:03 CET 2006


?formula

Michael wrote:
> 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 at 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 at 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 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
>>     
>
> 	[[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
>
>   


-- 
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Centre for Resource and Environmental Studies
The Australian National University
Canberra ACT 0200
Australia
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C




More information about the R-help mailing list