Double zero assessment - graph have no dimensions

26 views Asked by At

I currently work on species presence/absence in link with dry-stone wall parameters.

I'm trying to assess joint absences of my species (5 species of mustelids), but the graph has no dimentions.

I think something is missing in my code, but cannot find anything relevant to my problem on the internet.. In fact, there is almost nothing on the function I use, except for the usual function description.

Here is the code I used to assess double zeros, surely, the problem is in the levelplot() function :

    df_corrgram <- data.frame(cam_week$Presence_ME, cam_week$Presence_MF, cam_week$Presence_MM,
                          cam_week$Presence_MN, cam_week$Presence_MP, cam_week$Presence_tot,
                          cam_week$Occurrences_ME, cam_week$Occurrences_MF, cam_week$Occurrences_MM,
                          cam_week$Occurrences_MN, cam_week$Occurrences_MP,cam_week$Occurrences_tot)
    colnames(df_corrgram) <- c("Presence_ME", "Presence_MF", "Presence_MM", "Presence_MN",
                           "Presence_MP", "Presence_tot", "Occurrences_ME",
                           "Occurrences_MF", "Occurrences_MM", "Occurrences_MN",
                           "Occurrences_MP", "Occurrences_tot")

    matrix_corr <- as.matrix(df_corrgram)

    levelplot(matrix_corr,xlab=NULL,ylab=NULL, main = "Correlation plot assessing double zeros",
          at=do.breaks(c(0.5,1.01),101),
          scales=list(x=list(rot=90)),
          colorkey=list(space="top"),
          col.regions=colorRampPalette(c("red","white","blue")))

I get this flat plot in return : Levelplot I got And this is the kind of plot I am looking for : Level plot I was expecting

Can anyone help with this issue ? Thanks in advance !

0

There are 0 answers