ar notation to issue an error when referring to a non-existent
> variable inside the data frame?
>
> Thank you very much.
>
> Paulo Barata
>
> -
>
>
> ------ Original Message ---
> From: "Frans Marcelissen"
> To: &qu
Hi,
On Tue, Jul 17, 2012 at 10:40 AM, Paulo Barata
wrote:
>
> Dear Frans and Peter,
>
> Yes, the notation df[,'var'] is able to catch a non-existent
> variable var inside a data frame df. But the notation df$var
> isn't.
>
> So we have this situation, where two different notations, which
> (as fa
---
-- Original Message ---
From: "Frans Marcelissen"
To: "'Paulo Barata'" ,
Sent: Mon, 16 Jul 2012 14:25:21 +0200
Subject: RE: [R] variable (column) in a data frame
> Hoi Pauli,
> There is a difference between two ways of accessing co
--
Frans
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Namens Paulo Barata
Verzonden: zondag 15 juli 2012 16:31
Aan: r-help@r-project.org
Onderwerp: [R] variable (column) in a data frame
To the R help list,
When using a data fram
iginal Message ---
From: Peter Ehlers
To: Paulo Barata
Cc: "r-help@r-project.org", peter dalgaard
Sent: Sun, 15 Jul 2012 09:29:11 -0700
Subject: Re: [R] variable (column) in a data frame
On 2012-07-15 08:41, Paulo Barata wrote:
Dr. Dalgaard,
Thank you. But pre-checking with
,!df$a==4)
[1] FALSE
A.K.
- Original Message -
From: Paulo Barata
To: r-help@r-project.org
Cc:
Sent: Sunday, July 15, 2012 10:30 AM
Subject: [R] variable (column) in a data frame
To the R help list,
When using a data frame, there is no warning or error message
when I refer to a
Paulo Barata-3 wrote
>
> Dr. Dalgaard,
>
> Thank you. You are right, with() is able to catch
> spelling errors in the name of variables inside a data frame.
>
> But couldn't some error or warning be included in R when referring
> to a non-existent variable inside a data frame with the df$var
>
nt: Sun, 15 Jul 2012 18:14:22 +0200
Subject: Re: [R] variable (column) in a data frame
> On Jul 15, 2012, at 17:41 , Paulo Barata wrote:
>
> >
> > Dr. Dalgaard,
> >
> > Thank you. But pre-checking with is.null() or using with()
> > doesn't solve the pr
ank you once again.
Paulo Barata
-
-- Original Message ---
From: peter dalgaard
To: "Paulo Barata"
Sent: Sun, 15 Jul 2012 16:47:35 +0200
Subject: Re: [R] variable (column) in a data frame
On Jul 15, 2012, at 16:30 , Paulo Barata wrote:
To the R help
On Jul 15, 2012, at 17:41 , Paulo Barata wrote:
>
> Dr. Dalgaard,
>
> Thank you. But pre-checking with is.null() or using with()
> doesn't solve the problem of catching spelling mistakes
> in the name of a variable inside a data frame, when using
> the df$var notation often in a program.
>
>
o Barata
-
-- Original Message ---
From: peter dalgaard
To: "Paulo Barata"
Sent: Sun, 15 Jul 2012 16:47:35 +0200
Subject: Re: [R] variable (column) in a data frame
> On Jul 15, 2012, at 16:30 , Paulo Barata wrote:
>
> >
> > To the R help li
From: paulo.bar...@ensp.fiocruz.br
> Sent: Sun, 15 Jul 2012 11:30:37 -0300
> To: r-help@r-project.org
> Subject: [R] variable (column) in a data frame
>
>
> To the R help list,
>
> When using a data frame, there is no warning or error message
> when I refer to a non-existent va
To the R help list,
When using a data frame, there is no warning or error message
when I refer to a non-existent variable inside the data frame.
Example:
##--
a <- c(1,2,3)
b <- c(11,22,33)
df <- data.frame(a,b)
df
## correct: there is a column in
13 matches
Mail list logo