Plotting a heat map with Fst generated from dartR

273 views
Skip to first unread message

Zoriana Lam

unread,
Aug 20, 2023, 8:17:15 AM8/20/23
to dartR
Hi,

I have calculated pairwise Fst using gl.fst.pop(). Not sure if this is a question relating to dartr or ggplot. Is there a way to plot a Fst heatmap using directly the Fst results output generated instead of creating the plot from the results using the 'hierfstat' package?

Cheers,
Zoriana

Jose Luis Mijangos

unread,
Aug 20, 2023, 9:46:06 PM8/20/23
to dartR
Hi Zoriana,

You can try:

> install.packages("dartR.base")
> library(dartR.base)
> res <- gl.report.fstat(possums.gl)

Cheers,
Luis 

Zoriana Lam

unread,
Aug 21, 2023, 7:03:40 AM8/21/23
to dartR
Hi Luis,

Thank you for the code! I have tried install the "dartR.base" package and tried to load the package but there is an error showing:

Registered S3 methods overwritten by 'dartR.base':
  method      from
  cbind.dartR dartR
  rbind.dartR dartR
Error: package or namespace load failed for ‘dartR.base’:
 .onAttach failed in attachNamespace() for 'dartR.base', details:
  call: gsub_(st$close, st$open, text, fixed = TRUE, useBytes = TRUE)
  error: could not find function "gsub_"

Not sure where the problem is.

Cheers,
Zoriana

Bernd.Gruber

unread,
Aug 21, 2023, 7:54:00 PM8/21/23
to da...@googlegroups.com

Hi Zoriana,

 

Can you try to

 

to install rlang from CRAN

 

install.packages("rlang")

 

and see if that fixes ist.

 

Cheers, Bernd

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/fecc52f1-7922-4028-ab28-655d5b7620adn%40googlegroups.com.

Zoriana Lam

unread,
Aug 21, 2023, 9:17:26 PM8/21/23
to dartR
Hi Bernd,

It seems that R doesn't allow me to download the package with the error:

Error in install.packages : Updating loaded packages

R has ask me to restart again in order to possibly download the package but it doesn't work. It happened with the same issue when I tried to download the "dartR.base" package as well.

Cheers,
Zoriana

Bernd.Gruber

unread,
Aug 21, 2023, 9:25:04 PM8/21/23
to da...@googlegroups.com

Can you restart Rstudio and make and install from a R (before loading any package and be aware that you also do not start with a workspace loaded (as this might be already have some packages loaded). Make sure all Restores  are ticked off before you restart Rstiudio (and once installed tick the again so you have the restore option again).

 

 

 

So a fresh restarted R with no loaded packages and then try to install rlang.

Reply all
Reply to author
Forward
0 new messages