Open Simonvass opened 5 months ago
Hi @Simonvass, thanks for this. This error usually occurs when data is not in the right format. If you'd like to email me your script and files you're working on I can have a look and see if I can spot what the error is. My email is emma.govan.2021@mumail.ie. Thanks!
I have an error when I try to load simmr data. All my objects are checked and seem good but I keep having the same error message : Error: Assertion failed. One of the following must apply:
Script : consumers <- read_xlsx ("Consommer.xlsx") sources <- read_xlsx("Sources.xlsx") TEFs <- read_xlsx("TEFs.xlsx") sources$Meand13C<- as.numeric(sources$Meand13C) sources$Meand15N<- as.numeric(sources$Meand15N) sources$Sdd15N<- as.numeric(sources$Sdd15N) sources$Sdd13C<- as.numeric(sources$Sdd13C) sources<- na.omit(sources)
mixtures <- as.matrix(consumers[-1, 2:3])
source_names <- as.character(sources$Source)
source_means <- cbind(sources$Meand13C, sources$Meand15N)
source_sds <- cbind(sources$Sdd13C, sources$Sdd15N)
correction_means <- cbind(TEFs$Meand13C, TEFs$Meand15N)
correction_sds <- cbind(TEFs$Sdd13C, TEFs$Sdd15N)
print(dim(mixtures)) print(class(mixtures)) print(class(source_names)) print(dim(source_means)) print(dim(source_sds)) print(dim(correction_means)) print(dim(correction_sds))
simmr_input <- simmr_load( mixtures = mixtures, source_names = source_names, source_means = source_means, source_sds = source_sds, correction_means = correction_means, correction_sds = correction_sds, concentration_means = NULL )