Re: [R] Number of Cores limited to two in CRAN

2023-07-03 Thread Ravi Varadhan via R-help
Dear Henrik, Thank you! This is quite helpful, especially your longer blog post. Best regards, Ravi From: Henrik Bengtsson Sent: Sunday, July 2, 2023 4:33 AM To: Ravi Varadhan Cc: R-Help Subject: Re: [R] Number of Cores limited to two in CRAN External

Re: [R] Number of Cores limited to two in CRAN

2023-07-02 Thread Ravi Varadhan via R-help
This is the specific error messsage from R CMD check --as-cran Error in .check_ncores(length(names)) : 16 simultaneous processes spawned Calls: prepost -> makeCluster -> makePSOCKcluster -> .check_ncores Execution halted Thanks, Ravi ____ From: Ravi

[R] Number of Cores limited to two in CRAN

2023-07-02 Thread Ravi Varadhan via R-help
, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] How to use ifelse without invoking warnings

2021-10-08 Thread Ravi Varadhan via R-help
Thank you to Bert, Sarah, and John. I did consider suppressing warnings, but I felt that there must be a more principled approach. While John's solution is what I would prefer, I cannot help but wonder why `ifelse' was not constructed to avoid this behavior. Thanks & Best regards,

[R] How to use ifelse without invoking warnings

2021-10-07 Thread Ravi Varadhan via R-help
rnings. Is there a better way to do this? Thank you, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] A Question about MLE in R

2020-07-24 Thread Ravi Varadhan
y do not see a good reason for not changing the default in optim. Best regards, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] sqldf and number of records affected

2020-06-11 Thread Ravi Jeyaraman
t;))) sqldf("select * from main.con") sqldf() -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Thursday, June 11, 2020 10:30 AM To: Ravi Jeyaraman Cc: r-help@r-project.org Subject: Re: [R] sqldf and number of records affected There is no r

Re: [R] sqldf and number of records affected

2020-06-11 Thread Ravi Jeyaraman
f(c("pragma count_changes = 1", "update con set V1 = 0 where V1 > 5 ")) ans <- sqldf("select * from main.con") sqldf() -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Thursday, June 11, 2020 9:12 AM To: Ravi Jeyaraman C

[R] sqldf and number of records affected

2020-06-11 Thread Ravi Jeyaraman
on a database. Any ideas? Thanks Ravi -- This email has been checked for viruses by AVG. https://www.avg.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] how to add a calculated column into a data frame

2020-06-05 Thread Ravi Jeyaraman
How about something like this? df <- data.frame(ID=1:3, DTVAL=c("2009-03-21","2010-05-11","2020-05-05")) df <- df %>% mutate(YEAR = as.numeric(format(as.Date(DTVAL,'%Y-%m-%d'), '%Y'))) -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Charles Thuo

[R] Cumulative split of value in data frame column

2020-06-05 Thread Ravi Jeyaraman
Assuming, I have a data frame like this .. df <- data.frame(ID=1:3, FOO=c('A_B','A_B_C','A_B_C_D_E')) I want to do a 'cumulative split' of the values in column FOO based on the delimiter '_'. The end result should be like this .. ID FOO FOO_SPLIT1 FOO_SPLIT2

Re: [R] read_excel() ignore case of worksheet name?

2020-05-27 Thread Ravi Jeyaraman
Ista, With few tweaks this worked beautifully. Thank you so much. -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Tuesday, May 26, 2020 11:38 PM To: Ravi Jeyaraman Cc: Erin Hodgess ; r-help@r-project.org Subject: Re: [R] read_excel() ignore case of worksheet name

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ravi Jeyaraman
I’ve already tried that and doesn’t work From: Erin Hodgess [mailto:erinm.hodg...@gmail.com] Sent: Tuesday, May 26, 2020 10:55 PM To: Ravi Jeyaraman Cc: r-help@r-project.org Subject: Re: [R] read_excel() ignore case of worksheet name? Here’s a thought, please. Could you use the tolower

