[adegenet-forum] sPCA function deprecated, won't knit in Rmarkdown

Phil Morin (NOAA Federal) phillip.morin at noaa.gov
Thu Nov 29 02:08:19 CET 2018


Hi,

I'm using the sPCA function in adegenet, and get the warning:

This function is now deprecated. Please use the 'multispati' function in 
the 'adespatial' package.

I can't find any information on what this refers to or how to fix it. 
The sPCA output still appears to be what I expect, and functions 
properly for downstream analyses and data plotting (though I get similar 
messages for some of the other spca plotting functions).

Coincidentally, a couple of the adegenet functions appear to be 
incompatible with the knit function in Rmarkdown. when I try to run my 
script in Rmarkdown it runs fine, but if I try to knit it to a docx 
file, the sPCA function causes an error that prevents the knit document 
from being completed. It produces a docx file that opens as an image 
file (in Preview on my Mac instead of in MS Word), but it's truncated at 
the sPCA command, and if I close it and try to open the saved docx file, 
it can't open due to an "xml parsing error". Knitting to a pdf file 
works fine for the sPCA function.

I have verified that I can use the knit function successfully for all of 
my document up to the point of running the sPCA function:

mySpca <- spca(obj, type=5,d1=0,d2=2,scannf=FALSE, nfposi = 5, nfnega = 2)

I also get an fatal error when I try to knit to a pdf file if I add the 
"screeplot" function (screeplot(mySpca)).

! Package inputenc Error: Unicode character ^^U (U+15) (inputenc) not 
set up for use with LaTeX. Error: Failed to compile 
sPCA_SNPs_AK3WC4_test.tex. See sPCA_SNPs_AK3WC4_test.log for more info.

The log file says about the same thing. I haven't been able to figure 
out what the character is that hasn't been 'set up', or how to set it up.

Phil


-- 
--
Phillip A. Morin, Ph.D.
Southwest Fisheries Science Center
8901 La Jolla Shores Dr.
La Jolla, CA 92037, USA
Phone: 858-546-7165
Fax: 858-546-7003
phillip.morin at noaa.gov
http://swfsc.noaa.gov/mmtd-mmgenetics

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20181128/b1bcd234/attachment.html>


More information about the adegenet-forum mailing list