Re: [R] the quantile function and problems.

2022-07-14 Thread Ivan Krylov
В Thu, 14 Jul 2022 14:58:17 +0200 Uwe Brauer пишет: > What turns me crazy is that the way R, matlab and the JCR calculate > the quartiles gives different results. R by itself can give up to 9 slightly different results: sapply(1:9, function(type) quantile(1:267, 1:3/4, type = type)) # [,1]

Re: [R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread avi.e.gross
Tim, Your reply is reasonable if you want to read in EVERYTHING and use various nice features of the select() function in the dplyr package of the tidyverse that let you exclude a bunch of columns based on names starting or ending or containing various characters or not being of type integer and s

Re: [R] the quantile function and problems.

2022-07-14 Thread Bert Gunter
Read ?quantile carefully, please (and any references therein that you may wish to consult). You are estimating a continuous function by a discrete finite step function, and as the Help page (and further references) explains, there are many ways to do this. Bert On Thu, Jul 14, 2022 at 2:33 PM U

[R] the quantile function and problems.

2022-07-14 Thread Uwe Brauer
Hi I am very acquainted with R. I use it occasionally via the org-babel library of GNU emacs. I wanted to check the first, second and third quartiles of the scientific science index JCR https://support.clarivate.com/ScientificandAcademicResearch/s/article/Journal-Citation-Reports-Quartile-ra

Re: [R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Rui Barradas
Hello, You can use mice() argument predictorMatrix to tell mice() which variables/blocks are used when imputing which column. If the column vector is set to zeros, no column or block will used in its imputation. library(mice) predmat <- matrix(1L, ncol(nhanes2), ncol(nhanes2),

[R] running a scraping code in parallel...

2022-07-14 Thread akshay kulkarni
Dear members, please feel free to ignore this mail if you feel that it is not about Base R. I have the following web scraping code ( i have 500 stocks to iterate over): getFirmsDates <- function() { rD <- RsDriver(browser="chrome")

Re: [R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Ebert,Timothy Aaron
Maybe this is too simple but could you use the select() function from dplyr? Tim -Original Message- From: R-help On Behalf Of Bert Gunter Sent: Thursday, July 14, 2022 2:10 PM To: Ian McPhail Cc: R-help Subject: Re: [R] mice: selecting small subset of variables to impute from dataset w

Re: [R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Bert Gunter
If I understand your query correctly, you can use negative indexing to omit variables. See ?'[' for details. > dat <- data.frame (a = 1:3, b = letters[1:3], c = 4:6, d = letters[5:7]) > dat a b c d 1 1 a 4 e 2 2 b 5 f 3 3 c 6 g > dat[,-c(2,4)] a c 1 1 4 2 2 5 3 3 6 Of course you have to know

[R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Ian McPhail
Hello, I am looking for some advice on how to select subsets of variables for imputing when using the mice package. >From Van Buuren's original mice paper, I see that selecting variables to be 'skipped' in an imputation can be written as: ini <- mice(nhanes2, maxit = 0, print = FALSE) pred <- in

Re: [R] How to parse a really silly date with lubridate

2022-07-14 Thread avi.e.gross
To be clear, I take no credit for the rather extraordinary function cll shown below: mutate(Date = lubridate::dmy_hm(Date)) I would pretty much never have constructed such an interesting and rather unnecessary line of code. ALL the work is done within the parentheses: Date = lubridate::dmy_hm

Re: [R] aborting the execution of a function...

2022-07-14 Thread akshay kulkarni
Dear Bill, Many thanks .. Yours sincrely, AKSHAY M KULKARNI From: Bill Dunlap Sent: Thursday, July 14, 2022 1:28 AM To: akshay kulkarni Cc: R help Mailing list Subject: Re: [R] aborting the execution of a function... You could write a functi

Re: [R] aborting the execution of a function...

2022-07-14 Thread akshay kulkarni
Dear Avi, THanks a lot... Yours sincerely, AKSHAY M KULKARNI From: R-help on behalf of avi.e.gr...@gmail.com Sent: Thursday, July 14, 2022 1:39 AM To: 'R help Mailing list' Subject: Re: [R] aborting the execution of a function... Jeff & Akshay

[R] Thanks to this list ....

2022-07-14 Thread Rolf Turner
I set out to appeal to this list for help with disentangling a bewildering anomaly that was produced by some dynamically loaded Fortran code. In composing an email to explain the nature of the anomaly, I *FINALLY* spotted the loony! I had an expression in a nested do loop: j = npro + (r-1)