Re: [ESS] Developing R packages under ESS

2018-03-08 Thread Ross Boylan
On Thu, Mar 08, 2018 at 03:29:14PM +, Sparapani, Rodney wrote: > Hi Ross: > I agree with Rich and Vitalie. This just works out of the box: no .emacs > fiddling. > Perhaps, you are tripping over the recent tightening of the interface. The > last bullet point > in the New features section of

Re: [ESS] Developing R packages under ESS

2018-03-08 Thread Ross Boylan
On Thu, Mar 08, 2018 at 04:22:04PM +0100, Vitalie Spinu wrote: > > > >> On Wed, Mar 07 2018 18:29, Ross Boylan wrote: > > > The file I opened initially, the one that sources all the others, is above > > the > > package directory. It sources files

Re: [ESS] Developing R packages under ESS

2018-03-08 Thread Ross Boylan
On Wed, Mar 07, 2018 at 09:55:51PM -0500, Richard M. Heiberger wrote: > My guess is that starting from outside the package misled ESS. > Try this sequence. > > library(mypackage) > ## then open the R source in directory mypackage/R/ > ## modify the R files and C-c C-c revised functions. They

Re: [ESS] Developing R packages under ESS

2018-03-07 Thread Ross Boylan
On Wed, Mar 07, 2018 at 08:52:39PM -0500, Richard M. Heiberger wrote: > normally, it just works. Do you have a recent ESS? git tip as of yesterday. > Try turning off > your .emacs and see if that helps. > My .emacs file loads ESS. I suppose I could try an .emacs file that only does that.

Re: [ESS] make problems with latest git

2018-03-06 Thread Ross Boylan
On Tue, Mar 06, 2018 at 10:18:13AM -0800, Ross Boylan wrote: ... > have -no-init-file). So I renamed it and tried again in the cloned ESS3. > Results attached. Lots of warnings, but again it seems to get through > the ess-sas stuff that was a problem, only to fail with > ess-r-xref.e

Re: [ESS] make problems with latest git

2018-03-06 Thread Ross Boylan
On Tue, Mar 06, 2018 at 02:48:27PM +, Sparapani, Rodney wrote: > Hi Ross: > > I can’t reproduce your problem here. From your make > error below, it seems that ess-sas-a.el might be tampered. > Could you refresh that file from > git and rebuild to check? > > > [ess-sas-d:] require 'ess-sas-l

[ESS] make problems with latest git

2018-03-05 Thread Ross Boylan
Attempting to follow the installation instructions I tried to run make. It failed because EMACS=t when running a shell inside emacs 24.4.1. The Makeconf file included by the Makefile in the lisp directory includes the line EMACS ?= emacs which set EMACS = emacs unless it is already set (which it

[R] favorable mention and use of R on the net

2014-09-03 Thread Ross Boylan
on which to base a long-run sell decision. Ross Boylan __ 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, minimal, self

Re: [R] Building R for better performance

2014-09-01 Thread Ross Boylan
curious how the single core performance of the different compiler compare. Sometimes it's desirable to keep code to a single core, e.g., if you have assigned n jobs to n cores you don't want each job trying to grab more cores. Ross Boylan __ R-help@r

[R] Redefining reference class makes persistent object partly unreadable

2014-07-25 Thread Ross Boylan
want to display them in other forms, and so am trying to shift to returning a summary object. Thanks. Ross Boylan __ 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] no line number from error

2014-04-24 Thread Ross Boylan
r1 - totalEffect.all(dsim, simjob) Error: attempt to apply non-function traceback() 1: totalEffect.all(dsim, simjob) class(totalEffect.all) [1] function How can I find out where in totalEffect.all the error is arising? My only theory for the lack of line number was that totaEffect.all was

Re: [R] no line number from error

2014-04-24 Thread Ross Boylan
On Thu, 2014-04-24 at 19:29 -0400, Duncan Murdoch wrote: On 24/04/2014, 6:40 PM, Ross Boylan wrote: r1 - totalEffect.all(dsim, simjob) Error: attempt to apply non-function traceback() 1: totalEffect.all(dsim, simjob) class(totalEffect.all) [1] function How can I find

