Thanks Joshua and Berton for your pointers. Yes it was typo as I wanted to mean
to select few columns.
-Original Message-
From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
Sent: 22 July 2011 22:02
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] Indexing problem with
See the "drop" argument (and link) in ?"["
-- Bert
On Fri, Jul 22, 2011 at 9:46 AM, Bogaso Christofer
wrote:
> Dear all, assume I have a matrix with just 1 row. Now suppose I want to
> fetch 1st few rows from that matrix, however resulting object becomes
> vector. Here is 1 such example:
>
>
>
On Fri, Jul 22, 2011 at 9:46 AM, Bogaso Christofer
wrote:
> Dear all, assume I have a matrix with just 1 row. Now suppose I want to
> fetch 1st few rows from that matrix, however resulting object becomes
I'm assuming you mean the first few columns. The place to look is
?"[" where you would find
Dear all, assume I have a matrix with just 1 row. Now suppose I want to
fetch 1st few rows from that matrix, however resulting object becomes
vector. Here is 1 such example:
> matrix(1:5, 1)
[,1] [,2] [,3] [,4] [,5]
[1,]12345
>
> matrix(1:5, 1)[,-1]
[1] 2 3 4 5
t]
> Sent: Friday, May 21, 2010 4:00 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] indexing problem
>
>
> On May 21, 2010, at 9:19 AM, arnaud Gaboury wrote:
>
> > Dear group,
> >
> > Here is my environment :
> >
> >
ip about "select" not to use as an object name
> -Original Message-
> From: David Winsemius [mailto:dwinsem...@comcast.net]
> Sent: Friday, May 21, 2010 4:00 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] indexing problem
>
>
> On Ma
On May 21, 2010, at 9:19 AM, arnaud Gaboury wrote:
Dear group,
Here is my environment :
ls()
[1] "l" "PLglobal" "Pos100415" "Pos100416" "Pos100419"
"Pos100420" "position" "select" "Trad100415" "Trad100416"
"Trad100419" "Trad100420" "trade" "y"
With objects :
l
[1
Dear group,
Here is my environment :
> ls()
[1] "l" "PLglobal" "Pos100415" "Pos100416" "Pos100419"
"Pos100420" "position" "select" "Trad100415" "Trad100416"
"Trad100419" "Trad100420" "trade" "y"
With objects :
> l
[1] "100415" "100416" "100419" "100420" "100421" "10
8 matches
Mail list logo