Re: [R] Problems running a PGLS model with phylogenetic uncertainty
> On Jun 16, 2018, at 1:37 PM, Hannah van Noort wrote: > > Hi everyone, > > I'm having trouble running a PGLS model with the package "AICmodavg". Did you mean "AICmodavg"? > I > continuously get the error of false convergence with certain Lambda > values (even > when trying to run the model with different Lambda values) and for other La > mbda values I run into "error in eigen(val) : infinite or missing values in > 'X' ". I've tried several optimizers and removing some outlier values but > the same errors keep on popping up.. Does anyone know how to solve this > problem? > Below a part of my script with the specific dependent and independent varia > bles and I've also attached files with the relevant data and phylogenetic > tree information. d <- read.table("~/Seabirddat_growth.txt", head=TRUE) library(AICmodavg) Error in library(AICmodavg) : there is no package called ‘AICmodavg’ library(AICcmodavg) > > Cand.models = list() > niter = 100 > for (i in 1:niter) { > Cand.models[[i]] = gls(Maxgrowthrate ~ log.Forrang+log.Weight_av), A syntax error is thrown here -^ #removed paren > data = > d, method= "ML", na.action=na.omit And here ---^ > correlation = corPagel(value=0.4, trees[[i]])) And after fixing these errors I get the error that `gls` is not found (even after adding `library(AICcmodavg)` could not find function "gls" > ?corPagel No documentation for ‘corPagel’ in specified packages and libraries: you could try ‘??corPagel’ > ??gls > library(nlme) Attaching package: ‘nlme’ The following object is masked from ‘package:dplyr’: collapse > Cand.models = list() > niter = 100 > for (i in 1:niter) { + Cand.models[[i]] = gls(Maxgrowthrate ~ log.Forrang+log.Weight_av, data = + d, method= "ML", na.action=na.omit, + correlation = corPagel(value=0.4, trees[[i]]) ) + } Error in corPagel(value = 0.4, trees[[i]]) : could not find function "corPagel" > ??corPagel > library(ape) Attaching package: ‘ape’ The following object is masked from ‘package:Hmisc’: zoom > Cand.models = list() > niter = 100 > for (i in 1:niter) { + Cand.models[[i]] = gls(Maxgrowthrate ~ log.Forrang+log.Weight_av, data = + d, method= "ML", na.action=na.omit, + correlation = corPagel(value=0.4, trees[[i]]) ) + } Error in corPagel(value = 0.4, trees[[i]]) : object "phy" is not of class "phylo" Perhaps you have yet another unnamed package with a corPagel that doesn't require a second argument of class "phylo"? I've reached "the end of my rope". > } > > Thank you in advance for any help, it's much appreciated! Please submit code that will run in a clean session. Close R. Do not save anything except your history. Delete or rename your `.Rdata` file and staart a fresh session. then include everything needed to get the behavior you are reporting. > > Kind regards, > > Hannah van Noort > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Problems running a PGLS model with phylogenetic uncertainty
Hi everyone, I'm having trouble running a PGLS model with the package "AICmodavg". I continuously get the error of false convergence with certain Lambda values (even when trying to run the model with different Lambda values) and for other La mbda values I run into "error in eigen(val) : infinite or missing values in 'X' ". I've tried several optimizers and removing some outlier values but the same errors keep on popping up.. Does anyone know how to solve this problem? Below a part of my script with the specific dependent and independent varia bles and I've also attached files with the relevant data and phylogenetic tree information. Cand.models = list() niter = 100 for (i in 1:niter) { Cand.models[[i]] = gls(Maxgrowthrate ~ log.Forrang+log.Weight_av), data = d, method= "ML", na.action=na.omit correlation = corPagel(value=0.4, trees[[i]])) } Thank you in advance for any help, it's much appreciated! Kind regards, Hannah van Noort "Maxgrowthrate" "Forrang" "Weight_av" Diomedea_exulans0.6600 1500. 8.6500 Diomedea_epomophora 0.9200 1250. 9. Thalassarche_chrysostoma1.8400 250.3.3250 Thalassarche_bullerina 1200. 2.9100 Thalassarche_melanophrys2.1700 470.3.5700 Phoebetria_palpebatra 1.8400 1350. 2.9500 Macronectes_giganteus 1.7300 200.4.5650 Fulmarus_glacialis 5.0800 500.0.6150 Bulweria_bulwerii na 200.0.9900 Procellaria_aequinoctialis 1.8000 7000. 1.3350 Procellaria_parkinsoni na 200.0.7100 Puffinus_tenuirostris 2.2400 50. 0.5850 Puffinus_puffinus 2.8600 450.0.4200 Oceanites_oceanicus 8. 250.0.0350 Oceanodroma_leucorhoa 3.5600 615.0.0450 Phaethon_rubricauda 2.2400 200.0.6700 Pelecanus_occidentalis 3.6000 20. 3.4500 Fregata_magnificens 0.9000 500.1.4750 Morus_bassanus 3. 300.3. Sula_dactylatra 1.7000 50. 1.9900 Sula_leucogaster2. 40. 1.3500 Sula_sula 1.7000 40. 1.1500 Phalacrocorax_carbo 3.6500 7. 2.7500 Phalacrocorax_aristotelis 3.1100 9. 1.7700 Larus_dominicanus 2. 10. 1.0250 Larus_occidentalis 2.5000 75. 1.1000 Larus_argentatus3.2000 21. 1.1350 Rissa_tridactyla5. 36. 0.4000 Sterna_bergii 3. 40. 0.3600 Sterna_sandvicensis 4.5000 20. 0.2200 Sterna_dougallii6.4000 25. 0.1250 Sterna_hirundo 6.2000 15.2000 0.1350 Sterna_paradisaea 5.9000 20. 0.1180 Sterna_fuscata 2.2000 500.0.2000 Anous_stolidus 3.6000 180.0.1725 Anous_minutus 5. 10. 0.1210 Cepphus_columba 4. 7. 0.5000 Cepphus_grylle 2.9000 4. 0.4700 Uria_lomvia 1.0500 170.1.1000 Alca_torda 3.1000 12. 0.7200__ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R-es] Comparar variables fecha formato POSIXct
Tengo dos dataframe que corresponden a los valores horarios de los contaminantes y el otro a los valores horarios de las variables meteorológicas para el mismo periodo de tiempo. La variable temporal date en ambos dataframe tiene el formato dmy_hms. Los dataframe tienen diferente número de filas. dataframe contaminantes contiene 175247 filas y el dataframe meteorología 175321. Quiero saber cuáles son los valores de la variable date que son distintos en ambos dataframe. He usado la función anti_join de dplyr dándome el siguiente error anti_join(meteorologia$date,contaminantes$date) Error in UseMethod("anti_join") : no applicable method for 'anti_join' applied to an object of class "c('POSIXct', 'POSIXt')" También he empleado el paquete sqldf pero me da el siguiente error sqldf('SELECT * FROM meteorologia EXCEPT SELECT * FROM contaminantes') Error in result_create(conn@ptr, statement) : SELECTs to the left and right of EXCEPT do not have the same number of result columns Gracias [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R] specifying random effects covariance structure in nlme
I haven't played with this for a decade or so, but I believe you can do something with pdBlocked(). Possibly ask over on R-sig-ME as this quickly gets beyond the R-help level. (Also, you are aware that it is not about what you want to estimate, but whether you believe the correlations are nonzero?) -pd > On 16 Jun 2018, at 13:00 , Chris Stride wrote: > > Hi > > I'm trying to fit a mixed effects exponential decay model, in which I have > random effects for the initial value (init), the asymptote (asymp), and the > rate (rate). > > The catch is that I'd also like to estimate the correlation between init and > asymp, but not between init and rate, or asymp and rate. > > Now using random = pdDiag(init + asymp + rate ~ 1) has none of the random > effects correlated > > And using random = pdSymm(init + asymp + rate ~ 1) has all three of the > random effects correlated > > How do I specify just the correlation I want? > > cheers > > Chris > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] mzR fails to install/compile (linuxes)
mzR is a Bioconductor package so you might have more luck contacting the maintainer on the Bioconductor support site https://support.bioconductor.org or on the 'bioc-devel' mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel or most directly by opening an issue on the maintainer's github https://github.com/sneumann/mzR/issues/ this is linked to from the package 'landing page' https://bioconductor.org/packages/mzR Martin Morgan On 06/15/2018 10:49 AM, lejeczek via R-help wrote: hi guys, just an admin here. I wonder if anybody see what I see, or similar? I'm on Centos 7.x and this occurs with R 3.4.x 3.5.x and probably earlier versions too. Every time I use something like -j>1 to pass to a compiler, eg.echo -ne $ "Sys.setenv(MAKEFLAGS = \"-j2\")\\n source(\"https://bioconductor.org/biocLite.R\;)\\n biocLite(c(\"mzR\"), suppressUpdates=FALSE, suppressAutoUpdate=FALSE, ask=FALSE)" | /usr/bin/R --vanilla mzR fails to compile: ... g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o mzR.so cramp.o ramp_base64.o ramp.o RcppRamp.o RcppRampModule.o rnetCDF.o RcppPwiz.o RcppPwizModule.o RcppIdent.o RcppIdentModule.o ./boost/libs/system/src/error_code.o ./boost/libs/regex/src/posix_api.o ./boost/libs/regex/src/fileiter.o ./boost/libs/regex/src/regex_raw_buffer.o ./boost/libs/regex/src/cregex.o ./boost/libs/regex/src/regex_debug.o ./boost/libs/regex/src/instances.o ./boost/libs/regex/src/icu.o ./boost/libs/regex/src/usinstances.o ./boost/libs/regex/src/regex.o ./boost/libs/regex/src/wide_posix_api.o ./boost/libs/regex/src/regex_traits_defaults.o ./boost/libs/regex/src/winstances.o ./boost/libs/regex/src/wc_regex_traits.o ./boost/libs/regex/src/c_regex_traits.o ./boost/libs/regex/src/cpp_regex_traits.o ./boost/libs/regex/src/static_mutex.o ./boost/libs/regex/src/w32_regex_traits.o ./boost/libs/iostreams/src/zlib.o ./boost/libs/iostreams/src/file_descriptor.o ./boost/libs/filesystem/src/operations.o ./boost/libs/filesystem/src/path.o ./boost/libs/filesystem/src/utf8_codecvt_facet.o ./boost/libs/chrono/src/chrono.o ./boost/libs/chrono/src/process_cpu_clocks.o ./boost/libs/chrono/src/thread_clock.o ./pwiz/data/msdata/Version.o ./pwiz/data/identdata/Version.o ./pwiz/data/common/MemoryIndex.o ./pwiz/data/common/CVTranslator.o ./pwiz/data/common/cv.o ./pwiz/data/common/ParamTypes.o ./pwiz/data/common/BinaryIndexStream.o ./pwiz/data/common/diff_std.o ./pwiz/data/common/Unimod.o ./pwiz/data/msdata/mz5/Configuration_mz5.o ./pwiz/data/msdata/mz5/Connection_mz5.o ./pwiz/data/msdata/mz5/Datastructures_mz5.o ./pwiz/data/msdata/mz5/ReferenceRead_mz5.o ./pwiz/data/msdata/mz5/ReferenceWrite_mz5.o ./pwiz/data/msdata/mz5/Translator_mz5.o ./pwiz/data/msdata/SpectrumList_MGF.o ./pwiz/data/msdata/DefaultReaderList.o ./pwiz/data/msdata/ChromatogramList_mzML.o ./pwiz/data/msdata/ChromatogramList_mz5.o ./pwiz/data/msdata/examples.o ./pwiz/data/msdata/Serializer_mzML.o ./pwiz/data/msdata/Serializer_MSn.o ./pwiz/data/msdata/Reader.o ./pwiz/data/msdata/Serializer_mz5.o ./pwiz/data/msdata/Serializer_MGF.o ./pwiz/data/msdata/Serializer_mzXML.o ./pwiz/data/msdata/SpectrumList_mzML.o ./pwiz/data/msdata/SpectrumList_MSn.o ./pwiz/data/msdata/SpectrumList_mz5.o ./pwiz/data/msdata/BinaryDataEncoder.o ./pwiz/data/msdata/Diff.o ./pwiz/data/msdata/MSData.o ./pwiz/data/msdata/References.o ./pwiz/data/msdata/SpectrumList_mzXML.o ./pwiz/data/msdata/IO.o ./pwiz/data/msdata/SpectrumList_BTDX.o ./pwiz/data/msdata/SpectrumInfo.o ./pwiz/data/msdata/RAMPAdapter.o ./pwiz/data/msdata/LegacyAdapter.o ./pwiz/data/msdata/SpectrumIterator.o ./pwiz/data/msdata/MSDataFile.o ./pwiz/data/msdata/MSNumpress.o ./pwiz/data/msdata/SpectrumListCache.o ./pwiz/data/msdata/Index_mzML.o ./pwiz/data/msdata/SpectrumWorkerThreads.o ./pwiz/data/identdata/IdentDataFile.o ./pwiz/data/identdata/IdentData.o ./pwiz/data/identdata/DefaultReaderList.o ./pwiz/data/identdata/Reader.o ./pwiz/data/identdata/Serializer_protXML.o ./pwiz/data/identdata/Serializer_pepXML.o ./pwiz/data/identdata/Serializer_mzid.o ./pwiz/data/identdata/IO.o ./pwiz/data/identdata/References.o ./pwiz/data/identdata/MascotReader.o ./pwiz/data/proteome/Modification.o ./pwiz/data/proteome/Digestion.o ./pwiz/data/proteome/Peptide.o ./pwiz/data/proteome/AminoAcid.o ./pwiz/utility/minimxml/XMLWriter.o ./pwiz/utility/minimxml/SAXParser.o ./pwiz/utility/chemistry/Chemistry.o ./pwiz/utility/chemistry/ChemistryData.o ./pwiz/utility/chemistry/MZTolerance.o ./pwiz/utility/misc/IntegerSet.o ./pwiz/utility/misc/Base64.o ./pwiz/utility/misc/IterationListener.o ./pwiz/utility/misc/MSIHandler.o ./pwiz/utility/misc/Filesystem.o ./pwiz/utility/misc/TabReader.o ./pwiz/utility/misc/random_access_compressed_ifstream.o ./pwiz/utility/misc/SHA1.o ./pwiz/utility/misc/SHA1Calculator.o ./pwiz/utility/misc/sha1calc.o ./random_access_gzFile.o ./RcppExports.o ./boost/libs/thread/src/pthread/once.o
[R] specifying random effects covariance structure in nlme
Hi I'm trying to fit a mixed effects exponential decay model, in which I have random effects for the initial value (init), the asymptote (asymp), and the rate (rate). The catch is that I'd also like to estimate the correlation between init and asymp, but not between init and rate, or asymp and rate. Now using random = pdDiag(init + asymp + rate ~ 1) has none of the random effects correlated And using random = pdSymm(init + asymp + rate ~ 1) has all three of the random effects correlated How do I specify just the correlation I want? cheers Chris __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] mzR fails to install/compile (linuxes)
This is almost certainly a Makefile error. Something (A) is relying on something (B) without stating the dependency explicitly in the Makefile. You can get away with that (sometimes) in a non-parallel make, because the sequence of compilations is such that B gets built before A. However, with a parallel make, one thread may try to build A before B gets built by another thread. The fix is to add the dependency in the Makefile (plus any other issues of the same kind). In this case, AFAICT, you need mzR.so: cramp.o in addition to what might be there already and any other stuff that is also missing. If there is already something like mzR.so: $(OBJECTS) chances are that there is a deficient macro definition earlier on, so that cramp.o is not contained in OBJECTS. -pd > On 15 Jun 2018, at 16:49 , lejeczek via R-help wrote: > > hi guys, just an admin here. > > I wonder if anybody see what I see, or similar? I'm on Centos 7.x and this > occurs with R 3.4.x 3.5.x and probably earlier versions too. > > Every time I use something like -j>1 to pass to a compiler, eg.echo -ne > > $ "Sys.setenv(MAKEFLAGS = \"-j2\")\\n > source(\"https://bioconductor.org/biocLite.R\;)\\n biocLite(c(\"mzR\"), > suppressUpdates=FALSE, suppressAutoUpdate=FALSE, ask=FALSE)" | /usr/bin/R > --vanilla > > mzR fails to compile: > ... > g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o mzR.so > cramp.o ramp_base64.o ramp.o RcppRamp.o RcppRampModule.o rnetCDF.o RcppPwiz.o > RcppPwizModule.o RcppIdent.o RcppIdentModule.o > ./boost/libs/system/src/error_code.o ./boost/libs/regex/src/posix_api.o > ./boost/libs/regex/src/fileiter.o ./boost/libs/regex/src/regex_raw_buffer.o > ./boost/libs/regex/src/cregex.o ./boost/libs/regex/src/regex_debug.o > ./boost/libs/regex/src/instances.o ./boost/libs/regex/src/icu.o > ./boost/libs/regex/src/usinstances.o ./boost/libs/regex/src/regex.o > ./boost/libs/regex/src/wide_posix_api.o > ./boost/libs/regex/src/regex_traits_defaults.o > ./boost/libs/regex/src/winstances.o ./boost/libs/regex/src/wc_regex_traits.o > ./boost/libs/regex/src/c_regex_traits.o > ./boost/libs/regex/src/cpp_regex_traits.o > ./boost/libs/regex/src/static_mutex.o > ./boost/libs/regex/src/w32_regex_traits.o ./boost/libs/iostreams/src/zlib.o > ./boost/libs/iostreams/src/file_descriptor.o > ./boost/libs/filesystem/src/operations.o ./boost/libs/filesystem/src/path.o > ./boost/libs/filesystem/src/utf8_codecvt_facet.o > ./boost/libs/chrono/src/chrono.o ./boost/libs/chrono/src/process_cpu_clocks.o > ./boost/libs/chrono/src/thread_clock.o ./pwiz/data/msdata/Version.o > ./pwiz/data/identdata/Version.o ./pwiz/data/common/MemoryIndex.o > ./pwiz/data/common/CVTranslator.o ./pwiz/data/common/cv.o > ./pwiz/data/common/ParamTypes.o ./pwiz/data/common/BinaryIndexStream.o > ./pwiz/data/common/diff_std.o ./pwiz/data/common/Unimod.o > ./pwiz/data/msdata/mz5/Configuration_mz5.o > ./pwiz/data/msdata/mz5/Connection_mz5.o > ./pwiz/data/msdata/mz5/Datastructures_mz5.o > ./pwiz/data/msdata/mz5/ReferenceRead_mz5.o > ./pwiz/data/msdata/mz5/ReferenceWrite_mz5.o > ./pwiz/data/msdata/mz5/Translator_mz5.o ./pwiz/data/msdata/SpectrumList_MGF.o > ./pwiz/data/msdata/DefaultReaderList.o > ./pwiz/data/msdata/ChromatogramList_mzML.o > ./pwiz/data/msdata/ChromatogramList_mz5.o ./pwiz/data/msdata/examples.o > ./pwiz/data/msdata/Serializer_mzML.o ./pwiz/data/msdata/Serializer_MSn.o > ./pwiz/data/msdata/Reader.o ./pwiz/data/msdata/Serializer_mz5.o > ./pwiz/data/msdata/Serializer_MGF.o ./pwiz/data/msdata/Serializer_mzXML.o > ./pwiz/data/msdata/SpectrumList_mzML.o ./pwiz/data/msdata/SpectrumList_MSn.o > ./pwiz/data/msdata/SpectrumList_mz5.o ./pwiz/data/msdata/BinaryDataEncoder.o > ./pwiz/data/msdata/Diff.o ./pwiz/data/msdata/MSData.o > ./pwiz/data/msdata/References.o ./pwiz/data/msdata/SpectrumList_mzXML.o > ./pwiz/data/msdata/IO.o ./pwiz/data/msdata/SpectrumList_BTDX.o > ./pwiz/data/msdata/SpectrumInfo.o ./pwiz/data/msdata/RAMPAdapter.o > ./pwiz/data/msdata/LegacyAdapter.o ./pwiz/data/msdata/SpectrumIterator.o > ./pwiz/data/msdata/MSDataFile.o ./pwiz/data/msdata/MSNumpress.o > ./pwiz/data/msdata/SpectrumListCache.o ./pwiz/data/msdata/Index_mzML.o > ./pwiz/data/msdata/SpectrumWorkerThreads.o > ./pwiz/data/identdata/IdentDataFile.o ./pwiz/data/identdata/IdentData.o > ./pwiz/data/identdata/DefaultReaderList.o ./pwiz/data/identdata/Reader.o > ./pwiz/data/identdata/Serializer_protXML.o > ./pwiz/data/identdata/Serializer_pepXML.o > ./pwiz/data/identdata/Serializer_mzid.o ./pwiz/data/identdata/IO.o > ./pwiz/data/identdata/References.o ./pwiz/data/identdata/MascotReader.o > ./pwiz/data/proteome/Modification.o ./pwiz/data/proteome/Digestion.o > ./pwiz/data/proteome/Peptide.o ./pwiz/data/proteome/AminoAcid.o > ./pwiz/utility/minimxml/XMLWriter.o ./pwiz/utility/minimxml/SAXParser.o > ./pwiz/utility/chemistry/Chemistry.o ./pwiz/utility/chemistry/ChemistryData.o > ./pwiz/utility/chemistry/MZTolerance.o