On 2/8/2007 1:09 PM, Duncan Murdoch wrote:
> On 2/8/2007 12:30 PM, Jason Horn wrote:
>> Sorry to ask such a simple question, but I can't find the answer after
>> extensive searching the docs and the web.
>>
>> How do you remove a component from a list? For example say you have:
>>
>> lst<-c(5,6
Jason Horn wrote:
> Sorry to ask such a simple question, but I can't find the answer after
> extensive searching the docs and the web.
>
> How do you remove a component from a list? For example say you have:
>
> lst<-c(5,6,7,8,9)
>
> How do you remove, for example, the third component in the
On 2/8/2007 12:30 PM, Jason Horn wrote:
> Sorry to ask such a simple question, but I can't find the answer after
> extensive searching the docs and the web.
>
> How do you remove a component from a list? For example say you have:
>
> lst<-c(5,6,7,8,9)
In R jargon, that's a vector, not a list.
First:
lst <- lst[-3]
Second:
frame<- frame[-2,]
On 08/02/07, Jason Horn <[EMAIL PROTECTED]> wrote:
>
> Sorry to ask such a simple question, but I can't find the answer after
> extensive searching the docs and the web.
>
> How do you remove a component from a list? For example say you have:
>
>
Hi Jason,
On 2/8/07, Jason Horn <[EMAIL PROTECTED]> wrote:
> Sorry to ask such a simple question, but I can't find the answer after
> extensive searching the docs and the web.
>
> How do you remove a component from a list? For example say you have:
You use the - operator for both your vector an
The first example you provide is a vector, not a list. You can
remove the third element with:
> lst[-3]
[1] 5 6 8 9
The same thing works for rows of data frames:
> frame[-3,]
lst1 lst2
116
227
449
55 10
>
>
> On 08/02/07, Jason Horn <[EMAIL PROTECTED]>