From simon.urbanek at r-project.org  Wed Nov 12 17:42:36 2008
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed, 12 Nov 2008 11:42:36 -0500
Subject: [Rd] what does negative indexing in a matrix mean?
In-Reply-To: <8D38CA497C4E964497B80E175EEB9081012836@MAILBOXES.cicbiogune.int>
References: <8D38CA497C4E964497B80E175EEB9081012836@MAILBOXES.cicbiogune.int>
Message-ID: <F07B5951-28FA-42CC-BD51-EC4A18D50ACE@r-project.org>


On Nov 12, 2008, at 11:28 , Itziar Frades Alzueta wrote:

> Hi,
>
> Does anyone know what the negative indexing of a matrix mean?
>
>

?`[`

          For '['-indexing only: 'i, j, ...' can be logical vectors,
           indicating elements/slices to select.  Such vectors are
           recycled if necessary to match the corresponding extent.  'i,
           j, ...' can also be negative integers, indicating
           elements/slices to leave out of the selection.

.. so in your case you're removing one of the predictors (and I don't  
think you really have a matrix there ...).

Cheers,
S



>
> I am using the RWeka and this evaluate classifier does not work on new
> data like this
>
>
>
> e <- evaluate_Weka_classifier(m1235,newdata=XW4, complexity =
> FALSE,class = FALSE)
>
>
>
> while it work with negative indexing:
>
>
>
> e <- evaluate_Weka_classifier(m1235,newdata=XW4[,-2], complexity =
> FALSE,class = FALSE)
>
>
>
> Although I do not understand what negative indexing of a matrix means,
> or whether it produces any transformation.
>
>
>
> Regards,
>
>
>
> Itziar Frades
>
>
>
>
>
>
>
> This e-mail is from CIC bioGUNE. The e-mail and any files  
> transmitted with it are confidential and intended solely for the use  
> of the individual or entity to whom they are addressed. Any  
> unauthorised dissemination or copying of this e-mail or its  
> attachments, and any use or disclosure of any information contained  
> in them, is strictly prohibited and may be illegal. If you have  
> received this e-mail in error, please notify or telephone + 34 944  
> 06 13 00 and delete it from your system.
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] what does negative indexing in a matrix mean?
Simon Urbanek