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

2014-09-03 Thread Ross Boylan
nto the ten-year > return window. That is not much information 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 gu

Re: [R] Building R for better performance

2014-09-01 Thread Ross Boylan
resting results. I'm 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] Redefining reference class makes persistent object partly unreadable

2014-07-25 Thread Ross Boylan
y results. Now I 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 gui

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) > > &g

[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.al

Re: [R] R seems to mangle LD_LIBRARY_PATH

2014-03-11 Thread Ross Boylan
me/ross/install/lib --with-mpi=/home/ross/install --with-Rmpi-type=OPENMPI' Maybe the --with-mpi path needs a /lib. Ross > > > On 12/03/14 16:00, Ross Boylan wrote: > > > I am trying to ensure that a directory is searched first, but it gets > > stuck at the

[R] R seems to mangle LD_LIBRARY_PATH

2014-03-11 Thread Ross Boylan
t do I need to do so that my personal library is searched first? Running Debian squeeze. 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] 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 > > up

[R] minor version upgrade requires library refresh?

2014-02-13 Thread Ross Boylan
and 3.0.1. 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 th

[R] the unwanted persistence of refClass methods

2014-02-13 Thread Ross Boylan
;- setRefClass("foo", method=list(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.or

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 re

[R] memory use of copies

2014-01-23 Thread Ross Boylan
=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 a google-managed email a

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 mem

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

2013-12-27 Thread Ross Boylan
0 116692 expressionbytecode externalptr weakref raw 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 __

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 provi

[R] spending most of my time in assignments?

2013-12-19 Thread Ross Boylan
ot;data.frame", dataFormula="formula", mm="matrix")) Does it matter that, e.g., a model frame is more 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-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] 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.

Re: [R] adding tables [partial solution]

2013-12-09 Thread Ross Boylan
Ross > > -Roy > On Dec 9, 2013, at 4:09 PM, 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

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 a

[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 # apparen

[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 W

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

[R] save/load doubles memory

2013-09-17 Thread Ross Boylan
this case I could not save r4 and recreate it, but is there a more general 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

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 m

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

2013-07-30 Thread Ross Boylan
ubject 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

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

2013-07-26 Thread Ross Boylan
order 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 fun

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

2013-07-26 Thread Ross Boylan
ange the format of the files because it's not my package. 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] 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 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 give to anyone who

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

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

2013-04-04 Thread Ross Boylan
vel names to something brief is not very attractive. 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://

[R] temp seems ineffective in SANN (optim)

2013-02-26 Thread Ross Boylan
istory9-history5), na.rm=TRUE) [1] 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/l

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

2013-02-22 Thread Ross Boylan
Feb 21, 2013 at 8:53 PM, Ross Boylan <mailto:r...@biostat.ucsf.edu>> wrote: > > I want to analyze binary, multinomial, and count outcomes (as well > as the occasional continuous one) for clustered data. > The more I search the less I know, and so I'm hoping th

[R] How to do generalized linear mixed effects models

2013-02-21 Thread Ross Boylan
ather avoid it. Thanks for any guidance. Summarizing, 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] 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 e

[R] function coverage

2013-01-14 Thread Ross Boylan
e code 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.

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 loca

[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 /C:/Users/rdboylan/Documents/R/R-2.15.2/library/base/html/ab

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

2011-07-18 Thread Ross Boylan
This would > result > in agfitfn() being called with arguments beta, melvin=someThing, > clyde=someThingElse > and irving=whatEver, for various values of beta (as optim() searched > over various values > of beta for the optimum). > > Note that in the call to foo() the

[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: : ... may be used in an incorrect context: ‘optim(init, agfitfn, ...)’ Can anyone tell me what this message means? My searches ha

[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 tr

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

[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 glitch

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 runni

[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 ht

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

2009-08-16 Thread Ross Boylan
ES > # colClasses = c(...) ==> DEFINES COLUMN CLASSES > test <- read.fwf(data, header = FALSE, width = c(22, 10), > col.names = c("city", "population"), > colClasses = c("character", "numeric")) > > close(data)

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

2009-08-16 Thread Ross Boylan
dary. 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 https://stat.ethz.ch/mailman/listi

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

2009-07-17 Thread Ross Boylan
rm costs in time, 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 no

[R] matrix subsetting assignment with logical mask

2009-07-16 Thread Ross Boylan
,2] [,3] [1,]100 [2,]258 [3,] 3 09 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/po

[R] rsprng, snow, rmpi interactions

2008-03-04 Thread Ross Boylan
le within the existing libraries. Thanks 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: > >>

[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,

[R] scaling and optim

2008-02-07 Thread Ross Boylan
?optim says, in describing the control parameter, 'fnscale' An overall scaling to be applied to the value of 'fn' and 'gr' during optimization. If negative, turns the problem into a maximization problem. Optimization is performed on 'fn(par)/fnscale'. 'parsc

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"

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

2007-11-15 Thread Ross Boylan
FALSE 33 18 11 FALSE 44 18 44 FALSE 55 18 44 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] Dep