Add population info using gl2structure?

166 views
Skip to first unread message

Caroline Chong

unread,
Oct 19, 2021, 12:55:14 AM10/19/21
to dartR
Hi Luis and all,

I am wondering how to correctly add the population information stored in a genlight to the Structure file generated using gl2structure.

I have a genlight that has gone through basic filtering and removal of some individuals (and recalculation of metrics). Then if 

gl2structure(gl.data.filt.struct, indNames = NULL, addcolumns = 1, ploidy = 2,...)

The error returned is
Error in gl2structure(gl.data.filt.struct, indNames = NULL, addcolumns = 1,  : 
  Fatal Error: No. of individuals in user-specified addColumns and no. of individuals in supplied genlight object x does not match

Can you suggest what I need to do to the genlight object, or what needs to happen in the gl2structure function, so that we can add the population info automatically to the Structure file? Running gl2structure with addcolumns = NULL works fine and produces a .str file as expected (without population info).

Many thanks!
Regards, Caroline.

Jose Luis Mijangos

unread,
Oct 19, 2021, 2:10:35 AM10/19/21
to dartR
Hi Caroline,

The description of what should be the input for "addcolumns" is not very clear. The input should be a vector with as many elements as there are individuals. in the case of population information (PopData) should be an integer as described in Structure Manual. 

So, to add the population information you can use:

> gl2structure(gl.data.filt.struct, indNames = NULL, addcolumns = as.numeric(gl.data.filt.struct$pop), ploidy = 2,outpath = getwd())

Also, if you want to set the PopFlag to active the option USEPOPINFO, you can use:

> gl2structure(gl.data.filt.struct, indNames = NULL, addcolumns = cbind(as.numeric(gl.data.filt.struct$pop),1), ploidy = 2,outpath = getwd())

Cheers,
Luis

Caroline Chong

unread,
Oct 19, 2021, 2:17:32 AM10/19/21
to dartR
Hi Luis,

Ah, that's perfect. Thank you!

Regards, Caroline.

Rajneesh Paliwal

unread,
Jan 13, 2022, 10:40:12 AM1/13/22
to da...@googlegroups.com
Dear Jose, 
I have update my R version 4.1.2 and R studio today. Now my dart R is not working and showing following issue, please help me to load it successfully.
It looks rgdal library issue in new mac version. Could you help me.
Best regards
Rajneesh

I used following script after update and issue are below

> library(dartR)
Registered S3 method overwritten by 'GGally':
  method from  
  +.gg   ggplot2
Registered S3 method overwritten by 'genetics':
  method      from
  [.haplotype pegas
Error: package or namespace load failed for ‘dartR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so
  Reason: image not found
> install.packages("dartR")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/dartR_1.9.9.1.tgz'
Content type 'application/x-gzip' length 3002929 bytes (2.9 MB)
==================================================
downloaded 2.9 MB


The downloaded binary packages are in
/var/folders/w0/sk8d6yzx1z179g8zxbh6vtj40000gn/T//Rtmpc5qgQo/downloaded_packages
> library(dartR)
Error: package or namespace load failed for ‘dartR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal/libs/rgdal.so
  Reason: image not found
> remove.packages("rgdal")
Removing package from ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library’
(as ‘lib’ is unspecified)
> install.packages("rgdal", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.5-28.tar.gz'
Content type 'application/x-gzip' length 4511100 bytes (4.3 MB)
==================================================
downloaded 4.3 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++14
configure: CFLAGS: -Wall -g -O2
configure: CPPFLAGS: -I/usr/local/include
configure: CXXFLAGS: -Wall -g -O2
configure: LDFLAGS: -L/usr/local/lib
configure: LDFLAGS: -L/usr/local/lib
configure: CXX11 is: clang++ -mmacosx-version-min=10.13, CXX11STD is: -std=gnu++11
configure: CXX is: clang++ -mmacosx-version-min=10.13 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-28
checking for /usr/bin/svnversion... no
configure: svn revision: 1158
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/w0/sk8d6yzx1z179g8zxbh6vtj40000gn/T/Rtmpc5qgQo/downloaded_packages’
> library(rgdal)
Error in library(rgdal) : there is no package called ‘rgdal’
> devtools::install_github("CRAN/rgdal")
Downloading GitHub repo CRAN/rgdal@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  :
  download from 'https://api.github.com/repos/CRAN/rgdal/tarball/HEAD' failed
> install.packages("rgdal", repos="http://R-Forge.R-project.org")
Warning in install.packages :
  unable to access index for repository http://R-Forge.R-project.org/bin/macosx/contrib/4.1:
  cannot open URL 'http://R-Forge.R-project.org/bin/macosx/contrib/4.1/PACKAGES'
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘rgdal’
Do you want to attempt to install these from sources? (Yes/no/cancel) nstall.packages(c("rgdal","sf"),,"https://mac.R-project.org")
Error in install.packages : Unrecognized response “nstall.packages(c("rgdal","sf"),,"https://mac.R-project.org")”
> install.packages(c("rgdal","sf"),,"https://mac.R-project.org")
Warning in install.packages :
  unable to access index for repository https://mac.R-project.org/src/contrib:
  download from 'https://mac.R-project.org/src/contrib/PACKAGES' failed
Warning in install.packages :
  packages ‘rgdal’, ‘sf’ are not available for this version of R

Versions of these packages for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> install.packages(c("rgdal","sf"),,"https://r-forge.r-project.org/projects/rgdal/")
Warning in install.packages :
  unable to access index for repository https://r-forge.r-project.org/projects/rgdal/src/contrib:
  Line starting '<?xml version="1.0"  ...' is malformed!
Warning in install.packages :
  packages ‘rgdal’, ‘sf’ are not available for this version of R

Versions of these packages for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
  unable to access index for repository https://r-forge.r-project.org/projects/rgdal/bin/macosx/contrib/4.1:
  Line starting '<?xml version="1.0"  ...' is malformed!

Rajneesh Paliwal, PhD (DAAD Fellow)

Associate Scientist

Genetic Resources Center

International Inst. for Tropical Agriculture

Oyo Road PMB-5320, Ibadan, Nigeria



--
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/feebcf7b-4a26-4af6-b8af-0adeda80a9e6n%40googlegroups.com.

Rajneesh Paliwal

unread,
Jan 13, 2022, 11:34:58 AM1/13/22
to da...@googlegroups.com
Dear Jose, 
I tried it again but same issue

 install_github("green-striped-gecko/dartR")
Downloading GitHub repo green-striped-gecko/dartR@HEAD

Error in utils::download.file(url, path, method = method, quiet = quiet,  :
  download from 'https://api.github.com/repos/green-striped-gecko/dartR/tarball/HEAD' failed
> install.packages("dartR")
Warning in install.packages :
  dependency ‘SNPRelate’ is not available
also installing the dependencies ‘base64enc’, ‘sass’, ‘jquerylib’, ‘colorspace’, ‘hms’, ‘backports’, ‘pixmap’, ‘httpuv’, ‘fontawesome’, ‘htmltools’, ‘sourcetools’, ‘later’, ‘promises’, ‘bslib’, ‘segmented’, ‘farver’, ‘labeling’, ‘munsell’, ‘RColorBrewer’, ‘viridisLite’, ‘png’, ‘terra’, ‘R.oo’, ‘R.methodsS3’, ‘combinat’, ‘gdata’, ‘mvtnorm’, ‘forcats’, ‘progress’, ‘RcppParallel’, ‘RcppEigen’, ‘broom’, ‘truncnorm’, ‘ade4’, ‘igraph’, ‘shiny’, ‘seqinr’, ‘reshape2’, ‘gtable’, ‘isoband’, ‘scales’, ‘Rcpp’, ‘tidyselect’, ‘permute’, ‘pegas’, ‘doParallel’, ‘RgoogleMaps’, ‘gap’, ‘calibrate’, ‘xtable’, ‘dismo’, ‘reshape’, ‘R.utils’, ‘genetics’, ‘rgdal’, ‘gdistance’, ‘mmod’, ‘GGally’, ‘data.table’, ‘raster’, ‘gaston’, ‘gtools’, ‘DEoptimR’, ‘mice’, ‘Rsolnp’, ‘iterators’, ‘generics’, ‘adegenet’, ‘ggplot2’, ‘plyr’, ‘tidyr’, ‘ape’, ‘vegan’, ‘StAMPP’, ‘sp’, ‘PopGenReport’, ‘hierfstat’, ‘robustbase’, ‘gridExtra’, ‘HardyWeinberg’, ‘foreach’, ‘dplyr’


  There is a binary version available but the source version is later:
      binary source needs_compilation
terra 1.4-22 1.5-12              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/base64enc_0.1-3.tgz'
Content type 'application/x-gzip' length 31642 bytes (30 KB)
==================================================
downloaded 30 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/sass_0.4.0.tgz'
Content type 'application/x-gzip' length 2388256 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/jquerylib_0.1.4.tgz'
Content type 'application/x-gzip' length 525978 bytes (513 KB)
==================================================
downloaded 513 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/colorspace_2.0-2.tgz'
Content type 'application/x-gzip' length 2618801 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/hms_1.1.1.tgz'
Content type 'application/x-gzip' length 98015 bytes (95 KB)
==================================================
downloaded 95 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/backports_1.4.1.tgz'
Content type 'application/x-gzip' length 98448 bytes (96 KB)
==================================================
downloaded 96 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/pixmap_0.4-12.tgz'
Content type 'application/x-gzip' length 202444 bytes (197 KB)
==================================================
downloaded 197 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/httpuv_1.6.5.tgz'
Content type 'application/x-gzip' length 2746719 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/fontawesome_0.2.2.tgz'
Content type 'application/x-gzip' length 1530165 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/htmltools_0.5.2.tgz'
Content type 'application/x-gzip' length 333000 bytes (325 KB)
==================================================
downloaded 325 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/sourcetools_0.1.7.tgz'
Content type 'application/x-gzip' length 138851 bytes (135 KB)
==================================================
downloaded 135 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/later_1.3.0.tgz'
Content type 'application/x-gzip' length 623693 bytes (609 KB)
==================================================
downloaded 609 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/promises_1.2.0.1.tgz'
Content type 'application/x-gzip' length 1782018 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/bslib_0.3.1.tgz'
Content type 'application/x-gzip' length 4780706 bytes (4.6 MB)
==================================================
downloaded 4.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/segmented_1.3-4.tgz'
Content type 'application/x-gzip' length 537106 bytes (524 KB)
==================================================
downloaded 524 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/farver_2.1.0.tgz'
Content type 'application/x-gzip' length 1949853 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/labeling_0.4.2.tgz'
Content type 'application/x-gzip' length 60282 bytes (58 KB)
==================================================
downloaded 58 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/munsell_0.5.0.tgz'
Content type 'application/x-gzip' length 241442 bytes (235 KB)
==================================================
downloaded 235 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/RColorBrewer_1.1-2.tgz'
Content type 'application/x-gzip' length 52954 bytes (51 KB)
==================================================
downloaded 51 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/viridisLite_0.4.0.tgz'
Content type 'application/x-gzip' length 1296462 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/png_0.1-7.tgz'
Content type 'application/x-gzip' length 369578 bytes (360 KB)
==================================================
downloaded 360 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/R.oo_1.24.0.tgz'
Content type 'application/x-gzip' length 967997 bytes (945 KB)
==================================================
downloaded 945 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/R.methodsS3_1.8.1.tgz'
Content type 'application/x-gzip' length 79827 bytes (77 KB)
==================================================
downloaded 77 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/combinat_0.0-8.tgz'
Content type 'application/x-gzip' length 40529 bytes (39 KB)
==================================================
downloaded 39 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gdata_2.18.0.tgz'
Content type 'application/x-gzip' length 1219791 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/mvtnorm_1.1-3.tgz'
Content type 'application/x-gzip' length 260297 bytes (254 KB)
==================================================
downloaded 254 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/forcats_0.5.1.tgz'
Content type 'application/x-gzip' length 354324 bytes (346 KB)
==================================================
downloaded 346 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/progress_1.2.2.tgz'
Content type 'application/x-gzip' length 83429 bytes (81 KB)
==================================================
downloaded 81 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/RcppParallel_5.1.5.tgz'
Content type 'application/x-gzip' length 612491 bytes (598 KB)
==================================================
downloaded 598 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/RcppEigen_0.3.3.9.1.tgz'
Content type 'application/x-gzip' length 4851252 bytes (4.6 MB)
==================================================
downloaded 4.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/broom_0.7.11.tgz'
Content type 'application/x-gzip' length 1800952 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/truncnorm_1.0-8.tgz'
Content type 'application/x-gzip' length 33916 bytes (33 KB)
==================================================
downloaded 33 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/ade4_1.7-18.tgz'
Content type 'application/x-gzip' length 5315183 bytes (5.1 MB)
==================================================
downloaded 5.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/igraph_1.2.11.tgz'
Content type 'application/x-gzip' length 7298507 bytes (7.0 MB)
==================================================
downloaded 7.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/shiny_1.7.1.tgz'
Content type 'application/x-gzip' length 4174652 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/seqinr_4.2-8.tgz'
Content type 'application/x-gzip' length 4142127 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/reshape2_1.4.4.tgz'
Content type 'application/x-gzip' length 331915 bytes (324 KB)
==================================================
downloaded 324 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gtable_0.3.0.tgz'
Content type 'application/x-gzip' length 431504 bytes (421 KB)
==================================================
downloaded 421 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/isoband_0.2.5.tgz'
Content type 'application/x-gzip' length 3379737 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/scales_1.1.1.tgz'
Content type 'application/x-gzip' length 550673 bytes (537 KB)
==================================================
downloaded 537 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/Rcpp_1.0.7.tgz'
Content type 'application/x-gzip' length 3207179 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/tidyselect_1.1.1.tgz'
Content type 'application/x-gzip' length 198270 bytes (193 KB)
==================================================
downloaded 193 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/permute_0.9-5.tgz'
Content type 'application/x-gzip' length 499950 bytes (488 KB)
==================================================
downloaded 488 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/pegas_1.1.tgz'
Content type 'application/x-gzip' length 1040795 bytes (1016 KB)
==================================================
downloaded 1016 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/doParallel_1.0.16.tgz'
Content type 'application/x-gzip' length 59803 bytes (58 KB)
==================================================
downloaded 58 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/RgoogleMaps_1.4.5.3.tgz'
Content type 'application/x-gzip' length 493359 bytes (481 KB)
==================================================
downloaded 481 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gap_1.2.3-1.tgz'
Content type 'application/x-gzip' length 2732366 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/calibrate_1.7.7.tgz'
Content type 'application/x-gzip' length 355227 bytes (346 KB)
==================================================
downloaded 346 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/xtable_1.8-4.tgz'
Content type 'application/x-gzip' length 701448 bytes (685 KB)
==================================================
downloaded 685 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/dismo_1.3-5.tgz'
Content type 'application/x-gzip' length 2241491 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/reshape_0.8.8.tgz'
Content type 'application/x-gzip' length 167909 bytes (163 KB)
==================================================
downloaded 163 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/R.utils_2.11.0.tgz'
Content type 'application/x-gzip' length 1408372 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/genetics_1.3.8.1.3.tgz'
Content type 'application/x-gzip' length 373821 bytes (365 KB)
==================================================
downloaded 365 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/rgdal_1.5-28.tgz'
Content type 'application/x-gzip' length 91041577 bytes (86.8 MB)
==================================================
downloaded 86.8 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gdistance_1.3-6.tgz'
Content type 'application/x-gzip' length 1385424 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/mmod_1.3.3.tgz'
Content type 'application/x-gzip' length 289576 bytes (282 KB)
==================================================
downloaded 282 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/GGally_2.1.2.tgz'
Content type 'application/x-gzip' length 1636720 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/data.table_1.14.2.tgz'
Content type 'application/x-gzip' length 2336276 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/raster_3.5-11.tgz'
Content type 'application/x-gzip' length 4812357 bytes (4.6 MB)
==================================================
downloaded 4.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gaston_1.5.7.tgz'
Content type 'application/x-gzip' length 12346839 bytes (11.8 MB)
==================================================
downloaded 11.8 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gtools_3.9.2.tgz'
Content type 'application/x-gzip' length 354295 bytes (345 KB)
==================================================
downloaded 345 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/DEoptimR_1.0-10.tgz'
Content type 'application/x-gzip' length 40214 bytes (39 KB)
==================================================
downloaded 39 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/mice_3.14.0.tgz'
Content type 'application/x-gzip' length 1722000 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/Rsolnp_1.16.tgz'
Content type 'application/x-gzip' length 249345 bytes (243 KB)
==================================================
downloaded 243 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/iterators_1.0.13.tgz'
Content type 'application/x-gzip' length 334325 bytes (326 KB)
==================================================
downloaded 326 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/generics_0.1.1.tgz'
Content type 'application/x-gzip' length 74920 bytes (73 KB)
==================================================
downloaded 73 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/adegenet_2.1.5.tgz'
Content type 'application/x-gzip' length 2830546 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/ggplot2_3.3.5.tgz'
Content type 'application/x-gzip' length 4125542 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/plyr_1.8.6.tgz'
Content type 'application/x-gzip' length 1015776 bytes (991 KB)
==================================================
downloaded 991 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/tidyr_1.1.4.tgz'
Content type 'application/x-gzip' length 964401 bytes (941 KB)
==================================================
downloaded 941 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/ape_5.6-1.tgz'
Content type 'application/x-gzip' length 3631117 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/vegan_2.5-7.tgz'
Content type 'application/x-gzip' length 3636938 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/StAMPP_1.6.3.tgz'
Content type 'application/x-gzip' length 132678 bytes (129 KB)
==================================================
downloaded 129 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/sp_1.4-6.tgz'
Content type 'application/x-gzip' length 2224315 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/PopGenReport_3.0.4.tgz'
Content type 'application/x-gzip' length 2087708 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/hierfstat_0.5-10.tgz'
Content type 'application/x-gzip' length 469080 bytes (458 KB)
==================================================
downloaded 458 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/robustbase_0.93-9.tgz'
Content type 'application/x-gzip' length 3141126 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gridExtra_2.3.tgz'
Content type 'application/x-gzip' length 1102731 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/HardyWeinberg_1.7.4.tgz'
Content type 'application/x-gzip' length 1507500 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/foreach_1.5.1.tgz'
Content type 'application/x-gzip' length 133610 bytes (130 KB)
==================================================
downloaded 130 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/dplyr_1.0.7.tgz'
Content type 'application/x-gzip' length 1263555 bytes (1.2 MB)
==================================================
downloaded 1.2 MB


trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/dartR_1.9.9.1.tgz'
Content type 'application/x-gzip' length 3002929 bytes (2.9 MB)
==================================================
downloaded 2.9 MB


The downloaded binary packages are in
/var/folders/w0/sk8d6yzx1z179g8zxbh6vtj40000gn/T//RtmpEf4Jrp/downloaded_packages
installing the source package ‘terra’

trying URL 'https://cran.rstudio.com/src/contrib/terra_1.5-12.tar.gz'
Content type 'application/x-gzip' length 624884 bytes (610 KB)
==================================================
downloaded 610 KB

* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11

checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/terra’
Warning in install.packages :
  installation of package ‘terra’ had non-zero exit status


The downloaded source packages are in
‘/private/var/folders/w0/sk8d6yzx1z179g8zxbh6vtj40000gn/T/RtmpEf4Jrp/downloaded_packages’


Rajneesh Paliwal, PhD (DAAD Fellow)

Associate Scientist

Genetic Resources Center

International Inst. for Tropical Agriculture

Oyo Road PMB-5320, Ibadan, Nigeria


Jose Luis Mijangos

unread,
Jan 13, 2022, 7:54:02 PM1/13/22
to dartR
Hi Rajneesh,

Can you try:

> install.packages("rgdal")
# restart your Rstudio session and then
> devtools::install_github("green-striped-gecko/dartR@beta")
# restart your Rstudio session
> library(dartR)

Cheers,
Luis
Reply all
Reply to author
Forward
0 new messages