Re: [R] R seems to mangle LD_LIBRARY_PATH

2014-03-12 Thread Ross Boylan
/14 16:00, Ross Boylan wrote: I am trying to ensure that a directory is searched first, but it gets stuck at the end of LD_LIBRARY_PATH: $ export LD_LIBRARY_PATH=~/install/lib $ R R version 3.0.2 (2013-09-25) -- Frisbee Sailing Copyright (C) 2013 The R Foundation for Statistical

[R] R seems to mangle LD_LIBRARY_PATH

2014-03-11 Thread Ross Boylan
. Ross Boylan __ 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, minimal, self-contained, reproducible code.

[R] pre-allocation not always a timesaver

2014-02-27 Thread Ross Boylan
The R Inferno advises that if you are building up results in pieces it's best to pre-allocate the result object and fill it in. In some testing, I see a benefit with this strategy for regular variables. However, when the results are held by a class, the opposite seems to be the case. Comments?

Re: [R] minor version upgrade requires library refresh?

2014-02-18 Thread Ross Boylan
On Fri, 2014-02-14 at 17:47 -0800, David Winsemius wrote: On Feb 13, 2014, at 11:36 AM, Ross Boylan wrote: If R changes from 3.0.1 to 3.0.2, or more generally from m.n.p to m.n.q, is it necessary to refresh libraries to match the version, e.g., with update.packages(checkBuilt=TRUE, ask

[R] the unwanted persistence of refClass methods

2014-02-13 Thread Ross Boylan
(f=function(x) 2*x)) a$f(10) [1] 30 b - foo() b$f(10) [1] 20 Ross Boylan __ 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

[R] minor version upgrade requires library refresh?

2014-02-13 Thread Ross Boylan
. But I'm not sure. I'm interested in Unix as well as Windows. Thanks. Ross Boylan [[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

Re: [R] memory use of copies

2014-01-28 Thread Ross Boylan
, Martin Morgan wrote: Hi Ross -- On 01/23/2014 05:53 PM, Ross Boylan wrote: [Apologies if a duplicate; we are having mail problems.] I am trying to understand the circumstances under which R makes a copy of an object, as opposed to simply referring to it. I'm talking about what goes

[R] memory use of copies

2014-01-23 Thread Ross Boylan
))) !+ bar(x=acoef)}) gc() used (Mb) gc trigger(Mb) max used(Mb) Ncells 2652191 141.74170209 222.84170209 222.8 Vcells 839752699 6406.9 1711485496 13057.6 1711485493 13057.6 # + 305 Mb Thanks. Ross Boylan P.S. I also tried posting this from

[R] gc() vs memory.profile()

2013-12-27 Thread Ross Boylan
S4 1 656044195 708 738 23935 # by eye, the only change is raw, from 735 to 738. R 3.0.1 running on Debian GNU/Linux squeeze. Ross Boylan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] gc() vs memory.profile()

