x<5,]
> xy
> 1 1a
> NA NA
> 3 3c
> 4 4d
> NA.1 NA
>
> > dat[which(x<5),]
> x y
> 1 1 a
> 3 3 c
> 4 4 d
>
> Both results are OK, but one has to consider this NA value propagation.
>
> Cheers
> Petr
>
n.
Cheers
Petr
From: Bert Gunter
Sent: Friday, August 6, 2021 1:29 PM
To: PIKAL Petr
Cc: Luigi Marongiu ; r-help
Subject: Re: [R] Sanity check in loading large dataframe
... but remove the which() and use logical indexing ... ;-)
Bert Gunter
"The trouble with having an open mind is th
cleaned.data <- data[, keep]
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help On Behalf Of Luigi Marongiu
> > Sent: Friday, August 6, 2021 7:34 AM
> > To: Duncan Murdoch
> > Cc: r-help
> > Subject: Re: [R] Sanity check in loading
keep <- which(colSums(is.na(data)) cleaned.data <- data[, keep]
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help On Behalf Of Luigi Marongiu
> > Sent: Friday, August 6, 2021 7:34 AM
> > To: Duncan Murdoch
> > Cc: r-help
>
rongiu
> Sent: Friday, August 6, 2021 7:34 AM
> To: Duncan Murdoch
> Cc: r-help
> Subject: Re: [R] Sanity check in loading large dataframe
>
> Ok, so nothing to worry about. Yet, are there other checks I can
implement?
> Thank you
>
> On Thu, 5 Aug 2021, 15:40 Duncan M
Ok, so nothing to worry about. Yet, are there other checks I can implement?
Thank you
On Thu, 5 Aug 2021, 15:40 Duncan Murdoch, wrote:
> On 05/08/2021 9:16 a.m., Luigi Marongiu wrote:
> > Hello,
> > I am using a large spreadsheet (over 600 variables).
> > I tried `str` to check the dimensions
.
-Original Message-
From: R-help On Behalf Of Luigi Marongiu
Sent: Thursday, August 5, 2021 9:16 AM
To: r-help
Subject: [R] Sanity check in loading large dataframe
Hello,
I am using a large spreadsheet (over 600 variables).
I tried `str` to check the dimensions of the spreadsheet and I got
Hello,
I am using a large spreadsheet (over 600 variables).
I tried `str` to check the dimensions of the spreadsheet and I got
```
> (str(df))
'data.frame': 302 obs. of 626 variables:
$ record_id : int 1 1 1 1 1 1 1 1 1 1 ...
$ v1_medicamento___aceta: int 1 NA NA NA NA
8 matches
Mail list logo