[R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ravi Jeyaraman
), function(x) readxl::read_excel(SIS$FULL_FILEPATH[x], sheet='Tables', .name_repair = fixColNames)) Thanks in advance for your response. Cheers Ravi -- This email has been checked for viruses by AVG. https://www.avg.com __ R-help@r-project.org

[R] Help with Parallel Processing

2020-05-21 Thread Ravi Jeyaraman
am not doing that currently because I read somewhere that it's automatically done when using the multisession plan. Any idea what I'm doing wrong? Thanks Ravi if(!require('sqldf')) install.packages('sqldf') if(!require('future')) install.packages('future') if(!require('doFuture

Re: [R] vectorizing the integrate function

2019-08-12 Thread ravi via R-help
to find out how I can vectorize. I have obtained nice answers from Bert and I appreciate the help. I knew even previously that the vectorizing primarily improves the readability of the code. Thanks Bert for making it crystal clear that the looping is still at the interpreted level of R.Thanks,Ravi

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
<- res[[i]]    for(j in seq_along(b)){      res_i_j <- res_i[[j]]      for(k in seq_along(m)){        r[i, j, k] <- res_i_j[[k]]$value        r.error[i, j, k] <- res_i_j[[k]]$abs.error      }    } } Hope this helps, Rui Barradas Às 21:14 de 10/08/19, ravi via R-help escreveu: >   Bert,Thank

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
the function fv. That is, extract the fv$value as a vector. I can then perhaps try to improvise and extend it to arrays.Thanks,Ravi On Saturday, 10 August 2019, 20:03:22 CEST, Bert Gunter wrote: Ravi: First of all, you're calling Vectorize incorrectly. The first argument must be a function

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
)$value # How do I get this for a vector # Finally, if I want an array for all the values of a, b and m, how should I proceed? r <- array(0,c(3,6,3)) r.error <- array(0,c(3,6,3)) # I want the results of the vectorized integrate function in the above arrays. How do I extract these values? Tha

[R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
th dimensions of the lengths of a, b and c. I have tried several variants but am not having much luck. Will appreciate any help that I can get. Thanks,Ravi Sutradhara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list --

Re: [R] Accessing C source files

2019-08-05 Thread ravi via R-help
if you can explain what you mean by "downloading the source code".Thanks,Ravi On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller wrote: Seems like you are looking in the wrong place. Did you download the source code? [1] [1] https://cran.r-project.org/ On August 5, 20

Re: [R] Accessing C source files

2019-08-05 Thread ravi via R-help
if you can explain what you mean by "downloading the source code".Thanks,Ravi On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller wrote: Seems like you are looking in the wrong place. Did you download the source code? [1] [1] https://cran.r-project.org/ On August 5, 20

[R] Accessing C source files

2019-08-05 Thread ravi via R-help
ry). I do not find any C file in the src subfolder  Where do I find the C source files? How do I get to look at them? I have a lot of follow-up questions on interfacing with the C files, but I would like to first know where I can find them. At least on how I can access them.Thank

Re: [R] plotting an isosurface on a 3d plot

2019-06-17 Thread ravi via R-help
ommand results in a surface with a white patch in the middle. Can this be avoided?3. Just curious. When would one want to use homogenous coordinates in the definition of the vertices?4. If I want to paste separate images on the top and bottom planes, how would go about doing it? This is a case of

Re: [R] plotting an isosurface on a 3d plot

2019-06-14 Thread ravi via R-help
add an alpha value to the quad3d command? Once again, I would like to thank you for your fantastic help.Thanking you,Ravi On Thursday, 13 June 2019, 22:52:07 CEST, Duncan Murdoch wrote: On 13/06/2019 4:32 p.m., Duncan Murdoch wrote: > On 13/06/2019 12:47 p.m., ravi via R-help wr

[R] plotting an isosurface on a 3d plot

2019-06-13 Thread ravi via R-help
ow can I plot this surface? In addition, I would like to add similiar surfaces to the same plot. I would appreciate any help that I can get.Thanking you,Ravi Sutradhara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Fast matrix multiplication

