Re: [R] ncol() vs. length() on data.frames

2020-04-06 Thread Hervé Pagès
Hi Ivan, On 3/31/20 06:44, Ivan Calandra wrote: That's exactly why I was asking if it really is equivalent and if there are issues using one function or the other Not that I know. It's mostly a matter of taste and code readability. Either use the 2D interface: ncol(df), colnames(df), df[

[R] Quantitative Methods Workshops in May 2020

2020-04-06 Thread Scott Colwell
FORWARDED – The following message has been forwarded and is not related to the University of Guelph. Apologies for the cross-posting. Good morning everyone. We sincerely hope you are all keeping safe and healthy while we all endure this pandemic. As a result of the restrictions on public

[R] correlated metrics using AutoSpearman

2020-04-06 Thread Neha gupta
Hello I am using feature selection using AutoSpearman but I have no idea what to do after the 'plotVarClus' function, which is just a graph and red bars are going out of the input metrics. My question is what is the next step to perform the feature selection (exclude correlated metrics). I used

Re: [R] nearest lower and higher integers to a multiple of another integer

2020-04-06 Thread Stefano Sofia
Thank you very much. Stefano (oo) --oOO--( )--OOo Stefano Sofia PhD Civil Protection - Marche Region Meteo Section Snow Section Via del Colle Ameno 5 60126 Torrette di Ancona, Ancona Uff: 071 806 7743 E-mail: stefano.so...@regione.marche.it

Re: [R] nearest lower and higher integers to a multiple of another integer

2020-04-06 Thread Jeff Newmiller
x <- -2 xi <- x %/% 4 xmin <- 4 * xi xmax <- 4 * ( 1 + xi ) On April 6, 2020 1:29:30 AM PDT, Stefano Sofia wrote: >Dear R list members, >given an integer x, I would need to find the nearest lower and higher >integers (xmin and xmax) to a multiple of another integer n. > >Example: if x is -2 and

Re: [R] nearest lower and higher integers to a multiple of another integer

2020-04-06 Thread Gerrit Eichner
Hi Stefano, maybe floor(x / n) * n and ceiling(x / n) * n does what you want? Best regards -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de

[R] nearest lower and higher integers to a multiple of another integer

2020-04-06 Thread Stefano Sofia
Dear R list members, given an integer x, I would need to find the nearest lower and higher integers (xmin and xmax) to a multiple of another integer n. Example: if x is -2 and n is 4, xmin becomes -4 and xmax is 0. I tried to manage it with simple "if" statements, but this is not efficient at

Re: [R] Help needed: gdal-configuration to install sf package in Mac OS Catalina

2020-04-06 Thread Ivan Krylov
On Sun, 5 Apr 2020 23:27:08 -0500 Bijesh Mishra wrote: > configure: error: gdal-config not found or not executable. This would mean that gdal [1], which is a dependency of the sf package, is not installed (or not available on $PATH, or...). If you use Homebrew [2], try running 'brew install

Re: [R] ncol() vs. length() on data.frames

2020-04-06 Thread Ivan Calandra
Thank you Greg for the insights! I agree with you that the decrease in speed is not worth the decrease in readability, and I'll change my length() calls to ncol(). Best, Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research