[R] Windows Installation Without Third-Party Packages

2015-04-09 Thread Elliot Joel Bernstein
I am trying to install R for Windows, but when I use the installer provided on CRAN, a number of third-party packages are installed by default (i.e. lattice, Matrix, codetools, etc.). If R is installed with administrator privileges, so it's available for all users, non-administrators can't update

Re: [R] Repeated Aggregation with data.table

2012-09-21 Thread Elliot Joel Bernstein
)), by = eval(parse(text = sprintf(list(%s), paste(x, collapse=,] I think that's a pretty ugly solution (although it does work), but I haven't come up with anything better. Any suggestions? Thanks. - Elliot On Tue, Sep 11, 2012 at 11:33 AM, Elliot Joel Bernstein elliot.bernst

Re: [R] Repeated Aggregation with data.table

2012-09-11 Thread Elliot Joel Bernstein
(). In the example: flist - expression( list(mean.z = mean(z), sd.z = sd(z)) ) dat[ , eval(flist), list(x)] x mean.z sd.z 1: 2 0.04436034 1.039615 2: 3 -0.06354504 1.077686 3: 1 -0.08879671 1.066916 -- David. A.K. - Original Message - From: Elliot Joel Bernstein

[R] Repeated Aggregation with data.table

2012-08-07 Thread Elliot Joel Bernstein
to do that? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn Street | Cambridge, MA | 02138 Phone: (617) 503-4619 | Email: elliot.bernst...@fdopartners.com __ R-help@r-project.org mailing list

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Elliot Joel Bernstein
Ecdf(quantile(x, probs = ppoints(500, a=1))) If you don't like to do this yourself, ecdfplot() in latticeExtra will allow library(latticeExtra) ecdfplot(x, f.value = ppoints(500, a=1)) -Deepayan -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn

[R] Error Installing Package with Dependency on Matrix

2012-07-31 Thread Elliot Joel Bernstein
the dependency on Matrix, it installs fine. I'm using R 2.15.1 on linux, and version 1.0-6 of the Matrix package. Can anyone explain what's going on here? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn Street | Cambridge, MA | 02138 Phone: (617

Re: [R] Error Installing Package with Dependency on Matrix

2012-07-31 Thread Elliot Joel Bernstein
’ * removing ‘/home/ebernstein/Rlib_2.15.1/temp’ If I remove the dependency on Matrix, it installs fine. I'm using R 2.15.1 on linux, and version 1.0-6 of the Matrix package. Can anyone explain what's going on here? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Elliot Joel Bernstein
, 2012 at 6:43 PM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: Thanks everyone for your replies. I didn't know about the ecdfplot function, so I'll start using that instead of Ecdf. Why is Ecdf not a lattice plot? The result certainly looks like other lattice plots

[R] Thinning Lattice Plot

2012-07-30 Thread Elliot Joel Bernstein
. For example: require(Hmisc) x - rnorm(1e6) pdf(test.pdf) Ecdf(x) dev.off() The resulting pdf files is 31MB. Is there any easy way to get a smaller pdf file without having to manually prune the dataset? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC

[R] Tight Axes in Prepanel Function

2012-06-25 Thread Elliot Joel Bernstein
How do I specify a tight y-axis, where the plot completely fills the y-axis range, inside the prepanel function? For example, consider the following code: require(lattice) set.seed(12345) x - 1:1000 y - cumsum(rnorm(length(x))) prepanel.test - function(x, y, groups = NULL, subscripts = NULL,

[R] combineLimits and Dates

2012-06-25 Thread Elliot Joel Bernstein
) plt1 - useOuterStrips(plt1) plt1 - combineLimits(plt1) The x-axis labels are right after the call to 'useOuterStrips' but they get converted to numeric after the call to 'combineLimits'. How do I keep them as date labels? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO

[R] splom Tick Location

2011-05-31 Thread Elliot Joel Bernstein
When using the 'splom' function of the 'lattice' packge, is it possible to get all the tick marks in the outer margins of the plot? X - as.data.frame(matrix(rnorm(1000), 100, 10)) plot(X) ## Tick marks are in the outer margin splom(X) ## Tick marks are inside the on-diagonal panels Thanks. -

[R] Errors and line numbers in scripts?

2011-05-12 Thread Elliot Joel Bernstein
Is it possible to get R to report the line number of an error when a script is called with source()? I found the following post from 2009, but it's not clear to me if this ever made it into the release version: ws wrote: * Is there a way to have R return the line number in a script when it errors

Re: [R] Cumsum in Lattice Panel Function

2011-05-11 Thread Elliot Joel Bernstein
That worked perfectly. Thanks! - Elliot On Mon, May 09, 2011 at 12:20:36AM +0530, Deepayan Sarkar wrote: On Fri, May 6, 2011 at 9:24 PM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: I'm trying to create an xyplot with a groups argument where the y-variable is the cumsum

[R] Cumsum in Lattice Panel Function

2011-05-06 Thread Elliot Joel Bernstein
, unsplit(lapply(split(value, group), cumsum), group)) xyplot(cumvalue ~ date, data = dat, group = group, type = 'l', grid = TRUE) Thanks for your help. - Elliot Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn Street | Cambridge, MA

Re: [R] Scaling Lattice Graphics for tikzDevice

2011-02-19 Thread Elliot Joel Bernstein
On Feb 18, 2011 11:02 PM, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: I'm trying to use lattice graphics to produce some small plots for inclusion in a LaTeX file. I want the LaTeX fonts

[R] Scaling Lattice Graphics for tikzDevice

2011-02-18 Thread Elliot Joel Bernstein
()) dev.off() ## -- ## ## END R CODE ## ## -- ## Thanks. - Elliot - Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount

[R] Generic Functions and Dates

2011-01-31 Thread Elliot Joel Bernstein
I'm trying to write a generic function that calls different methods depending on the structure of the argument, but not the exact type of its contents. For example, the function 'nan2last' below works for a numeric vector but not for a vector of Date objects. Is there any way to make it work on

[R] Aligning Grid Lines with Date Ticks in Trellis Plot

2010-11-24 Thread Elliot Joel Bernstein
I know this issue has been discussed before, but I hoped the advent of pretty.Date would resolve it. In the following code, the first plot produces misaligned vertical grid lines, while in the second plot they are properly aligned. Is there any way to get something along the lines of the first

[R] Multiple Line Plots with xyplot

2010-11-17 Thread Elliot Joel Bernstein
') will work, but if Y is large, this notation can get very awkward. Is there a way to do something simpler, along the lines of xyplot(Y ~ x, type='l') Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn Street | Cambridge, MA | 02138 Phone: (617