Re: [R-pkg-devel] How to obtain intercept of intercept-only glm in Fortran?

2019-05-20 Thread Michael Weylandt
> think Ivan's solution is an excellent one and can be extended to other > scenarios. > > Best, > > Zhu > > On May 11, 2019, at 9:48 AM, Michael Weylandt > wrote: > > On Sat, May 11, 2019 at 8:28 AM Wang, Zhu wrote: >> >> >> I am open to whatever sugge

Re: [R-pkg-devel] How to obtain intercept of intercept-only glm in Fortran?

2019-05-11 Thread Michael Weylandt
On Sat, May 11, 2019 at 8:28 AM Wang, Zhu wrote: > > I am open to whatever suggestions but I am not aware a simple closed-form > solution for my original question. > > It would help if you could clarify your original question a bit more, but for at least the main three GLMs, there are closed

Re: [R-pkg-devel] How to obtain intercept of intercept-only glm in Fortran?

2019-05-11 Thread Michael Weylandt
This is very cool, but I wonder if it isn't over-kill for the larger problem. In general, calculating the coefficient of an intercept-only GLM is just calculating (a transformation of) the MLE of a univariate exponential family distribution. (Things may be a bit trickier if the GLM also involves

Re: [R-pkg-devel] package problems

2019-04-25 Thread Michael Weylandt
Hi Dennis, I On Thu, Apr 25, 2019 at 9:00 AM Dennis Boos wrote: > > R Package Folks, > > The automatic checks rejected my package submission. A year ago, I got > past the automatic checks, but a CRAN person told me to add a doi and > use \donttest{}. > > 1. So I added the doi to the DESCRIPTION

Re: [Rd] Error generated by .Internal(nchar) disappears when debugging

