Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Paul Bernal
Thank you Abby! Cheers! El mié., 6 de mayo de 2020 10:35 p. m., Abby Spurdle escribió: > > The second question is, is there a way I can develop an R model and turn > it > > into an executable program that can work on any OS? > > --myrscript.c > int main (int argc, char* argv []) >

Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Paul Bernal
Dear Jeff, Thank you for the feedback. So, after reading your comments, it seems that, in order to develop an executable model that could be run in any OS, python might be the way to go then? I appreciate all of your valuable responses. Best regards, Paul El mié., 6 de mayo de 2020 6:22 p.

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Abby Spurdle
On Thu, May 7, 2020 at 4:50 PM Mark Leeds wrote: > Richard: I may have implied that one should "mess with environments" by > saying that I agree with Abby. If so, my apologies because that's not what I > meant. > I only meant understanding. Hi Mark, I don't think you need to apologize.

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Mark Leeds
Hi Richard: I didn't say it was and didn't mean to imply it. All I said is that it was an example of where "not understanding environments" can lead to errors that won't be understood by the person experiencing them. It just so happens that the use of "environment(f) <- " can lead to a solution

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Richard O'Keefe
I should clarify that the original *problem* wasn't a case of environment()<- but a proposed solution was. As the proposer wrote, "However, this can lead to headaches downstream". We agree that it is very important and useful to understand environments in R. I once set out to construct a formal

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Mark Leeds
Richard: I may have implied that one should "mess with environments" by saying that I agree with Abby. If so, my apologies because that's not what I meant. I only meant understanding. On Thu, May 7, 2020 at 12:47 AM Mark Leeds wrote: > Hi Richard: I didn't say it was and didn't mean to imply

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Richard O'Keefe
That example is NOT an example of "messing around with environments." On Thu, 7 May 2020 at 15:36, Mark Leeds wrote: > > Hi Abby: I agree with you because below is a perfect example of where not > understanding environments causes a somewhat > mysterious problem. Chuck Berry explains it in a

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Richard O'Keefe
By "mess around with" I mean environment(f) <- ... That is for _very_ advanced players. Never assume that someone meant something stupid, make them prove it. On Thu, 7 May 2020 at 15:28, Abby Spurdle wrote: > > > If you want to mess around with the environment of a > > function, then you need

Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Abby Spurdle
> The second question is, is there a way I can develop an R model and turn it > into an executable program that can work on any OS? --myrscript.c int main (int argc, char* argv []) { system ("Rscript myrscript.r"); return 0; } - command line > gcc -o

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Mark Leeds
Hi Abby: I agree with you because below is a perfect example of where not understanding environments causes a somewhat mysterious problem. Chuck Berry explains it in a follow up email. https://r.789695.n4.nabble.com/issues-with-environment-handling-in-model-frame-td4762855.html On Wed, May 6,

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Abby Spurdle
> If you want to mess around with the environment of a > function, then you need to understand this stuff, but you probably > shouldn't do that. What exactly do you mean? Are you implying that a user should not use environments? In which case, I would disagree.

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Richard O'Keefe
A closure is a function plus an environment. That's it. This is a sixty-year-old thing in programming languages. A closure is a dynamic value representing an instance of a function in a particular context which it can refer to. When a program in Algol 60 passed a procedure P to a procedure Q,

Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Bert Gunter
To supplement Jeff's comments: Big Data: https://CRAN.R-project.org/view=HighPerformanceComputing To deploy models: https://cran.r-project.org/web/views/ModelDeployment.html Opinion: Executables are a security risk. I wouldn't touch one unless from a trusted source. I think I understand what

Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Jeff Newmiller
Large data... yes, though how this can be done may vary. I have used machines with 128G of RAM before with no special big data packages. Making an executable... theoretically, yes, though there are some significant technical (and possibly legal) challenges that will most likely make you

