similar to: How to use tapply for quantile

Displaying 20 results from an estimated 900 matches similar to: "How to use tapply for quantile"

2010 Apr 16
6
bwplot puts the bars in the wrong place
Dear R-Help, With the attached data set, I am still getting incorrect bwplots > xyplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf) # Is correct > bwplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf, horizontal=FALSE) # Puts the boxes on the wrong x-axis values # look especially at 0 and 3. How do I fix this? What is happening? Thanks, Jim Rome
2010 Apr 20
0
Fwd: Re: bwplot puts the bars in the wrong place
Peter, that finally worked. hrs = seq(1, 24, 1) g = bwplot(tt~OnHFact |Runway, data=gdf, ylab="Taxi time (min)", main=title, xlab="Hour of day", par.strip.text=list(cex=0.7), rot=90, xlim=c(0, 25), drop.unused.levels=FALSE, scales=list(x = list(rot=90, cex=.6 ,at=hrs, labels=hrlabs )), panel =
2010 Mar 20
3
How to select a row from one dataframe that is "close" to a row in another dataframe
I have two data frames of flight data, but they have very different numbers of rows. They come from different sources, so the data are not identical. > names(oooi) [1] "FltOrigDt" "MkdCrrCd" [3] "MkdFltNbr" "DprtTrpnStnCd" [5] "ArrTrpnStnCd" "ActualOutLocalTimestamp"
2011 Jun 07
2
ggplot2 and facet
I have a data frame (attached) that has interpolated EOT errors for each minute before flight landing. It also has the runway and an index for the flight: > > times[1:4,] time error runway flight 1 0 -0.02206235 04R 1 2 1 -0.07961631 04R 1 3 2 -0.13795380 04R 1 4 3 -0.20726073 04R 1 > > sapply(times, class) time error
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried gatelist = unique(mdf$ArrivalGate) for( gate in gatelist) { outfile = paste("../", airport, "/", airport, "taxiHistogram", gate, ".pdf", sep="") pdf(file = outfile, width = 10, height=8, par(lwd=1)) title=paste("Taxi time for Arrival Gate", gate, "by
2008 Nov 10
1
Preparing data for display
I have a dataset of about 10^6 rows, each consisting of a timestamp, several factors, a string, some integers, and some floats. I'd like to graph this data in various ways, including straightforward ones (how many events per week over the past year for each of 4 values of some factor), some less straightforward. I've managed to do this by brute force, but I'd like to learn how to do
2010 Feb 01
3
merging data frames gives all NAs
Dear kind R helpers, I have a vector of runway names in rwy ("31R", "31L",... the number is user selectable) arrgnd is a data frame with data for all flights and all runways, with a Runway column. I am trying to subset arrgnd into a dat frame for each selected runway, and then combine them back together using the following code: for (j in 1:nr) { # nr = number of
2011 May 25
2
Importing fixed-width data
I have a data set where the lines look like: 2011-05-13 00:00:00 EONAAL330 dfa13002516PSCNONA 2011-05-13 00:00:01 EONAAL223 laa13044510AS.NONM Some lines are missing the field before and after the NON: 2011-05-13 00:00:05 EONBHS229 mia13001621NON I read them into R using df = read.fwf(file, widths=c(19,-4,7,3,8,2,1,3,1),
2003 Dec 31
2
Plot grouped data: How to change x-axis? (nlme)
Hallo! GENERAL QUESTION: I'm trying to change the tick marks of the x-axis in a grouped data plot (nlme). CONCRETE EXAMPLE: In the example (see below) I want the x-axis to have tick marks at 0, 6, 12, 18, 24. How can I do this? WHAT I TRIED I tried "normal" methods like axis(...) but this does not work with this plot. And I also tried xlim=c(0,24) but the ticks are unchanged and
2011 Jun 08
3
How to suppress factor labels
I am using ggplot2 to make a boxplot that overlays a scatterplot: pp = qplot(time, error, data=times, size=I(1), geom="jitter", main=title, ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10), color=times$runway, ylim=c(-30,40)) pp2 = pp + with(times, facet_wrap(~ runway, ncol=2)) print(pp2 + geom_boxplot(alpha=.5,
2011 Aug 27
2
Am having trouble calling a function
In my main R program, I have source("retaanalysis/Functions/doAirport.R") .... stuff to read data and calculate ads sapply(ads, function(x) {doAirport(x, base)} ) And doAirport has # analyze the flights for a given airport doAirport = function(df, base) { # Get rid of unused runway factor levels (from other airports) df$lrw <- drop.levels(df$lrw) # In gdata package #
2006 Mar 20
3
can''t get my rss to validate with feedtools
I know that I''m doing something wrong, but I can''t figure out what. I''ve looked at every wiki and tutorial I can find on feedtools but I still can''t get my rss feed working. Here''s my code. feed = FeedTools::Feed.new feed.entries << FeedTools::FeedItem.new feed.entries[0].author.name = "Charlie Bowman" feed.entries[0].title =
2011 Jun 10
1
Double x grid in ggplot2
I am trying to overlay raw data with a boxplot as follows: pp = qplot(factor(time, levels=0:60, ordered=TRUE), error, data=dfsub, size=I(1), main =" title", ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10), ylim=c(-30,40), geom="jitter") + facet_wrap(~ runway, ncol=2) +
2009 Feb 03
3
lapply and aggregate function
Dear list, I have two things I am struggling... # First set.seed(123) myD <- data.frame( Light = sample(LETTERS[1:2], 10, replace=T), Feed = sample(letters[1:5], 20, replace=T), value=rnorm(20) ) # Mean for Light myD$meanLight <- unlist( lapply( myD$Light, function(x) mean( myD$value[myD$Light == x]) ) ) # Mean for Feed
2010 Oct 12
5
aggregate with cumsum
Hello everybody, Data is myd <- data.frame(id1=rep(c("a","b","c"),each=3),id2=rep(1:3,3),val=rnorm(9)) I want to get a cumulative sum over each of id1. trying aggregate does not work myd$pcum <- aggregate(myd[,c("val")],list(orig=myd$id1),cumsum) Please suggest a solution. In real the dataframe is huge so looping with for and subsetting is not a
2006 May 19
2
system of tab
Hello, I would like to create a system of tab by means of Ajax (like in netvibes). Somebody would have a track(runway). A library to be used.... Thank you in advance.
2008 Jul 08
6
Question: Beginner stuck in a R cycle
Dear All, I have a database of 200 observations named myD. In the dataframe there are a column named code (with codes varying from 1 to 77), a column named "prevalence" with some quantitative measurements are given and an column named Pr_mean, with no values. I would like to set a cycle to compute the average of prevalence values for each different code and store the averages under the
2013 Mar 20
3
highlight overlapping region of two densities
Hi all. I would like to highlight overlapping regions of two densities and I could not find a way to do it. Here is the sample code: myd <- c(2,4,5, 4,3,2,2,3,3,3,2,3,3,4,2,4,3,3,3,2,2.5, 2, 3,3, 2.3, 3, 3, 2, 3) myd1 <- myd-2 plot(range(density(myd)$x, density(myd1)$x), range(density(myd)$y, density(myd1)$y), type = "n") lines(density(myd), col=1, lwd=4)
2003 Jul 13
3
r-question
I am student in Iran(IUT) that work on R software as my project. I need to some data frames in version 1.7.0, but these are not available. please help me.
2012 Jan 20
1
--link-dest doesn't work if target file exists (but needs updating)
Using: # rsync --version rsync version 3.0.7 protocol version 30 Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes rsync comes with ABSOLUTELY NO