2018-08-14 Thread Ravi Varadhan
Does Microsoft open R come with pre-compiled BLAS that is optimized for matrix computations? Thanks, Ravi -Original Message- From: Ista Zahn Sent: Monday, August 13, 2018 3:18 PM To: Ravi Varadhan Cc: r-help@r-project.org Subject: Re: [R] Fast matrix multiplication On Mon, Aug 13

Re: [R] Fast matrix multiplication

2018-08-14 Thread Ravi Varadhan
Hi Ista, Thank you for the response. I use Windows. Is there a pre-compiled version of openBLAS for windows that would make it easy for me to use it? Thanks, Ravi -Original Message- From: Ista Zahn Sent: Friday, August 10, 2018 12:20 PM To: Ravi Varadhan Cc: r-help@r-project.org

[R] Fast matrix multiplication

2018-08-10 Thread Ravi Varadhan
ng how to obtain more substantial speedup. Any suggestions would be greatly appreciated. Thanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/l

Re: [R] adding overall constraint in optim()

2018-05-05 Thread Ravi Varadhan
%*% (cov.mat %*% wgt.vect)) LowerBounds<-c(0.2,0.05,0.1,0,0,0) UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) spgSolution <- spg(wgt.vect, fn=opt.fun, lower=LowerBounds, upper=UpperBounds, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(wgt.

[R] adding overall constraint in optim()

2018-05-05 Thread Ravi Varadhan
(p0)), b=1, meq=1)) Hope this is helpful, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] Subject: glm and stepAIC selects too many effects

2017-06-06 Thread Ravi Varadhan
More principled would be to use a lasso-type approach, which combines selection and estimation in one fell swoop! Ravi From: Ravi Varadhan Sent: Tuesday, June 6, 2017 10:16 AM To: r-help@r-project.org Subject: Subject: [R] glm and stepAIC selects too many

[R] Subject: glm and stepAIC selects too many effects

2017-06-06 Thread Ravi Varadhan
If AIC is giving you a model that is too large, then use BIC (log(n) as the penalty for adding a term in the model). This will yield a more parsimonious model. Now, if you ask me which is the better option, I have to refer you to the huge literature on model selection. Best, Ravi

Re: [R] Haplo.glm error: Failed to converge during EM-glm loop

2016-06-14 Thread Ravi Varadhan
onverge when you set a small tolerance for convergence. You may fiddle with the control options for EM algorithm and see if you can get convergence. If not, you should contact the package authors. Hope this is helpful, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Pr

[R] Linear Regressions with non-negativity constraint

2016-05-23 Thread Ravi Varadhan
Hi, Take a look at the package "ic.infer" by Ulrike Gromping. https://www.jstatsoft.org/article/view/v033i10 Best, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor, Department of Oncology Division of Biostatistics & Bionformatics

Re: [R] help in maximum likelihood

2016-03-04 Thread Ravi Varadhan
Standard error = sqrt(diag(solve(opt$hessian))) Ravi From: Alaa Sindi [mailto:alaasi...@icloud.com] Sent: Wednesday, March 02, 2016 3:22 PM To: Ravi Varadhan <ravi.varad...@jhu.edu> Cc: r-help@r-project.org Subject: Re: help in maximum likelihood Thank you very much prof. Ravi, That wa

Re: [R] help in maximum likelihood

2016-03-02 Thread Ravi Varadhan
6, 63, 59, 62, 60) # note: there is no need to have the choose(n, y) term in the likelihood fn <- function(p) sum( - (y*(p[1]+p[2]*x) - n*log(1+exp(p[1]+p[2]*x))) ) out <- nlm(fn, p = c(-50,20), hessian = TRUE) out eigen(out$hessian) Hope this is helpful, Ravi Ravi Varadhan, Ph.D.

[R] How to plot Geohash on a Map using R

2016-02-29 Thread Ravi Teja
0.00% ttnfs 0.04% ttnfy 0.01% Please let me know how this can be achieved. Thanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Looking for a data set - Teratology data of Chen and Kodell (1989)

2016-02-18 Thread Ravi Varadhan
it. Does anyone know of this or worked with this data set? If so, can someone share it with me? Thank you very much. Best, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor, Department of Oncology Division of Biostatistics & Bionformatics Sidney Ki

