[R] [R-pkgs] onetime 0.1.0: Run Code Only Once

2022-12-09 Thread David Hugh-Jones
Dear all, Onetime 0.1.0, a utility package of interest to package developers, is now on CRAN: https://cran.r-project.org/package=onetime Onetime uses lockfiles to perform an action only once (ever, or with an expiry date) on a given computer. For example, it can send a message or warning: for

[R] [R-pkgs] Package huxtable 0.2.1 on CRAN

2017-04-26 Thread David Hugh-Jones
Hi all, I'm happy to announce that the huxtable package version 0.2.1 is on CRAN. huxtable is an R package to create LaTeX and HTML tables, with a friendly, modern interface. Features of 0.2.1 include: - Export to LaTeX, HTML, Word and Markdown - Easy integration with knitr and rmarkdown

[R] [R-pkgs] anim.plots - simple animated plots for R

2014-11-10 Thread David Hugh-Jones
Announcing the first release of anim.plots, a package for simple animated plots in R, using Yihui Xie's animation package. http://cran.r-project.org/web/packages/anim.plots/index.html Functions are very similar to basic R graphics. Currently the package includes animated versions of plot,

Re: [R] Loop question?

2013-01-26 Thread David Hugh-Jones
Here's a toy example which you can apply the logic of: dfr - expand.grid(1:3,1:2) results - apply(dfr, 1, sum) dfr[results==4,] On 25 January 2013 22:19, Andras Farkas motyoc...@yahoo.com wrote: Dear All I have the following data (somewhat simplyfied): TINF -1 a

Re: [R] importing data

2013-01-26 Thread David Hugh-Jones
Hi Ray, Comments below: On 26 January 2013 09:03, Ray Cheung ray1...@gmail.com wrote: [snip] ###FUNCTION TO READ FILES little_helpful - function(n) { file_name - paste0(C:/.../data, n, .dat) read.table(file_name) } ###RETURN AN OBJECT WHICH CHECKS FOR THE EXISTENCE OF FILES check -

Re: [R] fixed effects Tobit, Honore style?

2011-07-15 Thread David Hugh-Jones
A cleaner and slightly more tested version is at http://davidhughjones.blogspot.com/2011/07/honore-style-fixed-effects-estimators.html David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick http://davidhughjones.googlepages.com On 13 July 2011 15:33, David

Re: [R] fixed effects Tobit, Honore style?

2011-07-13 Thread David Hugh-Jones
=BFGS, control=list(maxit=1000)) if (res$convergence != 0) warning(Didn't converge) res$par } For standard errors, bootstrap. David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick http://davidhughjones.googlepages.com On 12 July 2011 21:38, Daniel Malter

[R] fixed effects Tobit, Honore style?

2011-07-12 Thread David Hugh-Jones
Hi all, Is there any code to run fixed effects Tobit models in the style of Honore (1992) in R? (The original Honore article is here: http://www.jstor.org/sici?sici=0012-9682%28199205%2960%3A3%3C533%3ATLALSE%3E2.0.CO%3B2-2) Cheers David [[alternative HTML version deleted]]

Re: [R] Help in error removal

2011-07-12 Thread David Hugh-Jones
On 12 July 2011 12:27, Mitra, Sumona sumona.mi...@kcl.ac.uk wrote: Dear all, I am new to programming in R. You sure are ;-) I deal with microarray data,which is a data frame object type. I need to carry out a few statistical procedures on this, one of them being the pearson corelation.

[R] table of Design regressions?

2011-05-26 Thread David Hugh-Jones
with that? xtable doesn't seem to do the trick. Cheers, David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick http://davidhughjones.googlepages.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] clogit comparison between Stata and R

2010-02-26 Thread David Hugh-Jones
Hi Thomas Sorry to bug you again after 6 months! I just wondered if there is a simple way to find the N after dropping groups with invariant outcomes - I am reading coxph.object and the structure of the returned object, but nothing jumps out at me. With best wishes, David Hugh-Jones On 9 July

[R] model matrix with a spline

2009-12-18 Thread David Hugh-Jones
of the already-created spline? And is there a simple way to do this programmatically so I don't need to check each term of the formula individually? Cheers, David Hugh-Jones Post-doctoral Researcher Max Planck Institute of Economics, Jena http://davidhughjones.googlepages.com

[R] clogit comparison between Stata and R

2009-07-08 Thread David Hugh-Jones
understand why Stata is dropping the groups with all outcomes the same... this is inevitable in a conditional logit, right? Is R doing the same? And what might be the cause of the difference in coefficients? Cheers David Hugh-Jones Post-doctoral Researcher Max Planck Institute of Economics, Jena http

Re: [R] how to read point shp file to R?

2009-07-08 Thread David Hugh-Jones
You might also find the R wiki useful: http://wiki.r-project.org/rwiki/doku.php?id=tips:spatial-data http://wiki.r-project.org/rwiki/doku.php?id=tips:stats-spatial David Hugh-Jones Post-doctoral Researcher Max Planck Institute of Economics, Jena http://davidhughjones.googlepages.com 2009/7/7

[R] simple question

2009-07-01 Thread David Hugh-Jones
simple but the information is hard to find. David Hugh-Jones Post-doctoral Researcher Max Planck Institute of Economics, Jena http://davidhughjones.googlepages.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] by question

2009-06-24 Thread David Hugh-Jones
to create a vector v with length(v) == nrow(x) return(v) }) # now result has a big list, argh... how do I put it neatly back into the mydata data frame? for (i in unique(mydata$some_factor) { mydata$newvar[mydata$somefactor ==i] - result[[i]] } What should I be doing instead of this? David Hugh

Re: [R] by question

2009-06-24 Thread David Hugh-Jones
That seems to work. I should add that to make ave work like by one can do: mydata$newvar - ave(1:nrow(mydata), mydata$some_factor, FUN= function (x) { x - ds[x,] # ... etc... }) Thanks! David [[alternative HTML version deleted]] __