Re: [R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's?

2022-04-06 Thread Jeff Newmiller
>To: r-help@r-project.org; Ebert,Timothy Aaron ; Kelly Thompson >; r-help@r-project.org >Subject: Re: [R] What is the intended behavior, when subsetting using brackets >[ ], when the subset criterion has NA's? > >[External Email] > >Mmmm, ESP on the blink. > >WHAT error

Re: [R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's?

2022-04-06 Thread David Winsemius
T, NA, NA) my_subset_criteria Tim -Original Message- From: R-help On Behalf Of Kelly Thompson Sent: Wednesday, April 6, 2022 4:13 PM To: r-help@r-project.org Subject: [R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's? [External

Re: [R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's?

2022-04-06 Thread Ebert,Timothy Aaron
I get an error with this: my_subset_criteria <- c( F, F, T, NA, NA) my_subset_criteria Tim -Original Message- From: R-help On Behalf Of Kelly Thompson Sent: Wednesday, April 6, 2022 4:13 PM To: r-help@r-project.org Subject: [R] What is the intended behavior, when subsetting us

[R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's?

2022-04-06 Thread Kelly Thompson
I noticed that I get different results when subsetting using subset, compared to subsetting using "brackets" when the subset criteria have NA's. Here's an example #START OF EXAMPLE my_data <- 1:5 my_data my_subset_criteria <- c( F, F, T, NA, NA) my_subset_criteria #subsetting using subset