Re: [R] Sanity check in loading large dataframe

2021-08-09 Thread Bert Gunter
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 >

Re: [R] Sanity check in loading large dataframe

2021-08-08 Thread PIKAL 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

Re: [R] Sanity check in loading large dataframe

2021-08-06 Thread Bert Gunter
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

Re: [R] Sanity check in loading large dataframe

2021-08-06 Thread Luigi Marongiu
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 >

Re: [R] Sanity check in loading large dataframe

2021-08-06 Thread PIKAL Petr
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

Re: [R] Sanity check in loading large dataframe

2021-08-05 Thread Luigi Marongiu
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

Re: [R] Sanity check in loading large dataframe

2021-08-05 Thread Avi Gross via R-help
. -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

[R] Sanity check in loading large dataframe

2021-08-05 Thread Luigi Marongiu
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