Displaying 20 results from an estimated 20000 matches similar to: "aggregation with extra columns"
2005 Jan 31
4
aggregating dates
I have a frame which contains 3 columns:
"date" "defectnum" "state"
And I want to get the most recent state change for a given defect number. date is POSIXct.
I have tried:
aggregate(ev$date, by=list(ev$defectnum), max)
Which appears to be working except that the dates seem to come back as integers (presumably the internal representation of POSIXct).
When I
2003 Nov 04
2
more barplot presentation questions
Thanks to those who pointed me at the solutions to the legend overprinting the bars. I took the "easy" way of rescaling the y axis, picking the scaling factor for stacked bars is somewhat problematic but sufficient for my application.
I have another couple of barplot questions:
- Can I extend the major ticks on the Y axis across the page? Or both axes to form a grid?
- A really
2005 Jan 19
5
easing out of Excel
I know enough about R to be dangerous and our marketing people have asked me to "automate" some reporting. Data comes from an SQL source and graphs and various summaries are currently created manually in Excel. The raw information is invoicing records and the reporting is basically summaries by customer, region, product line etc.
With function such as aggregate(), hist() and pareto()
2005 Apr 15
4
aggregation question
Is length(unique()) what you are looking for?
Andy
> From: Christoph Lehmann
>
> Hi I have a question concerning aggregation
>
> (simple demo code S. below)
>
> I have the data.frame
>
> id meas date
> 1 a 0.637513747 1
> 2 a 0.187710063 2
> 3 a 0.247098459 2
> 4 a 0.306447690 3
> 5 b 0.407573577 2
> 6 b
2012 Jan 18
3
Reshape with multiple aggregation functions
I have a data frame and I would like to reshape it to wide format while at the same time applying different aggregate functions to each column AND at times multiple aggregate functions:
test1 = data.frame(
id = c(rep('101',8),rep('102',8)),
phase = rep(c('D','D','L','L'),4),
day =
2005 Apr 24
1
large dataset import, aggregation and reshape
Dear useRs
We have a data-set (comma delimited) with 12Millions of rows, and 5
columns (in fact many more, but we need only 4 of them): id, factor 'a'
(5 levels), factor 'b' (15 levels), date-stamp, numeric measurement. We
run R on suse-linux 9.1 with 2GB RAM, (and a 3.5GB swap file).
on average we have 30 obs. per id. We want to aggregate (eg. sum of the
measuresments under
2012 Aug 07
2
Repeated Aggregation with data.table
I have been using ddply to do aggregation, and I frequently define a
single aggregation function that I use to aggregate over different
groups. For example,
require(plyr)
dat <- data.frame(x = sample(3, 100, replace=TRUE), y = sample(3, 100,
replace = TRUE), z = rnorm(100))
f <- function(x) { data.frame(mean.z = mean(x$z), sd.z = sd(x$z)) }
ddply(dat, "x", f)
ddply(dat,
2019 Feb 26
5
Improved Data Aggregation and Summary Statistics in R
Dear Developers,
Having spent time developing and thinking about how data aggregation and
summary statistics can be enhanced in R, I would like to present my
ideas/efforts in the form of two commands:
The first, which for now I called 'collap', is an upgrade of aggregate that
accommodates and extends the functionality of aggregate in various
respects, most importantly to work with
2008 Jun 06
1
Agreggating data using external aggregation rules
Dear R experts,
I am currently facing a tricky problem which I have read a lot about in
the various R mailing lists without finding exactly what I need.
I have a big data frame DF (about 2,000,000 rows) with 7 columns being
variables and 1 being a measure (using reshape package nomeclature).
There are no "duplicates" in it.
Fot each of the variables I have some "rules" to
2010 Aug 21
1
Speed improvement to evalList
I've been inspired to look at the R source code by some strange timing
results that I wrote about on my blog at radfordneal.wordpress.com
(see the posts on "Speeding up parentheses..." and "Two surprising
things...".
I discovered that the strange speed advantage of curly brackets over
parentheses is partially explained by an inefficiency in the evalList
and
2018 May 15
2
centos-qemu-ev repository not work for x86_64 arch on CentOS 7.5
Hello, Sandro!
On 11.05.2018 12:19, Sandro Bonazzola wrote:
> Sadly, the new qemu-kvm-ev we prepared for CentOS 7.5 didn't get released (
> https://bugs.centos.org/view.php?id=14764) but the new build is ready.
After installing CentOS 7.5 and installing package qemu-kvm-ev
I can't install KVM on x86_64 arch:
command "yum -y install perf qemu-kvm-ev qemu-kvm-tools-ev
2013 Jul 12
1
Use R for data aggregation
I have a set of evaluation variables (n) for each sample (sample size is
large enough) and I am trying to use R (nnet package) to aggregate the data.
However, I don't know the weight for each variable (I am sure the weight
shouldn't be equally assigned). Specifically, I have 12 indices (CO2, SO2,
TSP...) for 100 cities and I want to calculate weight for each and finally
obtain a
2007 Dec 24
1
aggregation with two statistical functions - mean and variance
Hello,
using the syntax
aggregate(daten[,c(3,4)], list(A,B), mean)
I'm getting the following data.frame:
A B C D
1 35 1 6.16000 5
2 47 1 31.24333 20
3 54 1 26.81773 2
4 3 2 12.99000 7
5 4 2 6.49000 1
C and D are both means. But now I want to
2015 Oct 27
2
Differences between qemu-kvm and qemu-kvm-ev
Sandro,
Could you please enumerate the actual technical differences between stock qemu-kvm and qemu-kvm-ev?
For example, what could one do with qemu-kvm-ev that cannot with qemu-kvm?
Lucian
--
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro
----- Original Message -----
> From: "Sandro Bonazzola" <sbonazzo at redhat.com>
> To: "Discussion about
2007 Jan 08
2
Contrasts for ordered factors
Dear all,
I do not seem to grasp how contrasts are set for ordered factors. Perhaps someone can elighten me?
When I work with ordered factors, I would often like to be able to reduce the used polynomial to a simpler one (where possible). Thus, I would like to explicetly code the polynomial but ideally, the intial model (thus, the full polynomial) would be identical to one with an ordered factor.
2007 Oct 01
1
[nls] singular gradient
Hi, I am new to R. I don't have strong background of statistics. I am
a student of Geotechnical Engineering. I tried to run a nonlinear
regression for a three-variable function, that is
N = f(CSR, ev) # N is a function of CSR and ev, and N = CSR/(A
+B*CSR), wherer (A,B) are function of ev.
N, CSR and ev are observed in the experiments.
Following is my R script.
rm(list=ls())
2011 Jul 22
1
reg.finalizer and connection gc -- which runs when (and why)?
With this set-up
options(warn = 1)
tf <- tempfile()
finalizer <- function(obj) {
message("finalizer")
close(obj$f)
}
this code works
ev <- new.env()
ev$f <- file(tf, "w")
reg.finalizer(ev, finalizer)
rm(ev)
gc()
whereas this (reversing the order of file() and reg.finalizer())
ev <- new.env()
reg.finalizer(ev, finalizer)
ev$f <- file(tf,
2009 Jul 16
2
[PATCH server] updated anyterm/ovirt integration
host static anyterm content locally,
url parameterize anyterm rows/cols/general param
update spec/makefile
Ideally I wanted and tried hard to put all this into a
seperate ovirt-server--anyterm subpackage, but we cannot
'reopen' the ovirt server virtual host defined in
ovirt-server.conf to add the neccessary rewrite rules. it would
be nice to figure out a way to do this
---
2006 Aug 02
1
read.spss and umlaut
Hello
When I read a SPSS *.por file with read.spss everything after a umlaut is
missing:
> library("foreign")
> spssdaten <- read.spss("projets.por")
> attr(spssdaten$PROJETX, "value.labels")[1:20]
Bg Stammzellenforschung Bb
863 862
Bb
2009 May 15
1
Matrix package,solve() errors and crashes Please help
>
> Hello All,
>
Please help me with this problem.I have been having this problem for over a
month now and I could not find any information.I later realised that error
is with MATRIX package.
I am working on graph object using IGRAPH version 0.5.2-2 package & wanted
to do Bonacich Power.
What I have is undirected GRAPH.
This is my graph object.
The file 'Bonacich