2013-12-27 Thread Ross Boylan
On Fri, 2013-12-27 at 16:47 -0600, Hadley Wickham wrote: For your original case, you may find it more useful to do memory + line profiling (e.g. as visualised by https://github.com/hadley/lineprof) to figure out what's going on. Hadley I've been trying memory and line profiling, but

Re: [R] spending most of my time in assignments?

2013-12-26 Thread Ross Boylan
On Thu, 2013-12-19 at 20:37 -0500, Duncan Murdoch wrote: On 13-12-19 6:37 PM, Ross Boylan wrote: My code seems to be spending most of its time in assignment statements, in some cases simple assignment of a model frame or model matrix. Can anyone provide any insights into what's going

[R] spending most of my time in assignments?

2013-12-19 Thread Ross Boylan
than a vanilla data frame? I thought assignment, given R's lazy copying behavior, was essentially resetting a pointer, and so should be fast. Or maybe the time is going to garbage collecting the previous contents of the slots? Ross Boylan __ R-help@r

[R] adding tables

2013-12-09 Thread Ross Boylan
Can anyone recommend a good way to add tables? Ideally I would like t1 - table(x1) t2 - table(x2) t1+t2 It t1 and t2 have the same levels this works fine, but I need something that will work even if they differ, e.g., t1 1 2 4 5 2 1 1 1 t2 - table(c(10, 11, 12, 13)) t1+t2 # apparently

Re: [R] adding tables [partial solution]

2013-12-09 Thread Ross Boylan
Answering myself... On Mon, 2013-12-09 at 15:59 -0800, Ross Boylan wrote: Can anyone recommend a good way to add tables? For count data, which were my main concern, it looks as if tabulate with nbins will work. I'm not sure how this works with a cross-classifying factor, which I will also need

Re: [R] adding tables [partial solution]

2013-12-09 Thread Ross Boylan
9, 2013, at 4:09 PM, Ross Boylan r...@biostat.ucsf.edu wrote: Answering myself... On Mon, 2013-12-09 at 15:59 -0800, Ross Boylan wrote: Can anyone recommend a good way to add tables? For count data, which were my main concern, it looks as if tabulate with nbins will work. I'm not sure

Re: [R] adding tables [solution]

2013-12-09 Thread Ross Boylan
On Mon, 2013-12-09 at 16:09 -0800, Ross Boylan wrote: Answering myself... On Mon, 2013-12-09 at 15:59 -0800, Ross Boylan wrote: Can anyone recommend a good way to add tables? For count data, which were my main concern, it looks as if tabulate with nbins will work. I'm not sure how

[R] somewhat ineffective suppressing intercepts

2013-09-26 Thread Ross Boylan
Suppressing the intercept and contr.sum coding are not quite working as I expect: mf - data.frame(A=C(factor(c(a, b, c)), contr.sum)) mm - model.matrix(~0+A, data=mf) mm Aa Ab Ac 1 1 0 0 2 0 1 0 3 0 0 1 What I expect (and want) is A1 A2 1 10 2 01 3 11 When I do

Re: [R] save/load doubles memory [oops]

2013-09-17 Thread Ross Boylan
On Tue, 2013-09-17 at 12:06 -0700, Ross Boylan wrote: Saving and loading data is roughly doubling memory use. I'm trying to understand and correct the problem. Apparently I had the process memories mixed up: R1 below was the one with 4G and R2 with 2G. So there's less of a mystery. However

[R] save/load doubles memory

2013-09-17 Thread Ross Boylan
solution? If I did myboth - list(r4, sflist) and save(myboth, file=myfile) would that be enough to keep the objects together? Judging from the size of the file, it seems not. Even if the myboth trick worked it seems like a kludge. Ross Boylan __ R-help@r

Re: [R] save/load doubles memory [oops]

2013-09-17 Thread Ross Boylan
On Tue, 2013-09-17 at 14:39 -0500, luke-tier...@uiowa.edu wrote: At this point R's serialization format only preserves sharing of environments; any other sharing is lost. Changing this will require an extensive rewrite of serialization. It would be useful to have this, especially as we are

Re: [R] Error: Line starting ' ...' is malformed!

2013-07-30 Thread Ross Boylan
(DESCRIPTION isn't the only one) have also caused trouble for git (even on Windows 7), since it thinks they are binary. Any advice about what to do? I'm reluctant to change the format of the files because it's not my package. Ross Boylan __ R

[R] Error: Line starting ' ...' is malformed!

2013-07-26 Thread Ross Boylan
, will survive email; I stripped them out of the subject line. The files (DESCRIPTION isn't the only one) have also caused trouble for git (even on Windows 7), since it thinks they are binary. Any advice about what to do? I'm reluctant to change the format of the files because it's not my package. Ross

[R] matching columns of model matrix to those in original data.frame

2013-07-26 Thread Ross Boylan
of the term.labels match the order of columns for factors in a terms object? The documentation says the model.matrix assign attribute uses the ordering of terms.labels. If anyone can tell me if this approach is reliable, or of one that is, I would appreciate it. Ross Boylan Proposed function

Re: [R] the joy of spreadsheets (off-topic)

2013-04-24 Thread Ross Boylan
On 4/17/2013 5:18 AM, Kevin Wright wrote: On Tue, Apr 16, 2013 at 4:33 PM, Jim Lemon j...@bitwrit.com.au wrote: On 04/17/2013 03:25 AM, Sarah Goslee wrote: The final point does relate to Excel and any application that hides what is going on to the casual observer. I will treasure this URL to

Re: [R] model.frame: object is not a matrix [solved]

2013-04-05 Thread Ross Boylan
The problem was that my formula had 2 ~ in it. It also had a lot of duplicate terms, but by themselves they don't cause trouble. Ross On 4/4/2013 5:30 PM, Ross Boylan wrote: Over a decade ago there was a problem with model.frame when the variable names were long: https://stat.ethz.ch

[R] model.frame: object is not a matrix

2013-04-04 Thread Ross Boylan
. However, changing these within the program might be workable. Ross Boylan __ 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

[R] temp seems ineffective in SANN (optim)

2013-02-26 Thread Ross Boylan
] 9.094947e-13 # historyN has a temp of N BTW the values of the objective function have their sign reversed to make it a maximization problem. Ross Boylan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] How to do generalized linear mixed effects models

2013-02-22 Thread Ross Boylan
glmmPQL (in MASS) lme4 gee I think lme4 is what I want, despite the title and the Social Science task page. Ross Boylan P.S. Zero inflated models would be nice too. __ R-help@r-project.org mailto:R-help@r

[R] How to do generalized linear mixed effects models

2013-02-21 Thread Ross Boylan
, the candidates include at least nlme glmmPQL (in MASS) lme4 gee I think lme4 is what I want, despite the title and the Social Science task page. Ross Boylan P.S. Zero inflated models would be nice too. __ R-help@r-project.org mailing list https

[R] developing package: dealing with namespaces

2013-02-04 Thread Ross Boylan
I am tweaking an R package for which I have the source; the relevant code is in R not C. I'm making changes to the package code. What is the best workflow for doing this? I recall the advice used to be to remove the NAMESPACE during development, but I don't think this is possible anymore. For

Re: [R] function coverage [solved?]

2013-01-15 Thread Ross Boylan
On Mon, 2013-01-14 at 13:08 -0800, Ross Boylan wrote: Is there an easy way to identify all the functions called as a result of invoking a function? Getting the calling hierarchy too would be nice, but is definitely not essential. I'm trying to understand someone else's package, which

[R] function coverage

2013-01-14 Thread Ross Boylan
is not active. Thanks. Ross Boylan __ 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, minimal, self-contained, reproducible code.

[R] Help with Help on Windows

2013-01-11 Thread Ross Boylan
R 2.15.2 installed as a regular user on Windows 7. Three issues: 1. There is a start menu item for R 2.15.2 Help that opens a local web page. If I click on packages, then base, then abbreviate I get Firefox can't find the file at

Re: [R] Help with Help on Windows

2013-01-11 Thread Ross Boylan
Thanks to Duncan for all his help. I have one tip to pass on. On 1/11/2013 10:34 AM, Duncan Murdoch wrote: On 11/01/2013 12:49 PM, Ross Boylan wrote: R 2.15.2 installed as a regular user on Windows 7. Three issues: 1. There is a start menu item for R 2.15.2 Help that opens a local web page

[R] may be used in an incorrect context

2011-07-18 Thread Ross Boylan
R CMD check tells me * checking R code for possible problems ... NOTE agexact.fit.rds: ... may be used in an incorrect context: ‘optim(init, agfitfn, ...)’ Warning: anonymous: ... may be used in an incorrect context: ‘optim(init, agfitfn, ...)’ Can anyone tell me what this message means? My

Re: [R] may be used in an incorrect context [solved]

2011-07-18 Thread Ross Boylan
agfitfn() is a function of beta only, just lose the ... argument, and your worries will vanish. cheers, Rolf Turner On 19/07/11 12:48, Ross Boylan wrote: R CMD check tells me * checking R code for possible problems ... NOTE agexact.fit.rds: ... may be used

[R] [R-pkgs] [ANN] mspath analyzes transitions between multiple state with history dependence

2010-01-22 Thread Ross Boylan
Now available on CRAN. Package: mspath Title: Multi-state Path-Dependent Models in Discrete Time Description: Functions for fitting path-dependent (non-Markov) multi-state models to categorical processes observed at arbitrary times, optionally with misclassified responses, and covariates on

[R] R 2.10 under Windows XP: glitches and successes

2009-10-28 Thread Ross Boylan
I just installed 2.10 on XP; ESS is my primary interface. I seem to be able to access all the help files; under 2.8.1 I was having seemingly random problems accessing some help topics (including one day I could and a few days later I couldn't, and vice-versa). That's good. I noticed a few

Re: [R] R 2.10 under Windows XP: glitches and successes

2009-10-28 Thread Ross Boylan
On Wed, 2009-10-28 at 19:03 -0400, Duncan Murdoch wrote: Second, install.packages(intervals) produced the usual line about selecting a mirror, but no selection list popped up. It just sat there until I interrupted the session and reentered the command with a pre-specified repos. I

Re: [R] intervals package dependence on R 2.9.0 [results]

2009-10-24 Thread Ross Boylan
On Sat, 2009-10-24 at 18:47 +0200, Uwe Ligges wrote: Ross Boylan wrote: I notice that the intervals package indicates a dependence on R = 2.9.0. Is there some feature of R 2.9 that intervals depends on, or might it work with R 2.7.1, which I am running? Don't know, but you could try

[R] intervals package dependence on R 2.9.0

2009-10-22 Thread Ross Boylan
I notice that the intervals package indicates a dependence on R = 2.9.0. Is there some feature of R 2.9 that intervals depends on, or might it work with R 2.7.1, which I am running? Thanks. Ross Boylan __ R-help@r-project.org mailing list https

[R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Ross Boylan
: python-rpy1.0.3-2 Python 2.5.2 R 2.7.1 rpy2 is not available in Lenny, though it is in development versions of Debian. Ross Boylan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] good and bad ways to import fixed column data (rpy)

2009-08-16 Thread Ross Boylan
boundary. This was on Debian Lenny: python-rpy1.0.3-2 Python 2.5.2 R 2.7.1 rpy2 is not available in Lenny, though it is in development versions of Debian. Ross Boylan __ R-help@r-project.org mailing list

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Ross Boylan
, if not money, even if users are motivated. Ross Boylan On Thu, 2009-07-16 at 17:40 -0400, Kel Lam wrote: My institute has been heavily dependent on SAS for the past while, and SAS is starting to charge us a very deep amount for license renewal. Since we are a non-profit organization that is definitely

[R] matrix subsetting assignment with logical mask

2009-07-16 Thread Ross Boylan
8 [3,]309 Is there a better way? Ross Boylan __ 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, minimal

[R] rsprng, snow, rmpi interactions

2008-03-04 Thread Ross Boylan
for any help. Ross Boylan __ 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, minimal, self-contained, reproducible code.

Re: [R] stumped by eval

2008-02-13 Thread Ross Boylan
On Wed, 2008-02-13 at 11:18 +0100, Peter Dalgaard wrote: Berwin A Turlach wrote: G'day Peter, On Wed, 13 Feb 2008 08:03:07 +0100 Peter Dalgaard [EMAIL PROTECTED] wrote: Ross Boylan wrote: In the following example, the inner evaluation pulls in the global value

[R] stumped by eval

2008-02-12 Thread Ross Boylan
In the following example, the inner evaluation pulls in the global value of subset (a function) rather than the one I thought I was passing in (a vector). Can anyone help me understand what's going on, and what I need to do to fix the problem? f0 - function(formula, data,

Re: [R] Why is model.matrix creating 2 columns for boolean?

2007-11-19 Thread Ross Boylan
On Sat, 2007-11-17 at 09:51 -0800, Ben Bolker wrote: Ross Boylan wrote: I have a data frame reading that includes a logical variable OLT along with response variable Reading and predictor True (BOTH are numeric variables; it's True as in the true value). When I suppress

[R] Why is model.matrix creating 2 columns for boolean?

2007-11-15 Thread Ross Boylan
FALSE R 2.5.1-2 on Debian GNU/Linux, running inside ESS. -- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [EMAIL PROTECTED] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San