Re: [R] Solve an equation including integral

2016-01-08 Thread Ravi Varadhan
nf, t, nu=nu, exi=exi)$value return(res) } uniroot(myroot, c(-2, 2), nu=2, exi=0.5, alpha=.05) Ravi From: Ravi Varadhan Sent: Friday, January 08, 2016 11:29 AM To: r-help@r-project.org; 'sstol...@gmail.com' <sstol...@gmail.com> Subject: Re: Solve an equation including integral I think t

Re: [R] Solve an equation including integral

2016-01-08 Thread Ravi Varadhan
05) Hope this is helpful, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor, Department of Oncology Division of Biostatistics & Bionformatics Sidney Kimmel Comprehensive Cancer Center Johns Hopkins University 550 N. Broadway, Suite -E Baltimore, MD

[R] grep/regexp

2015-12-01 Thread Ravi Varadhan
ent_of_CD4" and "Fr_II_percent_of_CD4". How can I use grep() to do this? More generally, are there any good online resources with examples like this for the use of grep() and regexp() in R? I didn't find the help pages for these very user-friendly. Thank you very much, Ravi Ra

[R] Cautioning optim() users about "Nelder-Mead" default - (originally) Optim instability

2015-11-15 Thread Ravi Varadhan
t;message" in the optim help file that points this out to the users. Hope this is helpful, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/li

Re: [R] Cautioning optim() users about "Nelder-Mead" default - (originally) Optim instability

2015-11-15 Thread Ravi Varadhan
mentations of Nelder-Mead. Best regards, Ravi From: ProfJCNash <profjcn...@gmail.com> Sent: Sunday, November 15, 2015 12:21 PM To: Ravi Varadhan; 'r-help@r-project.org'; lorenzo.ise...@gmail.com Cc: b...@xs4all.nl; Gabor Grothendieck Subject: Re:

Re: [R] About error: L-BFGS-B needs finite values of 'fn'

2015-11-11 Thread Ravi Varadhan
still happen). I would strongly suggest that when you are doing simulations, you should encapsulate the parameter estimation inside a `try' or `tryCatch' statement so that when there is an error, the simulation keeps going rather than crashing out. See the attached code. Best, Ravi Ravi Varadhan

Re: [R] About error: L-BFGS-B needs finite values of 'fn'

2015-11-11 Thread Ravi Varadhan
It seems like there is substantial finite-sample bias in the MLEs. Either that or there is some error in your procedure. See attached code. Ravi From: Ravi Varadhan Sent: Wednesday, November 11, 2015 2:33 PM To: 'denizozo...@gazi.edu.tr' <denizozo...@gazi.edu.tr>; r-help@r-project.

[R] How to get variable name while doing series of regressions in an automated manner?

2015-10-27 Thread Ravi Varadhan
HS? In addition, is there a better paradigm for doing these type of series of regressions in an automatic fashion? Thank you very much, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor, Department of Oncology Division of Biostatistics & Bionfor

Re: [R] How to get variable name while doing series of regressions in an automated manner?

2015-10-27 Thread Ravi Varadhan
Thank you very much, Marc & Bert. Bert - I think you're correct. With Marc's solution, I am not able to get the response variable name in the call to lm(). But, your solution works well. Best regards, Ravi -Original Message- From: Bert Gunter [mailto:bgunter.4...@gmail.com]

Re: [R] Linear regression with a rounded response variable

2015-10-22 Thread Ravi Varadhan
Dear Peter, Charles, Gabor, Jim, Mark, Victor, Peter, and Harold, You have given me plenty of ammunition. Thank you very much for the useful answers. Gratefully, Ravi From: peter dalgaard <pda...@gmail.com> Sent: Wednesday, October 21, 2015 8

[R] Linear regression with a rounded response variable

2015-10-21 Thread Ravi Varadhan
ered. Any suggestions? Thank you, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor, Department of Oncology Division of Biostatistics & Bionformatics Sidney Kimmel Comprehensive Cancer Center Johns Hopkins University 550 N. Broadway, Suite -E Baltimore

