Re: [Rd] model.matrix metadata

2014-10-17 Thread Charles Berry
Patrick O'Reilly gmail.com> writes: > > Hi, > > As far as I am aware, the model.matrix function does not return > perfect metadata on what each column of the model matrix "means". > > The columns are named (e.g. age:genderM), but encoding the metadata as > strings can result in ambiguity. For

Re: [Rd] Advice on package design for handling of dots in a formula

2014-10-15 Thread Charles Berry
Greg Ridgeway gmail.com> writes: > > I am working on a new package, one in which the user needs to specify the > role that different variables play in the analysis. Where I'm stumped is > the best way to have users specify those roles. [delete discussion of dot in formula and specials] > > Doe

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Charles Berry
Keirstead, James E imperial.ac.uk> writes: > > Hi, > > I’m developing a package and would like to include some data sets for > internal use only, e.g. > configuration parameters for functions. What is the preferred way of > doing this? If I put them in data/, > then R CMD check asks me to d

Re: [Rd] create R package include Fortran source code.

2014-07-21 Thread Charles Berry
yiqun yang gmail.com> writes: > > Thank you for your reply. > First I try "R CMD INSTALL barpkg", then it gives similiar things: > - [deleted] - > 2) I don't know how to chec

Re: [Rd] S3 - how to implement "colnames<-"

2014-05-14 Thread Charles Berry
Witold E Wolski gmail.com> writes: > > Have a class for which I would like to provide a "colnames<-.myclass" > function so that > > colnames(myintsance) <- c("a","b","c") > can be called. `colnames<-` is not generic as Luca noted. But `dimnames<-` is. If you write a suitable `dimnames<-.myi

Re: [Rd] vapply confusion

2014-04-12 Thread Charles Berry
Dominick Samperi gmail.com> writes: > > The following code seems to contain an inconsistency in > the behavior of vapply(). Am I missing something here? > > ## This function assumes v is a 3d vector, beta a scalar. > f3d <- function(v,beta) { v+beta } > > ## This expression applies f3d to a ve