Closed diazrenata closed 1 year ago
the code for roleDataFrom (orTo)Cpp seems to expect six slots - species_ids, traits, abundance_sp, traits_sp, pi_sp
roleDataFromCpp <- function(data) { local <- localComm(data$local$abundance_indv,data$local$species_ids, data$local$traits, data$local$abundance_sp, data$local$traits_sp,data$local$pi_sp) meta <- metaComm(data$meta$abundance,data$meta$traits) phylo <- rolePhyloFromCpp(data$phylo) return(roleData(local,meta,phylo)) } #' roleDataToCpp #' #' @param data some roleData #' #' @return for Cpp #' @export #' roleDataToCpp <- function(data) { local <- localComm(data$local$abundance_indv, data$local$species_ids, data$local$traits, data$local$abundance_sp, data$local$traits_sp, data$local$pi_sp) meta <- metaComm(data$meta$abundance,data$meta$traits) phylo <- rolePhyloFromCpp(data$phylo) return(roleData(local,meta,phylo))
but the localComm class constructor only asks for four:
localComm <- function(indSpecies, indTrait, indSeqs, spGenDiv) { #indSppTrt, indSeqs, sppGenDiv
So I think these need to be either named or plugged back together so they reflect each other correctly.
This seems like something either @jidec or @ajrominger should weigh in on: what are the desired connections between roleCpp slots and localComm slots?
good catch! i'll incorporate this into the changes I'm working on with the roleModel class
roleModel
roleDataFromCpp and roleDataToCpp are no longer used so we're removing them 7f9cc94
roleDataFromCpp
roleDataToCpp
the code for roleDataFrom (orTo)Cpp seems to expect six slots - species_ids, traits, abundance_sp, traits_sp, pi_sp
but the localComm class constructor only asks for four:
So I think these need to be either named or plugged back together so they reflect each other correctly.
This seems like something either @jidec or @ajrominger should weigh in on: what are the desired connections between roleCpp slots and localComm slots?