Re: [R] Bug in auglag?

2015-10-06 Thread Ravi Varadhan
such that it evaluates to `Inf' or some large value, when the parameter values are not in the constrained domain. constrOptim.nl() is a barrier method so it forces the initial value and the subsequent iterates to be feasible. Best, Ravi From: Rainer M Krug <rai...@krugs

Re: [R] optimizing with non-linear constraints

2015-10-01 Thread Ravi Varadhan
I would recommend that you use auglag() rather than constrOptim.nl() in the package "alabama." It is a better algorithm, and it does not require feasible starting values. Best, Ravi -Original Message- From: Rainer M Krug [mailto:rai...@krugs.de] Sent: Thursday, October 01,

Re: [R] optimizing with non-linear constraints

2015-09-30 Thread Ravi Varadhan
n(x, LAI) { h <- rep(NA, 2) h[1] <- LAI^x[2] / x[3] + x[1] h[2] <- 1 - x[1] - LAI^x[2] / x[3] h } Please take a look at the help page. If it is still not clear, you can contact me offline. Best, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor,

[R] what is the effective method to apply the below logic for ~1.2 million records in R

2015-09-19 Thread Ravi Teja
2 5 3 The above logic will take approximately 60 hours to generate the flag_1 column on a dataset consisting of ~1.2 million records. Is there any effective way in R to implement this logic in R ? Appreciate your help. Thanks, Ravi [[alternat

[R] lsqlin in pracma

2015-08-29 Thread Ravi Varadhan
breaker. Best, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] plotting over a raster image with control over location and orientation

2015-08-22 Thread ravi
not seem to be in agreement. How do I convert, for example, the point (10,-12) to npc units? I hope that I have explained my problem sufficiently well. If I can get help with an approach involving viewports also, I would be grateful for any help that I can get. Thanks, Ravi From: ravi rv

Re: [R] plotting over a raster image with control over location and orientation

2015-08-22 Thread ravi
='b',col='red',newpage=FALSE) plot(xs,ys,type='b',col='red') #fills the whole screen instead of just the intended viewport Thanks,Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

[R] plotting over a raster image with control over location and orientation

2015-08-21 Thread ravi
to have the image more transparent just under the x and y labels and axis labelsThanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] : Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-04 Thread Ravi Varadhan
What about numeric constants, like `163'? eval(Pre(exp(sqrt(163)*pi), 120))does not work. Thanks, Ravi From: David Winsemius dwinsem...@comcast.net Sent: Saturday, July 4, 2015 1:12 PM To: Duncan Murdoch Cc: r-help; John Nash; Ravi Varadhan Subject

Re: [R] : Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-03 Thread Ravi Varadhan
), then all the constants, 163, pi, are automatically of 120 bits precision. Is this easy to do? Best, Ravi From: David Winsemius dwinsem...@comcast.net Sent: Friday, July 3, 2015 2:06 PM To: John Nash Cc: r-help; Ravi Varadhan Subject: Re: [R] : Ramanujan

Re: [R] : Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-03 Thread Ravi Varadhan
matters in Rmpfr. Even if it does, the answer you get is still wrong as you showed. Thanks, Ravi -Original Message- From: Richard M. Heiberger [mailto:r...@temple.edu] Sent: Thursday, July 02, 2015 6:30 PM To: Aditya Singh Cc: Ravi Varadhan; r-help Subject: Re: [R] : Ramanujan

[R] Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-02 Thread Ravi Varadhan
am doing wrong? Thank you, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] multiple parameter optimization with optim()

2015-02-21 Thread Ravi Varadhan
)) # opt - spg(startVal, fn) opt #list(coefficients = opt$par, LogLik = -opt$value, Std.Error = sqrt(diag(solve(opt$hessian } Hope this is helpful, Ravi [[alternative HTML version deleted

Re: [R] Unable to use `eval(parse(text))' in nlme::lme

2015-02-14 Thread Ravi Varadhan
Yes, this is a very important point. Thank you, Bill. Best, Ravi From: William Dunlap wdun...@tibco.com Sent: Friday, February 13, 2015 4:56 PM To: Ravi Varadhan Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] Unable to use `eval(parse(text))' in nlme::lme ff

