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

No possibility to include a source_factor to fit with mix data when loading sources, why? Thank you! #397

Open
IsaTesi opened this issue Jan 22, 2025 · 0 comments

Comments

@IsaTesi
Copy link

IsaTesi commented Jan 22, 2025

Hi,

When loading sources, I'm trying to set source_factors as "Sector", to fit with the same "Sector" I did include in my "Load datamix". I did try different configurations, but always ending up with the same error message :

Error in list.sources.bylev[[lev]] <- SOURCE[SOURCE[, source_factors] == :
attempt to select less than one element in integerOneIndex

Because I do detect significatively differents values for my sources between my 6 different "Sector", and because I'm trying to compare those, I think it's very important to get it right. If I can't, I will have to deal with every Sector independtly, but it's going to arise the error.

Here's my loading code if it can help someone to help me:

#Load datamix

mix <- load_mix_data(
filename = "temp_consumers.csv",
iso_names = c("d13C","d2H"),
factors = c("Taxa","Sector"),
fac_random = c(FALSE, FALSE),
fac_nested = c(FALSE, FALSE),
cont_effects = NULL)

source <- load_source_data(
filename="temp_sources.csv",
source_factors="Sector",
conc_dep=FALSE,
data_type="raw", mix)

Error in list.sources.bylev[[lev]] <- SOURCE[SOURCE[, source_factors] == :
attempt to select less than one element in integerOneIndex

Thank you very much for your help!

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

1 participant