You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to optimise a categorical resistance surface, which contains landcover data with pre-assigned resistance values from the literature. I would like to optimise this to identify which landcovers are important for gene flow in my study area.
I ratify the categorical variables following the tutorial, and make a conductance surface using the below code:
surface_gsp <- conductance_surface(covariates = stack(Region_rat), coords = Coords, directions = 4)
I then make a Euclidean genetic distance matrix using dist() in adegenet between all samples.
I then try to fit mlpe using the below code:
fit_mlpe_cat <- radish(Genetic_dist ~ Region_Mosaic, data = surface_gsp,
conductance_model = radish::loglinear_conductance,
measurement_model = radish::mlpe)
However I get the error code below almost immediately:
Projected Newton-Raphson with Hager-Zhang line search
Error in radish_algorithm(f = conductance_model, g = measurement_model, :
length(s$demes) == nrow(S) is not TRUE
What is s$demes and nrow(S) referring to? I would greatly appreciate any guidance on how to get this to work.
Many thanks
The text was updated successfully, but these errors were encountered:
j3ss42
changed the title
rownames(formula_covariates) %in% colnames(spdat) is not TRUE
Radish() error length(s$demes) == nrow(S) is not TRUE
Dec 11, 2023
Hi,
I am trying to optimise a categorical resistance surface, which contains landcover data with pre-assigned resistance values from the literature. I would like to optimise this to identify which landcovers are important for gene flow in my study area.
I ratify the categorical variables following the tutorial, and make a conductance surface using the below code:
surface_gsp <- conductance_surface(covariates = stack(Region_rat), coords = Coords, directions = 4)
I then make a Euclidean genetic distance matrix using dist() in adegenet between all samples.
I then try to fit mlpe using the below code:
fit_mlpe_cat <- radish(Genetic_dist ~ Region_Mosaic, data = surface_gsp,
conductance_model = radish::loglinear_conductance,
measurement_model = radish::mlpe)
However I get the error code below almost immediately:
Projected Newton-Raphson with Hager-Zhang line search
Error in radish_algorithm(f = conductance_model, g = measurement_model, :
length(s$demes) == nrow(S) is not TRUE
What is s$demes and nrow(S) referring to? I would greatly appreciate any guidance on how to get this to work.
Many thanks
The text was updated successfully, but these errors were encountered: