0

Any tips on how can I create a data frame or table with the following columns: winID, D and n sites for each of three data sets.

The table should look like the one on the photo. The three data sets have similar winID but the D and n sites would vary.

enter image description here

I have already made the common winID for the three data sets.

enter image description here

Thank you for your help

The function to create a data frame or combine the columns

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 1
    (1) Welcome to SO! Questions on SO (especially in R) do much better if they are reproducible and self-contained. By that I mean including attempted code (please be explicit about non-base packages), sample representative data (perhaps via `dput(head(x))` or building data programmatically (e.g., `data.frame(...)`), possibly stochastically), perhaps actual output (with verbatim errors/warnings) versus intended output. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Nov 05 '22 at 01:47
  • 1
    (2) Please do not post (only) an image of code/data/errors: it breaks screen-readers and it cannot be copied or searched (ref: https://meta.stackoverflow.com/a/285557 and https://xkcd.com/2116/). Please include the code, console output, or data (e.g., `data.frame(...)` or the output from `dput(head(x))`) directly. (3) We don't have any of your raw data that informs what goes into these columns, so it's unclear what you need. – r2evans Nov 05 '22 at 01:47

0 Answers0