Skip to content
Prev 361951 / 398506 Next

Subscripting problem with is.na()

My statement "Using a single bracket '[' on a data.frame does the same 
as for matrices: you need to specify rows and columns" was not correct.


When you use a single bracket on a list with only one argument in 
between, then R extracts "elements", i.e. columns in the case of a 
data.frame. This explains your errors.

But it is possible to use a single bracket on a data.frame with 2 
arguments (rows, columns) separated by a comma, as with matrices. This 
is the solution you received.

Ivan


--
Ivan Calandra, PhD
Scientific Mediator
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calandra at univ-reims.fr
--
https://www.researchgate.net/profile/Ivan_Calandra
https://publons.com/author/705639/

Le 23/06/2016 ? 16:27, Ivan Calandra a ?crit :
Message-ID: <fd270e80-9f33-6cf9-0faa-3d9677f2babd@univ-reims.fr>
In-Reply-To: <16649_1466692168_576BF248_16649_462_1_5f1bbadc-5ebe-5244-bfa8-284e0e4ffa34@univ-reims.fr>