Re: [R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread Rasmus Liland
On 2020-05-06 09:13 +, PIKAL Petr wrote: > Maybe aggregate? Hi! I agree aggregate is an elegant solution for this, so I continued your example a bit: dt_count <- '"","STATUS","N" "1","Resolved",650 "2","Assigned",135 "3","Closed",530 "4","In Progress",56 "5","Pending",75

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-06 Thread Abby Spurdle
> OTOH, Hadley Wickham has written a book "Advanced R" which has been > the best book about advanced R by far (in my view, notably > before it morphed (towards the 2nd edition) to use more and more > non-base R packages). There, he used "Closure" in a different, > stricter sense, starting the

[R] Working with very large datasets and generating an executable file

2020-05-06 Thread Paul Bernal
Dear R friends, Hope you are doing well. I have two questions, the first one is, can I work with very large datasets in R? That is, say I need to test several machine learning algorithms, like (random forest, multiple linear regression, etc.) on datasets having between 50 to 100 columns and 20

Re: [R] COVID-19 datasets...

2020-05-06 Thread Thomas Petzoldt
Sorry if I'm joining a little bit late. I've put some related links and scripts together a few weeks ago. Then I stopped with this, because there is so much. The data format employed by John Hopkins CSSE was sort of a big surprise to me. An opposite approach was taken in Germany, that

Re: [R-es] instalar

2020-05-06 Thread José Trujillo Carmona
Inmediatamente, es muy posible que no. R evoluciona como los seres vivos: muy poquito a poquito. Pasito a pasito. A medio plazo seguro que sí. Todas las correcciones de errores, mejoras y novedades en los paquetes se irán haciendo con dependencia a R4. Si no lo instalas ahora y usas R más o

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
Thank you so much! I mostly worry which of those procedures is the closest to the z-score On Wed, May 6, 2020 at 10:05 AM Rui Barradas wrote: > > Hello, > > Another option is to use stats::t.test > > t.test(x)$statistic > > Or, if you want to test against a beta0 != 0, > > t.test(x, mu =

Re: [R-es] instalar

2020-05-06 Thread Jesús Para Fernández
Merece la pena r4? Yo no veograndes mejoras respecto s la 3.6... Obtener Outlook para Android From: R-help-es on behalf of Juan Carlos Lopez Mesa Sent: Wednesday, May 6, 2020 1:48:26 PM To: betans...@gmail.com Cc: r-help-es Subject:

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Rui Barradas
Hello, You can write a function to compute the scores: z_score <- function(x, beta = mean, beta0 = 0){ beta <- match.fun(beta) n <- length(x) score <- sqrt(n)*(beta(x) - beta0)/sd(x) names(score) <- if(n < 30) "t.score" else "z.score" score } # data example x <- rt(20, df = 1) tt <-

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Rui Barradas
Hello, Another option is to use stats::t.test t.test(x)$statistic Or, if you want to test against a beta0 != 0, t.test(x, mu = beta0)$statistic But in this case the estimator is the estimator for the mean value. Hope this helps, Rui Barradas Às 15:54 de 06/05/20, Ana Marija escreveu:

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
Thanks Patrick, so in conclusion this is fine? z-score=Beta/StdErr On Wed, May 6, 2020 at 9:52 AM Patrick (Malone Quantitative) wrote: > > Guessing for Ana, but no, that's a different meaning. Beta/StdErr is a > z statistic--a test statistic against (usually) the tails of the unit > normal

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
as defined here: https://huwenboshi.github.io/data%20management/2017/11/23/tips-for-formatting-gwas-summary-stats.html where Effect size is Beta On Wed, May 6, 2020 at 9:41 AM Rui Barradas wrote: > > Hello, > > By z-scores do you mean function help('scale')? > > Hope this helps, > > Rui

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Patrick (Malone Quantitative)
Guessing for Ana, but no, that's a different meaning. Beta/StdErr is a z statistic--a test statistic against (usually) the tails of the unit normal distribution. So like a t-test with infinite df. On Wed, May 6, 2020 at 10:41 AM Rui Barradas wrote: > > Hello, > > By z-scores do you mean

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Rui Barradas
Hello, By z-scores do you mean function help('scale')? Hope this helps, Rui Barradas Às 15:31 de 06/05/20, Ana Marija escreveu: Hi Rui, Thank you for getting back to me. Is there is a better way to calculate Z scores if I have p values, SE and Beta? Thanks Ana On Wed, May 6, 2020 at 9:27

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
I guess I can have z-score=Beta/StdErr On Wed, May 6, 2020 at 9:37 AM Ana Marija wrote: > > thanks, can you please tell em what would be the way not to get the > absolute (always positive values) > > On Wed, May 6, 2020 at 9:33 AM Rui Barradas wrote: > > > > Hello, > > > > Sorry but after

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
thanks, can you please tell em what would be the way not to get the absolute (always positive values) On Wed, May 6, 2020 at 9:33 AM Rui Barradas wrote: > > Hello, > > Sorry but after reading my answer I believe it's not completely clear. > > I meant absolute values, the actual t-scores as

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
Hi Rui, Thank you for getting back to me. Is there is a better way to calculate Z scores if I have p values, SE and Beta? Thanks Ana On Wed, May 6, 2020 at 9:27 AM Rui Barradas wrote: > > Hello, > > That gives the *absolute* t-scores. If it's all you need/want, then the > answer is yes, you

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Rui Barradas
Hello, Sorry but after reading my answer I believe it's not completely clear. I meant absolute values, the actual t-scores as computed from the data might be negative. Your code will always produce positive numbers. Hope this helps, Rui Barradas Às 15:27 de 06/05/20, Rui Barradas escreveu:

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Rui Barradas
Hello, That gives the *absolute* t-scores. If it's all you need/want, then the answer is yes, you can. Hope this helps, Rui Barradas Às 14:28 de 06/05/20, Ana Marija escreveu: Hello, Can I apply the quantile function qt() this way? qt(pvals/2, 406-34, lower.tail = F) to get the T-scores?

[R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Ana Marija
Hello, Can I apply the quantile function qt() this way? qt(pvals/2, 406-34, lower.tail = F) to get the T-scores? Thanks Ama __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [ESS] Anyone tried Emacs 27.1 pretest with Windows 10 ?

2020-05-06 Thread Martin Maechler via ESS-help
> Stephen Eglen via ESS-help > on Wed, 06 May 2020 12:23:23 +0100 writes: > Good idea Phil. Also, Kevin -- does it crash with earlier > versions of R? R 4.0.0 just came out so wondering if that > is an additional degree of freedom for bugs to creep in. > Stephen

Re: [R-es] instalar

2020-05-06 Thread Juan Carlos Lopez Mesa
update.packages() esta función actualiza todos los paquetes instalados El lun., 4 may. 2020 a las 12:52, Jose Betancourt B. () escribió: > Estimados > > Instalé r.4 pero me pide que actualice cada paquete, ?hay alguna > manera automática? > > ___ >

Re: [ESS] Anyone tried Emacs 27.1 pretest with Windows 10 ?

2020-05-06 Thread Stephen Eglen via ESS-help
Good idea Phil. Also, Kevin -- does it crash with earlier versions of R? R 4.0.0 just came out so wondering if that is an additional degree of freedom for bugs to creep in. Stephen On Wed, May 06 2020, Phillip Lord via ESS-help wrote: > If you having problems please do send a bug report in.

Re: [ESS] Anyone tried Emacs 27.1 pretest with Windows 10 ?

2020-05-06 Thread Phillip Lord via ESS-help
If you having problems please do send a bug report in. It would be unfortunate if 27.1 came out buggy. Phil Kevin Wright via ESS-help writes: > I've tried the latest Emacs 27.1 pre-test on Windows 10 with ESS. I've > been getting freezes of Emacs when I'm working with R code buffers. >

Re: [R] PCRE configure problem with R-4.0.0

2020-05-06 Thread Patrick Connolly
On Tue, 05-May-2020 at 06:28AM -0400, Ista Zahn wrote: |> |> |> > |> > Linux Mint 17.2 is based on Ubuntu 14.04, which has been released in |> > |> > April 2014, while PCRE2 has been released in 2015. |> > |> |> > |> Moreover, support for 17.2 ended over a year ago (according to |> > |>

Re: [R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread PIKAL Petr
Hi Maybe aggregate? 1. Make your column STATUS a factor 2. Combine levels Resolved and Closed to one common factor named Reslolved/Closed 3. aggregate according to new STATUS temp <- read.table("clipboard", sep=",", header=T) temp$STATUS [1] "Resolved""Assigned""Closed" "In

Re: [R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread K. Elo
Hi! With 'dplyr': dt_count %>% mutate(STATUS=ifelse(STATUS %in% c("Resolved","Closed"),"Resolved/Closed",STATUS)) %>% group_by(STATUS) %>% summarise(n=sum(N)) Output: 1 Assigned 135 2 Cancelled 20 3 In Progress56 4 Pending75 5 Resolved/Closed 1180 HTH,

[R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread Gregg via R-help
If I have a data table that is essentially output titled: "dt_count" - it contains: "","STATUS","N" "1","Resolved",650 "2","Assigned",135 "3","Closed",530 "4","In Progress",56 "5","Pending",75 "6","Cancelled",20 Need to change the "dt_count" data table to a new data table that looks like this:

[R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread Gregg via R-help
I have a data table titled: "dt_count" - it contains: > "","STATUS","N" > "1","Resolved",650 > "2","Assigned",135 > "3","Closed",530 > "4","In Progress",56 > "5","Pending",75 > "6","Cancelled",20 > > I need to change the "dt_count" data table to a new data table that looks > like this: >

Re: [R-es] instalar

2020-05-06 Thread Isidro Hidalgo Arellano
Yo lo resolví instalando zoo primero (y me instaló rlang de paso). Después forecast no me dio errores de instalación con todas las dependencias... Un saludo Isidro Hidalgo Arellano Observatorio del Mercado de Trabajo Consejería de Economía, Empresas y Empleo http://www.castillalamancha.es/