similar to: Repeated Aggregation with data.table

Displaying 20 results from an estimated 8000 matches similar to: "Repeated Aggregation with data.table"

2012 Jul 30
2
Thinning Lattice Plot
Is there an easy way to "thin" a lattice plot? I often create plots from large data sets, and use the "pdf" command to save them to a file, but the resulting files can be huge, because every point in the underlying dataset is rendered in the plot, even though it isn't possible to see that much detail. For example: require(Hmisc) x <- rnorm(1e6)
2012 Jul 31
2
Error Installing Package with Dependency on "Matrix"
I'm attempting to update to R 2.15.1, and I'm having trouble with a package that depends on the "Matrix" package. I've created a dummy package consisting only of a DESCRIPTION file that specifies the dependence on "Matrix", a NAMESPACE file, and an R directory, containing a single function, "square <- function(x) { return (x*x) }". When I try to
2011 Feb 18
2
Scaling Lattice Graphics for tikzDevice
I'm trying to use lattice graphics to produce some small plots for inclusion in a LaTeX file. I want the LaTeX fonts to be used in the plots, but to be scaled down to match the size of the plot. I have written the following code to apply a scaling factor to all the "cex" and "padding" entries in the trellis parameters, but there is still a large white space between the key
2010 Nov 17
1
Multiple Line Plots with xyplot
I'm trying to make multiple line plots, each with a different color, using the xyplot command. Specifically, I have an NxK matrix Y and an Nx1 matrix x. I would like the plot to contain a line for each (x, Y[,i]), i=1:K. I know something like xyplot(Y[,1] + Y[,2] + Y[,3] ~ x, type='l') will work, but if Y is large, this notation can get very awkward. Is there a way to do something
2012 Jun 25
1
combineLimits and Dates
I'm having some trouble using the latticeExtra 'combineLimits' function with a Date x-variable: require(lattice) set.seed(12345) dates <- seq(as.Date("2011-01-01"), as.Date("2011-12-31"), "days") dat <- data.frame(d = rep(dates, 4), g = factor(rep(rep(c(1,2), each = length(dates)), 2)), h =
2011 May 06
1
Cumsum in Lattice Panel Function
I'm trying to create an xyplot with a "groups" argument where the y-variable is the cumsum of the values stored in the input data frame. I almost have it, but I can't get it to automatically adjust the y-axis scale. How do I get the y-axis to automatically scale as it would have if the cumsum values had been stored in the data frame? Here is the code I have so far:
2011 May 31
1
splom Tick Location
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. - Elliot [[alternative HTML version deleted]]
2011 Jan 31
1
Generic Functions and Dates
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 any vector? setGeneric("nan2last", function(x) {
2011 May 12
1
Errors and line numbers in scripts?
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 out? *>* *>* I call my script like: *>* *>* $ R --vanilla < script.R >
2009 Nov 19
1
Performance of 'by' and 'ddply' on a large data frame
I've only recently started using R. One of the problems I come up against is after having extracted a large dataset (>5M rows) out of database, I realize I need another variable. In this case I have data frame with dates. I want to find the minimum date for each value of x1 and add that minimum date to my data.frame. > randomdf <- function(p) { data.frame(x1=sample(1:10^4, 10^p,
2009 Apr 03
3
plyr and table question
Dear all, I'm puzzled by the following example inspired by a recent question on R-help, cc <- textConnection("user_id website time 20 google 0930 21 yahoo 0935 20 facebook 1000 25 facebook 1015 61 google 0940") d <- read.table(cc, head=T) ; close(cc) table(d$user_id) # count the
2015 Dec 10
2
when RedHat makes patches for only some versions
> On Dec 10, 2015, at 10:40 AM, Leon Fauster <leonfauster at googlemail.com> wrote: > > Am 10.12.2015 um 16:16 schrieb Noam Bernstein <noam.bernstein at nrl.navy.mil>: >> I guess this is really a RedHat, not CentOS question, but I?m hoping that someone here will be familiar enough with the upstream policy to have some useful information. >> >> How does
2013 Apr 30
1
Stacked geom_bar with aggregated SE -ggplot2
Hi there,? I've been battling with an extension of this in my own data: getting appropriate error bars once data is stacked in a bar graph.? (original question: http://r.789695.n4.nabble.com/ggplot2-se-variable-in-geom-errorbar-s-limits- td3311176.html). It wouldn't let me reply to that thread. A modification of the earlier answer:? data(diamonds)? ?diamonds_df <- ddply(diamonds,
2001 Feb 13
1
Which.min bug?
Hi, I'm not sure this is a bug, so I thought I'd bounce it off the help group first. I had a dataset which I was subsetting, and occasionally I get an empty subset. If I don't check for emptiness and go straight to a which.min call on the subset, the program gets a big negative number back. One-line Example: > which.max(NULL) [1] -2147483647 This caused an indexing
2015 Dec 10
2
when RedHat makes patches for only some versions
I guess this is really a RedHat, not CentOS question, but I?m hoping that someone here will be familiar enough with the upstream policy to have some useful information. How does RedHat decide which versions to release patches for, e.g. https://access.redhat.com/security/cve/CVE-2015-7613 <https://access.redhat.com/security/cve/CVE-2015-7613> which has only a RH7 erratum, not 6? And are
2013 Sep 17
1
ayuda con aggregate
Hola, ¿qué tal? Creo que la forma más limpia es usar la función ddply de plyr aproximadamente así: ddply(mis.datos, .(B, C), summarise, mean.X2 = mean(X2), medianX4 = median(X4), etc. ) La sección "Using ddply" de http://www.cookbook-r.com/Manipulating_data/Summarizing_data/ lo expica bastante bien. Un saludo, Carlos J. Gil Bellosta
2004 Jul 08
1
Bug in Make or configure: spaces in path (PR#7068)
>>>>> "williams" == williams elliot <williams.elliot@bls.gov> >>>>> on Thu, 8 Jul 2004 01:50:16 +0200 (CEST) writes: williams> Full_Name: Elliot Williams Version: 1.9.1 OS: williams> Linux Submission from: (NULL) (146.142.53.18) williams> Hi, williams> The usual configure/make procedure hangs when williams>
2010 Apr 07
1
unexpected behaviour with ddply and colwise
Hi, I am confused by results from: > ddply(aa, names(aa), colwise(sum)) I thought ddply was just calling colwise(sum)() with each column. However ddply() returns a 13 x 5 result !! The general result I expected is similar to that of apply() , or using colwise(sum)() alone. Shouldn't ddply() produce the same ? Thanks in advance for your help, - Stuart Andrews >
2002 Oct 02
1
Re: [slugnet] Password Expiry
Hi Elliot, I couldn't find anything related to smbpasswd expiry. Since u have "unix password sync = true", just a wild guess, if u could turn off password ageing in unix passwd file (man passwd for more detail) and see if problem persists. Rgds Gary Elliot wrote: > Hi guys... I setup samba 2.2.5 as a PDC ... I have w2k clients. It seems > that now I am prompted to change
2009 Nov 19
1
ddply function nesting problems
While putting my R code into functions, I've encountered a ddply function nesting issue and need a bit of advice on the proper way to fix it.? I've tried several approahces, but neither worked and I need to have the ability to include the "cut", "range", and "fullseq" methods within ddply.? (For a bit of that explanation refer to