Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we match all the traits for each species at each site? #31

Open
hms1664002057 opened this issue Apr 19, 2022 · 8 comments
Open

Comments

@hms1664002057
Copy link

Hi @bmaitner,How can I match all traits for each species per site? I want to explore the scaling relationships among traits using the “BIEN ”package. Can you give an example of the code? thank you.

@Rekyt
Copy link
Contributor

Rekyt commented Jul 11, 2022

I'm jumping in here to help because I think @hms1664002057 that you can refer to "BIEN tutorial" (https://cran.r-project.org/web/packages/BIEN/vignettes/BIEN_tutorial.html) to see example of code using the BIEN package.

@hms1664002057
Copy link
Author

@Rekyt ,Thank you for your help, but "BIEN tutorial" (https://cran.r-project.org/web/packages/BIEN/vignettes/BIEN_tutorial.html) does not give code for matching multiple traits of the same species in the same site , and does not say whether it is possible to match based on the same ID (like the plant trait database does). Can we match traits based on the same species at the same site (longitude, latitude, altitude)?

@Rekyt
Copy link
Contributor

Rekyt commented Jul 13, 2022

I'm not sure to understand your use case.
I'm also not so familiar of extracting trait data from BIEN using spatial coordinates.

For sure, if you extract trait data using target species with BIEN::BIEN_trait_species() you can always filtered based on unique latitude and unique longitude to get back the identity of the species.

But from what I know of BIEN, it doesn't seem possible to uniquely link different trait values down to the same individual.
You could link them to the same area (using the coordinates in the returned table), but never back at the individual scale.

@hms1664002057
Copy link
Author

@Rekyt ,Thank you for your valuable advice. Can we match the traits of the same plants in the same site (the same latitude, longitude and height) according to the code here?
Code link: https://github.com/MarconiS/Disentangling-the-role-of-phylogeny-and-climate-on-joint-leaf-trait-distributions-across-Eastern-Uni/blob/50f11f089be6e549930128caae54b295228e08e0/src/model_training/get_bien_data.R

@Rekyt
Copy link
Contributor

Rekyt commented Jul 14, 2022

Yes, that's exactly what I've told you. Using unique species names, unique latitude, longitude, and elevation. You should be able to match back species from the same site. However, this will only match at the species level locally because they are no identifier at the individual scale.

@hms1664002057
Copy link
Author

@Rekyt ,Thank you for your continued reply and help. I have learned a lot from your reply. We should keep communicating and learning, so as to explore more usage of BIEN package. Thank you.

@hms1664002057
Copy link
Author

Hi, @Rekyt. Have you used the data from the plant trait database (TRY)? Can we convert the long data form in the TRY to the wide data form and match the same species in the same location (latitude, longitude, altitude) based on the "ObservationID" column in the TRY? Do you have code or information on this? Thank you.

@Rekyt
Copy link
Contributor

Rekyt commented Jul 16, 2022

This is not related to BIEN and the use of RBIEN so I would suggest this conversation continues elsewhere then in this issue.

Regarding TRY structure you should look for specific code using TRY strucutre. Matching individual level traits maybe possible but you should check carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants