Re: [R] merging data frames gives all NAs

2010-02-02 Thread David Winsemius
Yeah, sometimes the vocabulary we bring to a task does not match up (or "merge" properly) with the vocabulary that the developers use. In this case the merge operation is one that has a precise meaning in database lingo, which apparently you do not have background in. My experience in tryi

Re: [R] merging data frames gives all NAs

2010-02-02 Thread James Rome
I agree. I have a foot of books on R now, for example the R Book by Michael Crowly. But so far, Googling the archives of this list has been the most help. Nonetheless, if I cannot understand the documentation of a function, then the documentation needs to be updated. For example, there needs to be

Re: [R] merging data frames gives all NAs

2010-02-02 Thread Erik Iverson
James Rome wrote: On 2/1/2010 5:51 PM, David Winsemius wrote: I figured this out finally. I really believe that the R help write-ups are sorely lacking. The help docs are probably not the best way to learn R, but they are great for users of the functions. I have found that after going thro

Re: [R] merging data frames gives all NAs

2010-02-02 Thread James Rome
On 2/1/2010 5:51 PM, David Winsemius wrote: I figured this out finally. I really believe that the R help write-ups are sorely lacking. As soon as I looked at http://www.statmethods.net/management/merging.html, it was obvious: Adding Columns To merge two dataframes (datasets) horizontally, us

Re: [R] merging data frames gives all NAs

2010-02-02 Thread James Rome
David, Now the code is: for (j in seq_along(rwy)) { # subset the data and merge them ar4rw = ar4rw <- subset(arrgnd, arrgnd$Runway==rwy[j]) if(j == 1) { arrw = ar4rw } else { arrw = merge(arrw, ar4rw) } } I attach the data. I needed 500 rows to get both runways in rwy. The suggestions did not h

Re: [R] merging data frames gives all NAs

2010-02-01 Thread David Winsemius
On Feb 1, 2010, at 5:16 PM, James Rome wrote: 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

[R] merging data frames gives all NAs

2010-02-01 Thread James Rome
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 b