Greetings,

Q #1
------

How does one combine data frames by row ... no cleverness a la merge(), just add rows.

For example, given A with 20 rows and B with 30 rows, I want C = combine( A, B) having 50 rows.

Columns having matching names should be filled from both (all) sources with suitable coercion, unmatched would get NA in rows whose source does not have that column.


Q #2
------

Given data frame A having various columns including "vx".

I want to create a new data frame A2 that has 10 copies of each row in A, all the same as the source row except vx=seq(1:10). The source row value of vx is overwritten. A2 would have 10 times as many rows as A.

I have of course discarded idea of using of a for loop, but maybe that is what it takes.


TIA etc,

Chip Barnaby






---------------------------------------------------------
Chip Barnaby                   [EMAIL PROTECTED]
Vice President of Research
Wrightsoft Corp.               781-862-8719 x118 voice
131 Hartwell Ave               781-861-2058 fax
Lexington, MA 02421         www.wrightsoft.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to