[adegenet-forum] df2genind function unexpected behavior

Vojtěch Zeisek vojta at trapa.cz
Wed Jan 4 16:17:19 CET 2017


Hello,
if You load new library and it by coincidence contain a function with same 
name as one of the already loaded functions, the old one is replaced by the 
new one. When loading such library, the R says which functions are replaced. 
This can be common source of problems. Check it.
Sincerely,
V.

Dne středa 4. ledna 2017 15:05:03 CET, Tagliamonte,Massimiliano S napsal(a):
> Thank you for your help, Roman,
> 
> By asking me to provide an example you made me realize something. I tried
> again this morning, with exactly the same commands, and could not reproduce
>  the issue. This is weird. It is not the first time it happens though, i.e.
> getting unexpected behavior in R which I could not replicate after
> rebooting. I have no idea what the cause could be. Some of the packages I
> had loaded yesterday (apart from Adegenet) were not loaded today. I guess
> I'll have to be even more paranoid and check that each step of my analysis
> does what is supposed to be doing.
> 
> Cheers,
> 
> Max
> 
> ________________________________
> From: Roman Luštrik <roman.lustrik at biolitika.si>
> Sent: Tuesday, January 3, 2017 5:44 PM
> To: Tagliamonte,Massimiliano S
> Cc: adegenet-forum at lists.r-forge.r-project.org
> Subject: Re: [adegenet-forum] df2genind function unexpected behavior
> 
> Can you provide a reproducible example?
> 
> FWIW, you can use accessor functions like `tab(genind_obj)` or access the
> other slot through `other(genind_obj)`, e.g.
> 
> library(adegenet)
> 
> data(nancycats)
> 
> other(nancycats)$xy
> 
> or assigning things
> 
> other(nancycats)$xy <- xy_object
> 
> To access genotypes, you can use
> 
> tab(nancycats)
> 
> Cheers,
> Roman
> 
> ________________________________
> From: "Tagliamonte,Massimiliano S" <mstagliamonte at ufl.edu>
> To: "adegenet-forum at lists.r-forge.r-project.org"
> <adegenet-forum at r-forge.wu-wien.ac.at> Sent: Tuesday, January 3, 2017
> 10:36:20 PM
> Subject: Re: [adegenet-forum] df2genind function unexpected behavior
> 
> Update:
> 
> OK, I have replaced the dots (".") in the names with "_", now the order of
> the isolates is maintained. I'll have to keep in mind this behavior. I
> guess it's a bad idea to introduce special characters in my data in R.
-- 
Vojtěch Zeisek
https://trapa.cz/en/

Department of Botany
Faculty of Science, Charles University
Benátská 433/2, Prague, 12801, CZ
https://www.natur.cuni.cz/biology/botany/

Institute of Botany, Academy of Sciences
Zámek 1, Průhonice, 25243, CZ
http://www.ibot.cas.cz/en/

Czech Republic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170104/1c8b6450/attachment.sig>


More information about the adegenet-forum mailing list