similar to: Using the output of strsplit

Displaying 20 results from an estimated 5000 matches similar to: "Using the output of strsplit"

2010 Jan 16
3
Comparing dates in dataframes
I have two data frames. One (arr) has all arrivals to an airport for a year, and the other (gw) has the dates and quarter hour of the day when the weather is good. arr has a Date and quarter hour column. >names(arr) [1] "Date" "weekday" "hour" "month" "minute" [6] "quarter" "ICAO"
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
2010 Feb 02
2
Writing out csv files
In my code, I calculate the maximum values with 2 factors using maxr=with(arrdf, tapply(rate,list(weekday,quarter), max, na.rm=T)) and I want to write out the file so that Excel can read it. I used write.table(maxr, fname, sep=",", col.names=TRUE, row.names=TRUE, quote=TRUE, na="0") which works, and yields something like
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,
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
2012 Apr 18
2
quarter end dates between two date strings
Hello, I have two date strings, say "1972-06-30" and "2012-01-31", and I'd like to get every quarter period end date between those dates? Does anyone know how to do this? Speed is important... Here is a small sample: Two dates: "2007-01-31" "2012-01-31" And I'd like to get this: [1] "2007-03-31" "2007-06-30"
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
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
2009 Dec 29
1
Effect of na.omit()
I had an NA in one row of my data frame, so I called na.omit(). But I do not understand where that row disappeared to. >fri=na.omit(fri) > fri Date.Only DAY Hour Min15 Quarter Arrival.Val Arrival4 1 09/05/2008 Friday 8 33 3 32 8 2 10/24/2008 Friday 21 86 4 28 7 3 10/31/2008 Friday 8 33 4 20
2008 Aug 18
1
Converting monthly data to quarterly data
Dear R users, I have a dataframe where column is has countries, column 2 is dates (monthly) for each countrly, the next 10 columns are my factors where I have measurements for each country and for each date. I have attached a sample of the data in csv format with the data for 3 countries. I would like to convert my monthly data into quarterly data, finding the mean over 3 month periods for
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),
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"
2009 Sep 08
1
Character manipulation using "strsplit" & vectorization
Dear R users, Suppose I have a data set with inconsistent names for a field. I desire to make these to consistent names. i.e "University of New Jersey", "New Jersey Uni", "New Jersey University" (3 different inconsistent names) to "The University of New Jersey" (consistent name) Below are arbitrary data set produced from "state.name" (built
2003 Oct 22
2
High frequency time-series
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date. Leafing through r-help mail archives I've found this *ALMOST* satisfactory message: ==========================================================
2015 Aug 05
2
[PATCH 1/1] document all hash algorithms available for key fingerprint display
From: Christian Hesse <mail at eworm.de> Signed-off-by: Christian Hesse <mail at eworm.de> --- ssh_config.5 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ssh_config.5 b/ssh_config.5 index 5b0975f..28f7714 100644 --- a/ssh_config.5 +++ b/ssh_config.5 @@ -649,9 +649,13 @@ The default is .It Cm FingerprintHash Specifies the hash algorithm used when
2009 Dec 30
1
What am I doing wrong in my loops?
Dear kind list people: I have the following code: >hours [1] "0" "1" "2" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22"
2011 May 04
1
fGarch
Hi, I am attempting to fit a ARMA/GARCH regression model without success. ### ARIMA-GARCH model with regressor ### ### Time series data: A multivariate data set. cov.ts.dq = cov.ts[1:4,"dq1"][!is.na(cov.ts[,"dq1"])] cov.ts.day = ts.intersect(dq = diff(q.ts), day = lag(q.ts, -1)) ### The following R scripts work: (summary(no.day.fitr <- garchFit(dq ~ arma(0,3) +
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) +
2011 Jul 17
1
How to speed up interpolation
df is a very large data frame with arrival estimates for many flights (DF$flightfact) at random times (df$PredTime). The error of the estimate is df$dt. My problem is that I want to know the prediction error at each minute before landing. This code works, but is very slow, and dominates everything. I tried using split(), but that rapidly ate up my 12 GB of memory. So, is there a better R way of
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 #