2015-10-05 Thread Michael Weylandt
Doesn't the byte-compiler inline calls like nchar() to call the .Internal directly for certain optimization levels? If the 'internal' signature changed in a point release, I'd expect an issue like the below. (I'm pretty sure CRAN packages are byte-compiled at build-time, but don't use Windows

Re: [Rd] iterated lapply

2015-02-25 Thread Michael Weylandt
On Feb 25, 2015, at 5:35 PM, Benjamin Tyner bty...@gmail.com wrote: Actually, it depends on the number of cores: Under current semantics, yes. Each 'stream' of function calls is lazily capturing the last value of `i` on that core. Under Luke's proposed semantics (IIUC), the result would

Re: [Rd] iterated lapply

2015-02-24 Thread Michael Weylandt
On Feb 24, 2015, at 10:50 AM, luke-tier...@uiowa.edu wrote: The documentation is not specific enough on the indented semantics in this situation to consider this a bug. The original R-level implementation of lapply was lapply - function(X, FUN, ...) { FUN - match.fun(FUN)

Re: [Rd] a question about optim.R and optim.c in R

2014-07-07 Thread Michael Weylandt
On Jul 7, 2014, at 4:34 PM, Zhiyuan Dong zhiyuan.d...@gmail.com wrote: Hi, I am learning R by reading R source code. Here is one question I have about the optim function in R. The context : In the optim.R, after all the prep steps, the main function call call is made via :

Re: [Rd] Unsubscribe me please

2014-04-17 Thread Michael Weylandt
On Apr 17, 2014, at 20:50, Mengsteab Aregay mengsteab.are...@gmail.com wrote: I don't want to accept anymore emails from https://stat.ethz.ch/mailman/listinfo/r-devel. can u please unsubscribed me. Read your own link. It has un-subscription instructions. Thanks you [[alternative

Re: [Rd] The case for freezing CRAN

2014-03-20 Thread Michael Weylandt
On Mar 20, 2014, at 8:19, Therneau, Terry M., Ph.D. thern...@mayo.edu wrote: There is a central assertion to this argument that I don't follow: At the end of the day most published results obtained with R just won't be reproducible. This is a very strong assertion. What is the evidence

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Michael Weylandt
On Mar 19, 2014, at 18:42, Joshua Ulrich josh.m.ulr...@gmail.com wrote: On Wed, Mar 19, 2014 at 5:16 PM, Jeroen Ooms jeroen.o...@stat.ucla.edu wrote: On Wed, Mar 19, 2014 at 2:59 PM, Joshua Ulrich josh.m.ulr...@gmail.com wrote: So implementation isn't a problem. The problem is that

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Michael Weylandt
On Mar 19, 2014, at 22:17, Gavin Simpson ucfa...@gmail.com wrote: Michael, I think the issue is that Jeroen wants to take that responsibility out of the hands of the person trying to reproduce a work. If it used R 3.0.x and packages A, B and C then it would be trivial to to install that

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Michael Weylandt
On Mar 19, 2014, at 22:45, Jeroen Ooms jeroen.o...@stat.ucla.edu wrote: On Wed, Mar 19, 2014 at 6:55 PM, Michael Weylandt michael.weyla...@gmail.com wrote: Reading this thread again, is it a fair summary of your position to say reproducibility by default is more important than giving users

Re: [Rd] How to import S3 method

2014-03-05 Thread Michael Weylandt
On Mar 4, 2014, at 10:21, Wang, Zhu zw...@connecticutchildrens.org wrote: Dear Helpers, I wanted to import an S3 method from package glmnet to my own R package. Specifically, I tried the following: plot.glmreg=function(x, xvar=c(norm,lambda,dev),label=FALSE,shade=TRUE, ...)

Re: [Rd] user defined macros in Rd files

2013-10-12 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Oct 9, 2013, at 21:18, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 13-10-09 7:54 PM, Henrik Bengtsson wrote: On my related wishlist: A standardized mechanism to 'R CMD build' for building man/*.Rd from any input format (e.g. roxygen and so on) analogously how we can now build

Re: [Rd] inconsistency/bug in recordPlot/replayPlot

2013-09-24 Thread Michael Weylandt
https://stat.ethz.ch/pipermail/r-devel/2013-September/067563.html Same instructions still apply -- this is a self-subscription list. M On Sep 24, 2013, at 0:42, Eric Malitz eric.mal...@gmail.com wrote: take me off here On Mon, Sep 23, 2013 at 10:31 PM, Gabriel Becker

Re: [Rd] R CMD check fails in R-devel r63910

2013-09-13 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Sep 13, 2013, at 7:44, alku a...@dtu.dk wrote: Hi, The R CMD check is successful in R 3.0.1 but fails to install package lmerTest under R-devel r63910, Here is what I get: ** preparing package for lazy loading Error in reconcilePropertiesAndPrototype(name, slots, prototype,

Re: [Rd] [PATCH] show vector length in summary()

2013-09-10 Thread Michael Weylandt
On Sep 10, 2013, at 18:38, Simon Urbanek simon.urba...@r-project.org wrote: On Sep 10, 2013, at 12:56 PM, Sam Steingold wrote: * Dirk Eddelbuettel r...@qrovna.bet [2013-09-10 10:21:33 -0500]: On 10 September 2013 at 10:32, Sam Steingold wrote: | (summary.default): show the vector

Re: [Rd] Accessing the formals() of a non-exported method without :::?

2013-08-23 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Aug 23, 2013, at 11:15, Gavin Simpson ucfa...@gmail.com wrote: Dear List, I'm in the process of making tweaks to my various R packages following changes in r-devel for package checks. I'm wondering about the one use of ::: in one of my packages. I am arranging for a call to a

Re: [Rd] Confusion about Depends:, Imports:, Enhances:, import(), inportFrom()

2013-08-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Aug 22, 2013, at 9:09, Michael Friendly frien...@yorku.ca wrote: In checking my vcdExtra package, the following NOTE newly appeared (R-Forge, using R version 3.0.1 Patched (2013-08-20 r63635)) Package in Depends field not imported from: ‘gnm’ These packages needs to imported from for

Re: [Rd] Confusion about Depends:, Imports:, Enhances:, import(), inportFrom()

2013-08-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Aug 22, 2013, at 15:33, Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Thu, Aug 22, 2013 at 10:05 AM, R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com wrote: On Aug 22, 2013, at 9:09, Michael Friendly frien...@yorku.ca wrote: In checking my vcdExtra

Re: [Rd] Extending suggestion for stopifnot

2013-08-20 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Aug 20, 2013, at 14:41, ivo welch ivo.we...@anderson.ucla.edu wrote: A second enhancement would be a smart string, which knows that everything inside {{...}} should be evaluated. I think one the HTML templating libraries (whisker or mustache or some such) provides something not unlike

Re: [Rd] Depends vs Imports

2013-07-31 Thread R. Michael Weylandt
On Wed, Jul 31, 2013 at 7:35 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Jul 31, 2013, at 7:14 PM, Paul Gilbert wrote: I am being asked to modernize the Depends line in the DESCRIPTION file of some packages. Writing R Extensions says: The general rules are Packages whose

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread R. Michael Weylandt
On Wed, Jul 17, 2013 at 9:58 AM, Brian Rowe r...@muxspace.com wrote: Hello, Section 4.3.2 of the R language definition [1] states that argument matching to formal arguments is a 3-pass process to match arguments to a function. An error is generated if any (supplied) arguments are left

Re: [Rd] Inconsistent results from .C()

2013-05-21 Thread R. Michael Weylandt
It might also help if you can point us to the C code to help debug. MW On Tue, May 21, 2013 at 10:53 AM, Robin Evans rj...@cam.ac.uk wrote: I should add to this that I'm running on Scientific Linux 6. I later noticed that the bug only seems to occur when I run the code from Rstudio, and not

Re: [Rd] Latex errors (build on windows)

2013-05-03 Thread R. Michael Weylandt
Can you post the offending package? On Fri, May 3, 2013 at 8:46 AM, Knut Krueger r...@knut-krueger.de wrote: Where can I found hepl about latex errors: the R CMD check tells me less, but: * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically

Re: [Rd] Catch SIGINT from user in backend C++ code

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 12:50 AM, Jewell, Chris c.p.jew...@massey.ac.nz wrote: Hi, I was wondering if anybody knew how to trap SIGINTs (ie Ctrl-C) in backend C++ code for R extensions? I'm writing a package that uses the GPU for some hefty matrix operations in a tightly coupled parallel

Re: [Rd] diag() when input is a numeric scalar

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 12:35 AM, philchalmers rphilip.chalm...@gmail.com wrote: Hi All, I'm wondering why when passing a single numeric value that contains any decimals to diag() that the value is silently coerced to a integer for constructing an identify matrix. To me, an input like

Re: [Rd] Minimal build of R ...

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 5:12 PM, Jony Hudson jony.hud...@imperial.ac.uk wrote: Hi, I'm trying to cross-compile R to javascript so that it can run in a web-browser. Take as long as you need to stop laughing. So, as I was saying - I want to try and get a build of R running in the browser. [If

Re: [Rd] [R] Rpy2 and Mac OS X 10.8.3

2013-04-02 Thread Michael Weylandt
Moving to the more on topic R-devel list. On Apr 2, 2013, at 2:14, Craig Watson craig.o.wat...@gmail.com wrote: I am having a strange problem. I have been using python + rpy2 on my Mac for quite sometime now. I recently upgraded to OS X 10.8 from 10.6 and that's when the problem began.

Re: [Rd] Why does typeof() modify an object's named field?

2013-03-23 Thread R. Michael Weylandt
On Fri, Mar 22, 2013 at 7:43 PM, Josh O'Brien joshmobr...@gmail.com wrote: Some other functions that query the nature of an object (e.g. class(), length(), attributes()) do not modify the object's named field. Is there a reason that typeof() should? Because it's not implemented as a primitive

[Rd] Typo-let in NEWS.Rd

2013-03-20 Thread R. Michael Weylandt
Applicable against current trunk and (I believe) R-3.0.0 branch. Michael Index: doc/NEWS.Rd === --- doc/NEWS.Rd (revision 62340) +++ doc/NEWS.Rd (working copy) @@ -183,7 +183,7 @@ through as bytes inputs invalid in the

Re: [Rd] Viewing Compelete Decision Tree in R - R.2.15.2 - Wndows7 32bit

2013-03-14 Thread R. Michael Weylandt
Not an R-devel question. Wait for a response for your cross post to R-help. MW On Thu, Mar 14, 2013 at 9:51 AM, Manoj G mano...@isim.net.in wrote: I tried drawing some decision trees. Since the number of levels are more in the tree, the plot result for the decision tree is not clear and

Re: [Rd] It's a BUG or a Feature? Generating seq break comparing operators

2013-02-07 Thread R. Michael Weylandt
R FAQ 7.31 Cheers, MW On Thu, Feb 7, 2013 at 10:05 AM, Davide Rambaldi davide.ramba...@ieo.eu wrote: Hello everybody: I get a strange behavior with seq, take a look at this: msd - seq(0.05,0.3, 0.01) msd[13] [1] 0.17 class(msd) [1] numeric class(msd[13]) [1] numeric typeof(msd[13])

Re: [Rd] Scanning a R script for potentially insidious commands

2012-12-19 Thread Michael Weylandt
On Dec 18, 2012, at 12:48 PM, Etienne Sévin e.se...@epiconcept.fr wrote: Hey all, We are building a R connector for our web application. The user can upload a script so it can be executed on the server. Is there a way to scan the script for insidious commands (writing on the disk for

Re: [Rd] [R] choose folder interactively

2012-11-28 Thread R. Michael Weylandt
On Wed, Nov 28, 2012 at 12:47 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 12-11-28 7:39 AM, Ivan Calandra wrote: Dear users, I am looking for a function to choose a folder interactively, just like file.choose() but for a folder. choose.dir() does exist on Windows, so you could

Re: [Rd] [R] error in plot(table(c('a','a')))

2012-11-28 Thread R. Michael Weylandt
Should I file an issue for this in the bug tracker? Slighly rearranged discussion with reproducible example follows on below. Em 26-11-2012 21:39, R. Michael Weylandt escreveu: On Mon, Nov 26, 2012 at 2:41 PM, Ludo Pagie l.pa...@nki.nl wrote: tbl.char1 - table(c('a','a')) tbl.char2 - table

Re: [Rd] Retrieving data from aspx pages

2012-10-30 Thread R. Michael Weylandt
Hi Jose, I think this is more of an r-help question so I'm going to forward your question there: R-devel is really for the development of R itself, not development with R. Cheers, Michael On Mon, Oct 29, 2012 at 8:11 PM, jose ramon mazaira jram...@gmail.com wrote: Hi. I'm trying to write an

[Rd] Small Extension to license()/licence()

2012-09-30 Thread R. Michael Weylandt
By analogy with maintainer(), I suggest extending license() to give the licensing terms of packages as well as R itself when prompted. Below is a small patch in that direction. This won't break anything and imposes no significant maintenance burden; it has the advantage of making it ever so

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread R. Michael Weylandt
On Tue, Sep 11, 2012 at 4:35 PM, Milan Bouchet-Valat nalimi...@club.fr wrote: Le mardi 11 septembre 2012 à 16:53 +0200, Basil Abou El-Komboz a écrit : Dear useR's, today I stumbled over an interesting phenomenon: First, I created a named numeric vector with a certain class and several

[Rd] Don't dput() data frames?

2012-08-28 Thread R. Michael Weylandt
/src/main/attrib.c contains this comment in row_names_gets(): /* This should not happen, but if a careless user dput()s a data frame and sources the result, it will */ which svn blame says Prof Ripley placed there in r39830 with the commit message correct the work of dput() on the

Re: [Rd] Don't dput() data frames?

2012-08-28 Thread R. Michael Weylandt
On Tue, Aug 28, 2012 at 1:00 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Aug 28, 2012, at 1:51 PM, R. Michael Weylandt wrote: /src/main/attrib.c contains this comment in row_names_gets(): /* This should not happen, but if a careless user dput()s a data frame

Re: [Rd] [BUG?] utils::prompt(name=f)

2012-07-30 Thread R. Michael Weylandt
Just for the record, I don't see that error with 2.15.0 or with R-Devel 60040-someodd. Both display foo - function(x) cat(x, \n) prompt(name = foo) Created file named ‘foo.Rd’. Edit the file and move it to the appropriate directory. Best, Michael On Sun, Jul 29, 2012 at 12:17 PM, Paul Roebuck

Re: [Rd] questions on R CMD INSTALL et al

2012-07-24 Thread R. Michael Weylandt
On Tue, Jul 24, 2012 at 2:30 PM, luxInteg lux-in...@btconnect.com wrote: Greetings, I am learning R My machine has these; CPU: 3cores amd64 OS pure-64bit CBLFS liux compiled from sources (kernel 3.2.1, gcc-4.6.2 R-2.15 When I compiled R the compiler spewed out lines like these:-

Re: [Rd] large dataset - confused

2012-07-23 Thread R. Michael Weylandt
1) Move this off R-devel to R-help. 2) Read the IO manual here: http://cran.r-project.org/manuals.html 3) You probably want to look at the read.table() function's help page by typing ?read.table Michael On Mon, Jul 23, 2012 at 12:32 PM, walcotteric walco...@msu.edu wrote: I'm trying to load a

[Rd] Interaction parameter for split()

2012-06-08 Thread R. Michael Weylandt
Tal's wonderful aggregator recently reblogged this post: http://rsnippets.blogspot.com/2012/06/you-should-not-use-split-in-production.html It's a rather obscure little buglet [and probably only arises in pathological cases], but I don't know if it's not a case that deserves a bit of consideration

Re: [Rd] Object-oriented programming (OOP)

2012-05-15 Thread R. Michael Weylandt
R has multiple OO paradigms, but since you're starting from a point of I want object oriented, I'd guess you would be interested in the S4 paradigm which is stricter rather than the far more sane S3 system. If S4 is for you, there are some good links here:

[Rd] StructTS Examples

2012-05-14 Thread R. Michael Weylandt
In the examples for StructTS -- ($RHOME)/library/stats/man/StructTS.Rd -- could par(mfrow = c(4, 1)) plot(log10(UKgas)) plot(cbind(fitted(fit), resids=resid(fit)), main = UK gas consumption) become plot(log10(UKgas)) par(mfrow = c(4, 1)) plot(cbind(fitted(fit), resids=resid(fit)), main = UK gas

Re: [Rd] creating a package in R

2012-04-29 Thread R. Michael Weylandt michael.weyla...@gmail.com
http://cran.r-project.org/doc/manuals/R-exts.pdf Ships with every distribution of R Michael On Apr 29, 2012, at 10:08 AM, nossa hamdi_i...@hotmail.fr wrote: Please give me the necessary links that permits me to create my own package inR -- View this message in context:

[Rd] Typo in ?Logistic

2012-03-26 Thread R. Michael Weylandt
In the source section of ?rlogis, we see: Source: ‘[dpr]logis’ are calculated directly from the definitions. ‘rlogis’ uses inversion. Should that read [dpq]logis instead? Michael __ R-devel@r-project.org mailing list

[Rd] enableJIT(3) with Primitives

2012-03-20 Thread R. Michael Weylandt
I'm not sure if this is a bug or expected behavior, but I don't see anything in the documentation that explains it, so I thought I'd mention it: ~ michaelweylandt$ R -q --vanilla library(compiler) enableJIT(3) `+` # Throws an error `+` # Throws a warning `+` # Prints the primitive as expected