Re: [R] Unable to use `eval(parse(text))' in nlme::lme

2015-02-09 Thread Ravi Varadhan
, Transplant_type!=0 time 0) lme(ff, random=~1|Patient, data=dd, correlation=corAR1(), na.action=na.omit) Best, Ravi Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg) Associate Professor Department of Oncology Division of Biostatistics Bionformatics Johns Hopkins University 550 N. Broadway

[R] Unable to use `eval(parse(text))' in nlme::lme

2015-02-08 Thread Ravi Varadhan
::lmer without any problems. It seems that there is a problem in how the formula object is evaluated in lme(). Is there an alternative way to do this? Thank you, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Re-order levels of a categorical (factor) variable

2015-01-22 Thread Ravi Varadhan
Dear Bert, Martin, Bill, Thank you very much for the help. Bert Martin's solutions solved my problem. Would it be useful to add an example like this to the help page on ?factor or ?levels? Thanks again, Ravi From: Martin Maechler maech

[R] Re-order levels of a categorical (factor) variable

2015-01-21 Thread Ravi Varadhan
generally, is there a simple way to redefine the ordering of the categorical variable such that this ordering will be used in whatever operation is done? I looked at relevel, reorder, etc., but they did not seem to be applicable to my problem. Thanks for any help. Best, Ravi

Re: [R] R 3.1.2 mle2() function on Windows 7 Error and multiple solutions

2015-01-15 Thread Ravi Varadhan
. If this solution is not what you are looking for, your problem may be poorly scaled. First, make sure that the likelihood is coded correctly. If it is correct, then you may need to improve the scaling of the problem. Hope this is helpful, Ravi [[alternative HTML version deleted

Re: [R] R 3.1.2 mle2() function on Windows 7 Error and multiple solutions

2015-01-15 Thread Ravi Varadhan
difficult to know a priori which one would be the best for my problem. Thus, the benchmarking capability provided by optimx is a powerful feature. Ravi From: Ben Bolker bbol...@gmail.com Sent: Thursday, January 15, 2015 9:29 AM To: Ravi Varadhan; R-Help Cc

[R] Subject: short-sale constraint with nonpositive-definite matrix in portfolio optimization

2014-12-21 Thread Ravi Varadhan
projection is quite easy to do, and in fact, there are functions in R to do this (e.g., see posdefify() function in sfsmisc package). There is a recent review article on spectral projected gradient algorithm in J Statistical Software. http://www.jstatsoft.org/v60/i03 Hope this is helpful, Ravi

Re: [R] porting an access database to sqlite

2014-11-27 Thread ravi
am near the tail end? There seems to be no simple method for finding the size of the table. Thanks,Ravi ravi rv...@yahoo.se 11/25/14 12:42 PM Hi,All my data is presently locked in a Microsoft access database. This has huge data in a number of large tables. Using RODBC and connecting to it takes

[R] porting an access database to sqlite

2014-11-25 Thread ravi
this in a simple way. I would appreciate all help that I can get.Thanks,Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] R-tool - OS compatibility help

2014-08-29 Thread Ravi Kumar Rupakula
Dear Support, Please let us know Windows 2008R2 OS compatibility for R tool is available or not? If available, please let us know the details.

[R] Checking modeling assumptions in a binomial GLMM

2014-07-16 Thread Ravi Varadhan
) for a binomial GLMM? Are there any standard checks that are commonly done? Are there any pedagogical examples or data sets where model assumptions have been examined for binomial GLMMs? Any suggestions/guidance is appreciated. Thank you, Ravi [[alternative HTML version deleted

Re: [R] Box-cox transformation

2014-07-07 Thread Ravi Varadhan
Thank you. It is very helpful. Ravi -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Monday, July 07, 2014 4:15 PM To: Ravi Varadhan Cc: r-help@r-project.org Subject: Re: [R] Box-cox transformation Dear Ravi, In my previous example, I used the residuals, so

[R] Box-cox transformation

2014-07-06 Thread Ravi Varadhan
trying to create the profile likelihood for the Box-Cox parameter, but obviously I am not getting it right. I am not sure that ans$deviance is the right thing to do. I would appreciate any guidance. Thanks Best, Ravi [[alternative HTML version deleted

[R] A combinatorial assignment problem

2014-05-01 Thread Ravi Varadhan
search methods but they are not guaranteed to work. Any hints or suggestions would be greatly appreciated. Best, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] A combinatorial assignment problem

2014-05-01 Thread Ravi Varadhan
- sample(1:R, size=size, replace=FALSE) end - min((i+N-1),K) assignment[i:end, ] - sel } assignment } sol - assign(40,16,3) table(sol) Thanks, Ravi -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Thursday, May 01, 2014 10:46 AM To: Ravi

Re: [R] A combinatorial assignment problem

2014-05-01 Thread Ravi Varadhan
for referees is 13 - 3 = 10. Of course, I have to increase the # iters to get a better solution, but for large K and R this may not converge at all. Best regards, Ravi From: Ravi Varadhan Sent: Wednesday, April 30, 2014 1:49 PM To: r-help@r-project.org Subject: A combinatorial assignment

[R] A couple of issues with lattice::bwplot

2014-02-25 Thread Ravi Varadhan
any help. Thank you, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

[R] Unable to Install a package from source in Windows

2014-01-09 Thread Ravi Varadhan
in advance, Ravi install.packages(H:/Documents/computations/BB_2014.01-1.tar.gz, repos=NULL, type=source) Installing package into '\\homer.win.ad.jhu.edu/users$/rvaradh1/Documents/R/win-library/3.0' (as 'lib' is unspecified) '\\homer.win.ad.jhu.edu\users$\rvaradh1\Documents' CMD.EXE was started

Re: [R] convergence=0 in optim and nlminb is real?

2013-12-17 Thread Ravi Varadhan
will disappear. Best, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] [optim/bbmle] function returns NA

