Re: [R] Calling R code from Javascript

2019-05-24 Thread Hasan Diwan
Sunanda, I'd suggest you expose a model and methods to the web using shiny or something. After which, you just need to use jquery to call the HTTP endpoint. If you need further assistance, please email me off list and I'll provide. -- H On Fri, 24 May 2019 at 18:05, Sunanda Iyengar via R-help < r-

[R] Calling R code from Javascript

2019-05-24 Thread Sunanda Iyengar via R-help
Hello, Came across this e-mail when considering plumber to use R Gui.I am very new to this and i am not sure how to use plumber to connect a javascrpt code to run R. I have a chunk of R code which does some number crunching work which is very neat. I want this to run from a browser API call usin

Re: [R] r kernlab find best cost parameter automatically

2019-05-24 Thread Abby Spurdle
> Would be possible to automate the selection of the best value? Can you define "best", precisely? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/

Re: [R] mboost: Proportional odds boosting model - how to specify the offset?

2019-05-24 Thread Cardenas, Gabriel A
Thanks for your help. Mainly, at one point I code the dependent variable PREP24 to dichotomous and run boosted logistic right. I try to use type=”glm” and I get nothing out of the analysis. So I just leave it as binomial() and then I get this strange response in the .obj where I get a response

Re: [R] Subsetting Data from a Dataframe

2019-05-24 Thread Rui Barradas
Hello, Maybe something like the following is what you want. The code first creates a logical index of columns with at least one NA or "NULL" (character string, not NULL) values. Then extracts only those columns from the dataframe. inx <- sapply(datos, function(x) any(x == "NULL" | is.na(x)))

Re: [R] mboost: Proportional odds boosting model - how to specify the offset?

2019-05-24 Thread Bert Gunter
... and I should have said, show us your code. We've no idea what you tried to do (or at least I don't). Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Ma

Re: [R] mboost: Proportional odds boosting model - how to specify the offset?

2019-05-24 Thread Bert Gunter
I would have thought the message was obvious. Follow the posting guide: show us a subset of your data. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, May

Re: [R] Generating nested models for order selection tests

2019-05-24 Thread Bert Gunter
Purely statistical questions are generally off topic here, and your query may fall under that rubric. But you should try searching at rseek.org and R task views -- https://cran.r-project.org/web/views/ -- perhaps under the SocialScience heading or others that may use the methodology to which you r

Re: [R] [R-pkgs] Release Announcement : Riex Package

2019-05-24 Thread Myriam Ibrahim
Hi, Please find below the links related to 'Riex' package release announcement. If you have any questions or need additional information, let me know. - Release Announcement *- *https://myriamibrahim.com/portfolio/riex/ - CRAN - https://cran.r-project.org/web/packages/Riex/index.html

Re: [R] mboost: Proportional odds boosting model - how to specify the offset?

2019-05-24 Thread Cardenas, Gabriel A
I keep getting this error in base::rowSums(x, na.rm = na.rm, dims = dims, ...) : 'x' must be numeric In addition: Warning message: When I try to run confint on the opt object can you help please thnx [[alternative HTML version deleted]] __ R

[R] Generating nested models for order selection tests

2019-05-24 Thread Ready Learner
Hello everyone, I have created a parametric additive model for the median house price (as the response) and with the number of tax forms (x1) and the number of healthcare facilities (x2) as my covariates. I should mention that both of the covariates have quadratic effects in my model. Now I want

Re: [R] Subsetting Data from a Dataframe

2019-05-24 Thread Sarah Goslee
Hi Paul, Thanks for the reproducible data. You really only need to provide enough to illustrate your question, but this works. I suspect you have a data import problem - I doubt you really want so many columns to be factors! Probably you need to specify that NULL means something specific, rather

[R] Subsetting Data from a Dataframe

2019-05-24 Thread Paul Bernal
Dear friends, Hope you are all doing well. I would like to know how to retrieve a complete dataframe (all the columns), except for the cases when one of the columns have either nulls or NAs. In this case, I´d like to retrieve all the columns but only the cases (rows) where Var5 has values differe

Re: [R] computing standard deviation in R and in Python

2019-05-24 Thread Bogdan Tanasa
Dear Rui, thank you very much ! On Fri, May 24, 2019 at 4:35 AM Rui Barradas wrote: > Hello, > > This has to do with what kind of variance estimator is being used. > R uses the unbiased estimator and Python the MLE one. > > > > var1 <- function(x){ >n <- length(x) >(sum(x^2) - sum(x)^2/n

Re: [R] computing standard deviation in R and in Python

2019-05-24 Thread Rui Barradas
Hello, This has to do with what kind of variance estimator is being used. R uses the unbiased estimator and Python the MLE one. var1 <- function(x){ n <- length(x) (sum(x^2) - sum(x)^2/n)/(n - 1) } var2 <- function(x){ n <- length(x) (sum(x^2) - sum(x)^2/n)/n } sd1 <- function(x) sqrt

[R] computing standard deviation in R and in Python

2019-05-24 Thread Bogdan Tanasa
Dear all, please would you advise : do python and R have different ways to compute the standard deviation (sd) ? for example, in python, starting with : a = np.array([[1,2,3], [4,5,6], [7,8,9]]) print(a.std(axis=1)) ### per row : [0.81649658 0.81649658 0.81649658] print(a.std(axis=0)) ### per c

Re: [R] to run an older version of R on my machine

2019-05-24 Thread Bogdan Tanasa
thanks a lot, Alfredo ! did not know about Rswitch - very helpful ! On Thu, May 23, 2019 at 11:39 PM Alfredo Cortell < alfredo.cortell.nico...@gmail.com> wrote: > Hi Bogdan, > > The way I do this is the following: I have different R versions installed, > and then I downloaded and use Rswitch to c