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

Error in MixSIAR::load_source_data(mixsiar$source_filename, source_random_effects #247

Closed
Consuelo1212 opened this issue Aug 26, 2020 · 9 comments

Comments

@Consuelo1212
Copy link

Hi Brian, when I load the data in source I get the following error, although I do get a green ticket in the source window, could you please help me understand this?
“Error in MixSIAR::load_source_data(mixsiar$source_filename, source_random_effects, :
Source mean column names mislabeled.
Should be 'Mean' + iso_names from mix data file, e.g. 'Meand13C' if
mix$iso_names = 'd13C'. Please ensure headings in source data file match
this format and try again. Alternatively, if you have raw source data,
you should set data_type='raw'.

“Sources | Meand13C | SDd13C | Meand15N | SDd15N | Concd13C | Concd15N | N”

thanks

@brianstock-NOAA
Copy link
Contributor

Can you post the column header from your mix and source CSV files, as well as output from

mix$iso_names
mix$MU_names
mix$SIG_names

If you search for that error message in load_source_data(), you can see what the function is expecting: https://github.com/brianstock/MixSIAR/blob/master/R/load_source_data.R#L214.

@Consuelo1212
Copy link
Author

Source data:
Sources,Meand13C,SDd13C,Meand15N,SDd15N,Concd13C,Concd15N,n

consumer data:
d13C,d15N,sex,size,size_class

thanks!

@brianstock-NOAA
Copy link
Contributor

Those look correct... Can you please post the output of mix$iso_names, mix$MU_names, and mix$SIG_names after loading the mix data? Also post output from:

srcdata <- read.csv(***your source data file.csv***)
colnames(srcdata)

@Consuelo1212
Copy link
Author

Dear Brian, I am grateful of your help. This is the first time I am using MixsiarGUI and apparently my mistake was with the format of the CSV file, now it is working right.

@brianstock-NOAA
Copy link
Contributor

Great - glad it's working now! I'm also glad you're able to get the GUI to work, since many people have problems installing it.

@melanievenet
Copy link

Dear Brian, I am grateful of your help. This is the first time I am using MixsiarGUI and apparently my mistake was with the format of the CSV file, now it is working right.

Hi, I am trying to load in my source data and am running into the same mistake you were, how did you fix the format of the CSV file? I am just using MixSIAR not GUI I'm not sure if that makes a difference it is my first time using this package!

@edgar45328
Copy link

Error in load_discr_data(mixsiar$discr_filename, mixsiar$mix) :
*** Error: Discrimination mean column names mislabeled.
Should be 'Mean' + iso_names from mix data file, e.g. 'Meand13C' if
mix$iso_names = 'd13C'. Please ensure headings in discr data file match
this format and try again.

@edgar45328
Copy link

can someone tell me what the problem is?

@ncttrinh
Copy link

I got the issue with loading the source data and I realised that my csv file named "sediment sources.csv " while my script calls out the name "sediment_sources.csv". So all troubles begin with the underscore _, or more specific, it is the file name difference.
just sharing....

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

6 participants