2013-08-14 Thread Ravi Varadhan
' in your `g' function. There are likely a number of other issues as well. You may try the nmkb() function in the dfoptim package. It can handle box constraints and typically tends to perform a bit better than optim's Nelder-Mead for unconstrained problems. Hope this is helpful, Ravi

Re: [R] GARCH Optimization Problems

2013-08-01 Thread Ravi Varadhan
Hi Tony, Did you try the `auglag' algorithm in alabma package? Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] While using R CMD check: LaTex error: File `inconsolata.sty' not found

2013-07-12 Thread Ravi Varadhan
. How can I eliminate this problem? Thanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] Vectorized code for generating the Kac (Clement) matrix

2013-04-26 Thread Ravi Varadhan
in 2:(n+1)) Kacmat[i, i-1] - i-1 The above code is fast, but I am curious about vectorized ways to do this. Thanks in advance. Best, Ravi Ravi Varadhan, Ph.D. Assistant Professor The Center on Aging and Health Division of Geriatric Medicine Gerontology Johns Hopkins University rvarad

Re: [R] Vectorized code for generating the Kac (Clement) matrix

2013-04-26 Thread Ravi Varadhan
Thank you, Berend and Enrico, for looking into this. I did not think of Enrico's clever use of cbind() to form the subsetting indices. Best, Ravi From: Berend Hasselman [b...@xs4all.nl] Sent: Friday, April 26, 2013 10:08 AM To: Enrico Schumann Cc: Ravi

Re: [R] Crrstep help

2013-03-28 Thread Ravi Varadhan
Hi Kathy, You should first contact the package maintainer (which is me!) before posting to r-help. Which version of the package are you using? Can you send me a minimally reproducible code? Ravi Ravi Varadhan, Ph.D. Assistant Professor The Center on Aging and Health Division of Geriatric

Re: [R] Crrstep help

