similar to: Aggregating data

Displaying 20 results from an estimated 3000 matches similar to: "Aggregating data"

2012 Feb 07
5
Table rearranging
I have a table that looks like this: measurement?? ?date??? door ?? color 0.93529385?? ?513?? ?open?? ?red 0.97419293?? ?420??? open ?? red 0.962053514?? ?513?? ?closed?? ?red 0.963909937?? ?1230?? ?open?? ?blue 0.97652034?? ?1230?? ?open?? ?green 0.989310795?? ?1230?? ?closed?? ?blue 0.9941022?? ?917?? ?closed?? ?yellow I would like to create a table that has: Open measurement, Closed
2011 Aug 24
3
dput data frame
I have a data frame that is about 40 columns by 10000 rows. I want to get the dput of small portion of that by using dput(results[1:10,3:6]). The dput is very long and includes all the values from the original data frame. Why is that? Jeffrey
2012 Jan 25
3
Gray levels
The gray (level) function returns different shades of gray, where level is a vector of numbers ranging from 0 to 1.? 0 is white and 1 is black and everything in between is a shade of gray. Is there a function that will let me choose two different colors?? For example, a 0 might be blue and 1 might be red and in between might be a mix. Jeffrey
2011 Jul 30
4
Replacing null values
I would like to reorder a two-column table by column A, then fill column B with the values above it. For example: Original:A B2 545 NA8 784 NULL3 269 NULL First sort by column A:A B2 543 264 NULL5 NA8 789 NULL Then replace null/na values in column B with the value above it:A B2 543 264 265 268 789 78 What is the best
2011 Aug 03
4
Convert matrix to numeric
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433",
2011 Oct 20
2
Calculating differences
I have a table that looks like this: structure(list(speed = c(3,9,4,8,7,6), C = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), hour = c(18, 8, 8, 8, 11, 11), id = c("1000", "10000", "10001", "10002", "10003", "10004")), .Names = c("speed",
2012 Jan 10
2
Aggregate by minimum
For each date, I would like to keep the line with the lowest speed and discard the rest. The result would have one line for each date. Can I use aggregate for this? My table is as follows: structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), id = c("1000",
2007 Jun 26
2
aggregating daily values
Hi, I swear I have read almost all the posted messages about this issue, but it's evident I couldn't find an answer (surely esay) to my problem. What I want is the following: Make 8 days aggregates from a daily series like this (dput output): structure(c(6.91777181625366, 0.79051125049591, 9.00625133514404, 9.86966037750244, 14.4326181411743, 3.70155477523804, 9.67768573760986,
2010 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,mean) Error: length(time(x)) ==
2009 Aug 18
1
aggregating values at discreet irregular time intervals into hourly values
Hello R users, I'm a newby to R (and programming software at large) and I would need some help to sum up event data at discreet time and irregular time interval into a hourly frequency. Here is an example of my time series frame (irregular time-serie object - irts in the tseries package): time value 2008-12-19 19:11:03 GMT 1 2008-12-19 19:12:00 GMT 0 2008-12-19
2005 Apr 07
2
newline in lattice axis label
Hi, I have a 3 panel xyplot with different variables in the y axis. I'm trying to insert a newline after "Width (cm)," in the ylab argument as in the example below. My goal is to have the y axis label broken into two lines, split after the string just mentioned. plotfun <- function() { fakedf <- data.frame(A = sample(1:100, 50), B = rnorm(50),
2011 Aug 02
1
Calculate mean ignore null
I have the following: Tout = c(". ", ". ", + "-51.0", " -9.6", " -9.6", " -9.6", " -9.6", " -9.6", " -9.6", + " -9.6", " -9.5", " -9.5", " -9.6", " -9.5", " -9.6", " -9.6", + " -9.5", " -9.4", "
2010 Jan 29
1
SemiPar/spm question
Hello -- I posted this question yesterday and for some reason the post seems to be attached to the wrong thread. Also, I extended my test a little and it seems to indicate the problem is with spm. I would appreciate any help. Thanks. ========================================================== library(plyr) library(SemiPar) data <-
2011 Nov 22
3
Binned line plot
I have a scatter plot with 10000 points.? I would like to add a line that bins every 50 points and connects the average of each bin.? I'm looking for something similar to line type "m" in Stata. With this dataset of 10000 points, I would also like to bin the data and make boxplots at certain intervals, so that I have a set of boxplots to represent each bin.? I would also like the
2007 Mar 28
2
aggregating data with Zoo
Is there a way of aggregating 'zoo' daily data according to day of week? eg all Thursdays I came across the 'nextfri' function in the documentation but am unsure how to change this so any day of week can be aggregated. I have used POSIX to arrange the data (not as 'zoo' series) according to day of week, but am curious if I've missed if a similar option available
2011 Feb 21
3
multiple plots using a loop
Dear R users, I am trying to write myself a loop in order to produce a set of 20 length frequency plots each pertaining to a factor level. I would like each of these plots to be available on the same figure, so I have used par(mfrow = c(4, 5)). However, when I run my loop below, it produces 20 plots for each factor level and only displays the last factor levels LF plots. I'm fairly new to
2006 Nov 29
3
Aggregating data
[This email is either empty or too large to be displayed at this time]
2008 Jul 23
1
Aggregating zoo object with NAs in multiple column
I would like to run an aggregation on a zoo object that has multiple series in it, with one of more series having NA values. The problem is that by default the aggregate function will produce an NA value in each aggregated period that contains an NA. For instance, if I run aggregate(x, as.yearmon(index(x)), mean) on the example object "x" which is printed below, I will just get a bunch
2001 Mar 05
1
pb with plot in nlme
hello all, I've got problems with plotting in nlme : > example(nlme) > plot(fm1) Error in do.call(plotFun, as.list(args)) : couldn't find function "xyplot" I've seen in Changelog that there have been changes in plotting funtions, may I've missed something... nlme3.1-10 _ platform sparc-sun-solaris2.8 arch sparc
2002 Feb 12
1
problem plotting nls objects: couldn't find function "..."
Dear R-help, I can't plot nls objects for some reason. The following example, taken from help(plot.nls) illustrates the problem: > data(Orthodont) > fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject) > plot(fm1, resid(., type = "p") ~ fitted(.) | Sex, abline = 0) Error in do.call(plotFun, as.list(args)) : couldn't find function