2013-03-28 Thread Ravi Varadhan
Kathy, You need to make sure that you have installed the latest version of `cmprsk' package (version 2.2-4). crrstep will not work Otherwise. Ravi From: Ravi Varadhan Sent: Thursday, March 28, 2013 5:25 PM To: 'kathyhan...@gmail.com' Cc: r-help@r-project.org Subject: Re: [R] Crrstep help

Re: [R] Constrained Optimization in R (alabama)

2013-02-11 Thread Ravi Varadhan
optimizers like alabama would still NOT be good approaches. It would be easiest to just go through the discrete values. Ravi From: Berend Hasselman [b...@xs4all.nl] Sent: Monday, February 11, 2013 12:45 AM To: Axel Urbiz Cc: R-help@r-project.org; Ravi

Re: [R] Constrained Optimization in R (alabama)

2013-02-10 Thread Ravi Varadhan
Your constraints are non-sensical. The only way for these constraints to be satisfied is for two of the parameters to be 0 and the other two to be 1. Please spend time to formulate your problem correctly, before imposing on others' time. Ravi From: Axel

Re: [R] Constrained Optimization in R (alabama)

2013-02-10 Thread Ravi Varadhan
) Ravi From: Axel Urbiz [axel.ur...@gmail.com] Sent: Sunday, February 10, 2013 3:16 PM To: R-help@r-project.org; Ravi Varadhan Subject: Constrained Optimization in R (alabama) Dear List, I'm trying to solve this simple optimization problem in R

[R] Non linear programming: choose R that minimizes corr(y,x^R)

2013-02-06 Thread Ravi Varadhan
(p, function(p) cor(y, x^p)^2) plot(seq(0,5,length=1000), obj2(seq(0,5,length=1000),x,y), type=l) Best, Ravi Ravi Varadhan, Ph.D. Assistant Professor The Center on Aging and Health Division of Geriatric Medicine Gerontology Johns Hopkins University rvarad...@jhmi.edumailto:rvarad...@jhmi.edu 410

[R] texture mapping images on the faces of a cuboid with rgl

2013-01-30 Thread ravi
page referred to above). But, as can be seen from my questions, I don't understand this sufficiently to do this. But I hope that I have given sufficient information to explain my problem. Thanks, Ravi [[alternative HTML version deleted]] __ R

[R] starting values in glm(..., family = binomial(link =log))

2013-01-30 Thread Ravi Varadhan
Try this: Age_log_model = glm(Arthrose ~ Alter, data=x, start=c(-1, 0), family=quasibinomial(link = log)) Ravi Ravi Varadhan, Ph.D. Assistant Professor The Center on Aging and Health Division of Geriatric Medicine Gerontology Johns Hopkins University rvarad...@jhmi.edumailto:rvarad

Re: [R] starting values in glm(..., family = binomial(link =log))

2013-01-30 Thread Ravi Varadhan
I did not get any warnings when I ran your data/model example. From: Fischer, Felix [mailto:felix.fisc...@charite.de] Sent: Wednesday, January 30, 2013 11:19 AM To: Ravi Varadhan Cc: r-help@r-project.org Subject: AW: [R] starting values in glm(..., family = binomial(link =log)) Thanks for your

Re: [R] sqldf package: using variables in where condition

2013-01-14 Thread Ravi Sreedhar
], list[2 }..tile list[15] Can someone help since, I am unable to reference the element location as variable in the sqldf function? also, is there a better way? would appreciate your help Rgds, Ravi -- View this message in context: http://r.789695.n4.nabble.com/sqldf-package

[R] shell function in R

2012-12-29 Thread Ravi Singh
from CMD console. How can I view the intermediate outputs while running NONMEM from R? With best regards, Ravi --- Ravi Singh, Ph.D. Post Doctoral Associate, Dept of Pharmaceutics Box 100494 JHMHC University of Florida Gainesville FL-32610 Ph: 352-273-7855 Fax: 352-273-7854

Re: [R] model selection with spg and AIC (or, convert list to fitted model object)

2012-12-04 Thread Ravi Varadhan
, an important question is how do we know that the truth is supposedly on the boundary. If you can assume that the truth is in the interior, then you can use standard approaches: observed hessian or bootstrap to get standard errors. Best, Ravi From: Adam Zeilinger [mailto:ad...@ucr.edu] Sent

  1   2   3   4   5   6   7   8   9   >