Re: [R-sig-eco] change axis scale plot R

2021-06-03 Thread Torsten Hauffe
Hi Luis,

You can avoid the pixelation by exporting your plot as vector graphics
(e.g. functions pdf() or svg()) instead of pixel formats (i.e. png(),
tiff() etc). There is also ggsave("MyPlot.pdf") but I don't know about
ggplot very well.

pdf("MyPlot.pdf")
p=  plot_model(m5, type = "pred", terms = c("Pt[n=100]", "Pa"),
digits=1,line.size=0.5,show.data=T,colors=c("green","#00a0c9","red"))
dev.off()

On Thu, Jun 3, 2021 at 10:10 AM Luis Fernando García 
wrote:

>   Dear all,
>
> I am wanting to improve a plot made with the package sjPlot.
>
> When plotting this model
>
>
> Plot produced looks like this
>
> https://docs.google.com/presentation/d/1Pqm6BcJXdSQ6U1zmv5FV7gBcn1afHHv7rlQHe6j59_c/edit?usp=sharing
> ,
> especially red and green lines.
>
> I just have two concerns with this, the first one is that lines seem a bit
> pixelated, and I would like to improve it, I have tried some approaches but
> it has not been possible.
>
> Dataset in this link:
>
> https://docs.google.com/spreadsheets/d/1nXerN91Iehe9OM1VGDMS3jnbvvF1tWcuS9bGtlrj_Ss/edit?usp=sharing
>
> library(geepack)
> library(ggplot2)
> library(sjPlot)
> library(ggeffects)
> #Copy dataset before following the code
> dat <- read.delim("clipboard", dec=","); attach(dat)
>
> dat$Id <- as.integer(factor(dat$Esp))
> str(dat)
> m5 <- geeglm(
>   formula = tim ~ Pa*Pt,
>   family = Gamma(link = log),
>   data = dat,
>   id = Id,
>   corstr = "exchangeable"
> )
>
> anova(m5,test="chisq")
>
> p=  plot_model(m5, type = "pred", terms = c("Pt[n=100]", "Pa"),
> digits=1,line.size=0.5,show.data=T,colors=c("green","#00a0c9","red"))
>
> p
>
> The second one, is I would like to remove the decimal values (i.e. in the x
> axis), however I´m not very sure if it is possible to do this in sjPlot or
> if you know a similar alternative in ggplot2. I tried this approach but it
> did not work.
>
> p=p+ scale_x_discrete(limits=c(1,2,3))
> p
>
> When making this plot, there is a space before 1 and after 3 I would like
> to erase.
>
> Best
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Error in Maxent (dismo package)

2020-09-22 Thread Torsten Hauffe
Hi,

I can't try it but maybe you need a vector with all factorial predictors.
Hence, put them all in c().

me <- maxent(predictors, occtrain, factors=c("bion","morfo", "sed"))

On Tue, Sep 22, 2020 at 10:08 AM Irene Rojo  wrote:

> Dear all,
>
> I am fitting maxent models within the dismo package but I have some doubts
> regarding the number of categorical variables (factors) that I can include
> in the model. All my variables are raster (.asc).
>
> When I perform the model with just one factor (me <- maxent(predictors,
> occtrain, factors="bion")) it runs and everything works fine, but when I
> try to add more factors (me <- maxent(predictors, occtrain, factors="bion",
> "morfo", "sed")) I get the following error:
>
> Error in .getMatrix(a) :
>   data should be  a matrix, data.frame, or SpatialPoints* object
>
> When I just include one factor (whatever the variable is) it works, so I
> don't know if it is a syntax problem and I am not including the rest of the
> factors in a proper way (separated by commas), or if it is not possible to
> add more than one factor.
>
> Any advice will be much appreciated!
>
> Thanks in advance,
>
> Irene
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] LEVELS function NULL

2020-06-23 Thread Torsten Hauffe
Hi,

What is the output of
class(my_data$Sampling)?

If it is not factor (but character), you could write
my_data$Sampling <- as.factor(my_data$Sampling)

Then levels(my_data$Sampling) should return Sep18 etc.

Cheers!

On Tue, Jun 23, 2020 at 6:00 PM Vesna Gulin  wrote:

> Hi everyone,
>
>
>
> It has been a couple months now of using R and I am slowly trying to switch
> from using Statistica to R in order to process my data (for PhD purposes).
>
>
>
> I did some basic statistics and now I would like to try Kruskal-Wallis
> (following this guideline:
>
> http://www.sthda.com/english/wiki/kruskal-wallis-test-in-r )
>
> but I have been stuck for days as I can't seem to find a reason why the
> levels function keeps giving me NULL.
>
>
>
> My data is a data frame:
>
>
>
> my_data
>
>Temperature Sampling
>
> 1 9.90Dec17
>
> 210.00Dec17
>
> 310.00Dec17
>
> 410.10Dec17
>
> 5 9.90Dec17
>
> 610.10Dec17
>
> 710.20Dec17
>
> 810.10Jan18
>
> 910.50Jan18
>
> 10   10.80Jan18
>
> 11   10.30Jan18
>
> 12   10.30Jan18
>
> 13   10.20Jan18
>
> 14   10.50Jan18
>
> 15   20.90Jun18
>
> 16   20.80Jun18
>
> 17   20.50Jun18
>
> 18   20.50Jun18
>
> 19   20.70Jun18
>
> 20   20.60Jun18
>
> 21   20.50Jun18
>
> 22   10.50Mar18
>
> 23   11.40Mar18
>
> 24   10.90Mar18
>
> 25   10.60Mar18
>
> 26   11.60Mar18
>
> 27   11.20Mar18
>
> 28   12.20Mar18
>
> 29   19.40May18
>
> 30   19.00May18
>
> 31   20.80May18
>
> 32   19.50May18
>
> 33   18.60May18
>
> 34   18.10May18
>
> 35   19.20May18
>
> 36   16.80Nov18
>
> 37   16.50Nov18
>
> 38   18.40Nov18
>
> 39   18.10Nov18
>
> 40   16.70Nov18
>
> 41   16.70Nov18
>
> 42   18.50Nov18
>
> 43   15.50Oct17
>
> 44   15.10Oct17
>
> 45   15.00Oct17
>
> 46   15.80Oct17
>
> 47   15.20Oct17
>
> 48   15.10Oct17
>
> 49   15.20Oct17
>
> 50   23.40Sep18
>
> 51   24.05Sep18
>
> 52   23.70Sep18
>
> 53   23.40Sep18
>
> 54   24.05Sep18
>
> 55   23.80Sep18
>
> 56   24.15Sep18
>
>
>
> When I hit levels(my_data$Sampling) it gives me
> NULL
>
>
>
> I would very much appreciate any help.
>
>
>
> Kind regards,
>
> Vesna
>
>
>
>
>
>
>
> Vesna Gulin,  Research Assistant
>
>
>
> Department of Biology
>
>
>
> Faculty of Science
>
> University of Zagreb
>
>
>
> Rooseveltov trg 6, 1 Zagreb, Croatia
>
>
>
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Use of PCoa in varipart

2020-06-08 Thread Torsten Hauffe
Hi Fernando,

using a PCoA for variation partitioning should be possible. This should
equal a distance-based redundancy analysis (plus some magic to make the
PCoA euclidean).
I don't know ade4 very well but alternatively you could use the vegan
function varpart. You can subject your Sörensen distance matrix directly to
varpart.

Cheers!

On Sun, Jun 7, 2020 at 11:32 PM Fernando Rodrigues da Silva <
fernando.ecolo...@gmail.com> wrote:

> Dear R users,
>
> I would like to know if there is a possibility to perform the same analysis
> of Clappe et al. 2018 (Ecology, 1737-1747), but instead of using a
> Principal Component Analysis (PCA) in the function *varipart*, I use a
> Principal Coordinates Analysis (PCoA) based on the Simpson index of
> dissimilarity.
>
> I tried running the example of the article, but I get an error saying it is
> not yet available.
>
>
> *comp_dist <- beta.pair (mafragh$flo, index.family =
> "sorensen")pcoa.species <- dudi.pco (comp_dist$beta.sim, scannf = F)vprda
> <- varipart (pcoa.species, environment, eigenfw, type = "parametric")*
> # Error in dudi.type(Y$call) : Not yet available
> *vprdaMSR <- msr (vprda, mafragh.lw, nrepet = 999)*
>
> Does anyone know if there is any script available for this type of
> approach?
>
> All the best,
>
> *Prof. Dr. Fernando Rodrigues da Silva *
> *===**===*
> Laboratório de Ecologia Teórica: Integrando Tempo, Biologia e Espaço (
> LET.IT.BE),
> Departamento de Ciências Ambientais (DCA),
> Universidade Federal de São Carlos (UFSCar), campus Sorocaba
>
> Personal Page: *http://fernandoecologia.wix.com/fernandorodrigues
> *
>
> *   https://orcid.org/-0002-0983-3207
> *
>
>
> *===*
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] clustering communities by an environmental variable

2020-04-24 Thread Torsten Hauffe
Hi Irene,

I'm not sure whether I understand your aim completely. It sounds similar to
stratigraphically constrained clustering (CONISS) - an approach often used
in paleoecology and implemented in the packages rioja and adjclust. Instead
of stratigraphy/age you could use elevation (I guess all values of the
gradient need to be different).
Alternatively, Borcard & Legendre (Numerical ecology with R) suggest to use
the package mvpart for this aim.

Cheers!

On Fri, Apr 24, 2020 at 5:48 PM Irene Adamo  wrote:

> Dear all,
> I am trying to do a dendrogram  by trying to see if my communities  by
> altitude but I am not sure on how to do it.
> lets say I have this example
>
> # calculate Bray-Curtis distance among samples comm.bc.dist <-
> vegdist(comm,
> method = "bray") # cluster communities using average-linkage algorithm
> comm.bc.clust <- hclust(comm.bc.dist, method = "average") # plot cluster
> diagram plot(comm.bc.clust, ylab = "Bray-Curtis dissimilarity")
>
> Now, I would like to cluster my communities by Altitude always using the
> distance matrix and the dendrogram.
> Is it possible?
>
> Thanks a lot for any help!
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] R-sig-ecology Digest, Vol 145, Issue 1

2020-04-05 Thread Torsten Hauffe
Isn't it this website?

https://www.gebco.net/data_and_products/gridded_bathymetry_data/

On Sun, Apr 5, 2020 at 2:46 PM Valeria Valeria <
valeriaaara...@googlemail.com> wrote:

> Good morning,I hope this email finds you well.I am looking for a copy of
> the GEBCO Digital Atlas (GDA). General Bhatrimetric Chart of the Ocean. The
> GEBCO Digital Atlas (GDA) was a two-volume DVD and CDROM set that contained
> GEBCO's 30 arc-second interval global gridded bathymetric data set and
> GEBCO Centenary release collection of bathymetric contours.
> Is anyone has a copy of this or do you know where can I find it? I really
> needed a copy of it.Thanks for you help.Best Regards,Valeria
>
> On Wed, 1 Apr 2020 at 11:02,  wrote:
>
> > Send R-sig-ecology mailing list submissions to
> > r-sig-ecology@r-project.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> > or, via email, send a message with subject or body 'help' to
> > r-sig-ecology-requ...@r-project.org
> >
> > You can reach the person managing the list at
> > r-sig-ecology-ow...@r-project.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of R-sig-ecology digest..."
> >
> >
> > Today's Topics:
> >
> >1. Function in Genetic Algorithms (Daniel =?ISO-8859-1?Q?Pat=F3n?=)
> >
> > --
> >
> > Message: 1
> > Date: Tue, 31 Mar 2020 16:06:04 +0200
> > From: Daniel =?ISO-8859-1?Q?Pat=F3n?= 
> > To: R-sig-ecology@r-project.org
> > Subject: [R-sig-eco] Function in Genetic Algorithms
> > Message-ID: <20200331160604.05f908850e44f7fc5c96c...@gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> >
> > Dear colleagues:
> >
> > I'm trying to fit a model by Genetic Algorithms. In the GAFIT package the
> > expression I use for fitting is:
> >
> > fitness <- expression((Z - (X^a + Y^b))^2)
> >
> > Y a and b are coefficients of the variables X and Y. Z is the output
> > variable.
> >
> > When I try to use another package (rgenoud, GA, etc...) I must put the
> > syntax in function form. I use this:
> >
> > fitness <- function(X,Y,Z) {
> > Z <- trees$BIOMASS
> > X <- trees$DIAMETER
> > Y <- trees$HEIGHT
> > observed <- (X + X^2 + Y + Y^2 + X*Y)
> > expected <- Z
> > error <- (observed-expected)^2
> > return(error)
> > }
> >
> > I don't know what I'm doing wrong.
> >
> > I'd appreciate a little help.
> > Thank you
> >
> > --
> >
> >
> 
> >  Daniel Patón
> >  Numerical Ecology. Ecology Unit
> >  Department of Plant Biology, Ecology and Earth Sciences
> >  Faculty of Sciences. University of Extremadura
> >  Avda. Elvas s/n 06071 Badajoz (Spain)
> >  https://orcid.org/-0003-2500-3964
> >  https://cvn.fecyt.es/-0003-2500-3964
> >  http://unex.academia.edu/DanielPatonDominguez
> >  https://www.researchgate.net/profile/Daniel_Paton/
> >  http://sites.google.com/site/numericalecologyuex/home
> >  http://twitter.com/NumericalEcolo1
> >  https://www.youtube.com/channel/UCcDUrzoZQ5OID6uVxhcwBng
> >
> >
> >
> >
> > --
> >
> > Subject: Digest Footer
> >
> > ___
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> >
> > --
> >
> > End of R-sig-ecology Digest, Vol 145, Issue 1
> > *
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Phylogenetic turnover using large datasets

2020-03-10 Thread Torsten Hauffe
Great!

Having a machine with 120 GB of RAM (*envy*), you can certainly use
parallelization to boost the turnover calculation.

Cheers!

On Tue, Mar 10, 2020 at 5:40 PM Jens Ringelberg 
wrote:

> Hi Torsten,
>
> Thank you very much for your answer! You're absolutely right, the problem
> is the number of localities rather than species, so calculating turnover
> separately for each pair of localities is a good (but slow) workaround.
>
> Best,
> Jens
>
> On Fri, 6 Mar 2020 at 09:53, Torsten Hauffe 
> wrote:
>
>> (sorry, I forgot to include the list)
>>
>> Hi,
>>
>> My guess is that the problem is not the size of the phylogeny but the
>> dimension of the community matrix. How many localities and species per
>> locality do you have?
>>
>> Does it work to calculate the dissimilarity between two localities? (Try
>> with the most species-rich)
>> If so, you could either do all pairwise comparisons manually or you
>> replace the memory-hungry apply functions within phylo.beta.pair by
>> (slower) for-loops.
>>
>> Cheers!
>>
>> On Thu, Mar 5, 2020 at 10:06 PM Jens Ringelberg <
>> jens.ringelb...@gmail.com> wrote:
>>
>>> Dear list,
>>>
>>> Does anyone happen to have experience with calculating Simpson's
>>> pair-wise
>>> phylogenetic dissimilarity for large datasets?
>>>
>>> I have tried using betapart’s phylo.beta.pair function to calculate
>>> phylogenetic turnover for a globally-distributed clade with about 1500
>>> taxa, but my machine, which has 125 GB RAM, quickly runs out of memory
>>> while doing so.
>>>
>>> Other than increasing RAM, does anyone have any suggestions for
>>> calculating
>>> Simpson’s dissimilarity for large datasets? I'm aware of the
>>> PhyloMeasures
>>> package, which was designed to work with large datasets, but as far as I
>>> can tell it does not allow one to partition the resulting dissimilarity
>>> index into the true turnover (i.e., Simpson's dissimilarity) and richness
>>> components.
>>>
>>> Many thanks in advance.
>>>
>>>
>>> Jens
>>>
>>> PhD student
>>> University of Zurich
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ___
>>> R-sig-ecology mailing list
>>> R-sig-ecology@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>>
>>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Phylogenetic turnover using large datasets

2020-03-06 Thread Torsten Hauffe
(sorry, I forgot to include the list)

Hi,

My guess is that the problem is not the size of the phylogeny but the
dimension of the community matrix. How many localities and species per
locality do you have?

Does it work to calculate the dissimilarity between two localities? (Try
with the most species-rich)
If so, you could either do all pairwise comparisons manually or you replace
the memory-hungry apply functions within phylo.beta.pair by (slower)
for-loops.

Cheers!

On Thu, Mar 5, 2020 at 10:06 PM Jens Ringelberg 
wrote:

> Dear list,
>
> Does anyone happen to have experience with calculating Simpson's pair-wise
> phylogenetic dissimilarity for large datasets?
>
> I have tried using betapart’s phylo.beta.pair function to calculate
> phylogenetic turnover for a globally-distributed clade with about 1500
> taxa, but my machine, which has 125 GB RAM, quickly runs out of memory
> while doing so.
>
> Other than increasing RAM, does anyone have any suggestions for calculating
> Simpson’s dissimilarity for large datasets? I'm aware of the PhyloMeasures
> package, which was designed to work with large datasets, but as far as I
> can tell it does not allow one to partition the resulting dissimilarity
> index into the true turnover (i.e., Simpson's dissimilarity) and richness
> components.
>
> Many thanks in advance.
>
>
> Jens
>
> PhD student
> University of Zurich
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] FW: Calculating percentile rank of sample dataset compared to reference dataset in R

2019-08-22 Thread Torsten Hauffe
Hi,

sapply(c("iron", "nitrate"), function(x) round(approx(y =
1:nrow(df_ref), x = df_ref[, x], xout = df_sample[, x])$y/10))

should do the trick with base R:::approx() as workhorse.

You need to replace the /10 by a value corresponding to the length of
your reference database (e.g. if there are 500 rows only, divide by 5)

The results differs slightly from the solution of Akos by assigning a
value of 0.2651 to percentile rank 27 instead of 26.


Cheers!




On Thu, 22 Aug 2019 at 08:29, Glatthorn, Jonas  wrote:

> Dear Matt,
>
> I believe the ecdf() function can do as well what you are looking for:
>
> ref_ecdf <- sapply(df_ref, FUN = ecdf)
>
> and then apply each function in ref_ecdf to the corresponding column in
> df_sample. Either with a for loop or (my preference) using functionals:
>
> df_sample_rank <- purrr::map2_dfc(ref_ecdf, purrr::map(df_sample[-1],
> list), do.call)
>
> all the best
>
> Jonas
>
> -Original Message-
> From: R-sig-ecology  On Behalf Of
> Bede-Fazekas Ákos
> Sent: Thursday, 22 August 2019 08:01
> To: r-sig-ecology@r-project.org
> Subject: Re: [R-sig-eco] FW: Calculating percentile rank of sample dataset
> compared to reference dataset in R
>
> Dear Matthew,
>
> here is one, maybe not the fastest/shortest, solution:
> percentiles <- apply(X = df_ref, MARGIN = 2, FUN = quantile, probs =
> seq(from = 0, to = 1, length.out = 101)[-1]) df_sample$percentile_rank <-
> vapply(X = colnames(df_sample)[-1], FUN.VALUE = numeric(nrow(df_sample)),
> FUN = function(variable_name) findInterval(x = df_sample[, variable_name,
> drop = TRUE], vec = percentiles[, variable_name, drop = TRUE]))
>
> HTH,
> Ákos Bede-Fazekas
> Hungarian Academy of Sciences
>
> 2019.08.22. 0:54 keltezéssel, Shank, Matthew írta:
> > Hello R-sig-ecology mailing list,
> >
> >
> >
> > I’m working on a mutlivariate water quality index where the
> concentration of parameter i at site j is normalized by calculating the
> percentile rank of the value using a much larger reference dataset.
> >
> >
> >
> > As an example, I have generated a sample dataset of water quality
> parameters (df_sample) and a larger reference dataset (df_ref). I’d like to
> calculate the percentile rank of each parameter, at each site, using a
> reference dataset of a much larger size.
> >
> >
> >
> > Example data is below. If anyone has a solution that avoids for loops
> that would be preferred.
> >
> >
> >
> >
> >
> > #generate sample data
> >
> > df_sample <- data.frame(site = letters[1:10], iron = runif(10, min=0,
> > max=1), nitrate = runif(10, min=0, max=10))
> >
> > df_sample
> >
> >
> >
> >
> >
> > #generate reference dataset
> >
> > df_ref <- data.frame(iron = seq(0, 1, length.out = 1000), nitrate =
> > seq(0, 10, length.out = 1000))
> >
> > df_ref
> >
> > # now would like to calculate percentile rank of iron and nitrate at
> > all sites (a:j) based on identical columns in df_ref and include as a
> > new column in df_sample
> >
> >
> >
> > Many thanks,
> > |><̮Mâ̬tt͵)o>
> >
> >
> >   [[alternative HTML version deleted]]
> >
> > ___
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] trasformation of matrix for iNEXT extrapolation interpolation of Hill's numbers

2019-06-20 Thread Torsten Hauffe
Hi,

In general, you can create a list containing matrices, data.frames, or
(almost) any object in the following way:

# 2 Matrices as example
M1 <- matrix(NA, ncol = 5, nrow = 3)
M2 <- matrix(NA, ncol = 3, nrow = 5)

List <- list() # initiate an empty list
List[[1]] <- M1 # Enter M1 as first element of the list
List[[2]] <- M2
names(List) <- c("Matrix1", "Matrix2") # Maybe iNEXT needs names?
List

HTH,
Torsten


On Thu, 20 Jun 2019 at 16:28, Irene Adamo  wrote:

> Hi all,
>
> I am working with iNEXT package for diversity analyses however, I would
> like to use a incidence_raw data type which in iNEXT is a list of matrices
> like this:
>
> data(ciliates)
> head(ciliates)
>
> $SouthernNamibDesert
>  x9 x17 x19 x20 x21 x22
> x23 x24
> Acaryophrya.collaris  0   0   0   0   0   0
>   0   0
> Actinobolina.multinucleata.n..sp. 0   0   0   0   0   0
>   0   0
> Afroamphisiella.multinucleata.n..sp.  0   0   0   0   0   0
>   0   0
> Afrothrix.multinucleata.n..sp.0   1   0   0   0   0
>   0   0
> Amphisiella.binucleata.multicirrata.n..ssp.   0   0   0   0   0   0
>   0   0
> Amphisiella.elegans.n..sp.0   0   0   0   0   0
>   1   0
> Amphisiella.longiseries.n..sp.0   0   0   0   0   0
>   0   0
> Amphisiella.magnigranulosa0   0   0   0   0   0
>   0   1
> Amphisiella.multinucleata.n..sp.  0   0   0   0   0   0
>   0   0
> Amphisiella.namibiensis.n..sp.0   0   0   0   0   0
>   0   0
> Amphisiella.polycirrata   0   0   0   0   0   0
>   0   0
> Amphisiella.procera.n..sp.1   0   0   0   0   0
>   0   0
>
> do you know how can I create anlist with four matrices like the one they
> have in example data?
>
> thanks a lot for any help!
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] interpreting ecological distance approaches (Bray Curtis after various data transformation)

2019-04-04 Thread Torsten Hauffe
Great point David!

Since Tim was referring to microbial communities, the gjam package is
similar to mvabund, boral etc. and the microbial example discussed in the
following paper might be of interest.

https://esajournals.onlinelibrary.wiley.com/doi/full/10.1002/ecm.1241

With that being about R itself, I may go a bit off topic:
In all those multivariate GLM approaches, is there a way to disentangle
richness differences (or nestedness) and turnover like we can do with
pairwise distances?
(See the inspiring discussion between Carvalho et al. and Baselga et al.;
summarized in http://onlinelibrary.wiley.com/doi/10./geb.12207/abstract
)
Since different biological processes may cause these patterns, separating
richness differences and species turnover is of interest. Maybe the the row
effect in those multivariate GLMs could be estimated as response to
environmental predictors?

Cheers,
Torsten



On Thu, 4 Apr 2019 at 01:19, David Warton  wrote:

> Hi Tim,
> Yes you are right this is an issue, BC (and other distance metrics) are
> sensitive to sampling intensity, which is often an artefact of the sampling
> technique.  Transformation is not a great solution to the problem - it
> works imperfectly and will have different effects depending on the
> properties of your data.  There are lots of different types of datasets out
> there, each with different properties, and different behaviours under
> different transformation/standardisation strategies, so there is no
> one-transformation-suits-all solution.  An illustration of this (in the
> case of row standardisation) is in the below paper:
>
> https://besjournals.onlinelibrary.wiley.com/doi/10./2041-210X.12843
>
> The strategy I would advise here is to go a very different route and build
> a statistical model for the data.  You can then include row effects in the
> model to handle variation in sampling intensity across rows of data (along
> the lines of equation 2 of the above paper).  Or if the magnitude of the
> variation in sampling intensity is known (e.g. it is due to changes in
> sizes of quadrats used for sampling, and quadrat size has been recorded),
> then the standard approach to handle this is to add an offset to the
> model.  There is plenty of software out there that can fit suitable
> statistical models with row effects (and offsets) for this sort of data,
> including the mvabund, HMSC, boral, and gllvm packages on R.  Importantly,
> these packages come with diagnostic tools to check that the analysis
> approach adequately captures key properties of your data - an essential
> step in any analysis.
>
> All the best
> David
>
>
> Professor David Warton
> School of Mathematics and Statistics, Evolution & Ecology Research Centre,
> Centre for Ecosystem Science
> UNSW Sydney
> NSW 2052 AUSTRALIA
> phone +61(2) 9385 7031
> fax +61(2) 9385 7123
>
> http://www.eco-stats.unsw.edu.au
>
>
>
> --
>
> Date: Tue, 2 Apr 2019 17:15:45 +0200
> From: Tim Richter-Heitmann 
> To: r-sig-ecology@r-project.org
> Subject: [R-sig-eco] interpreting ecological distance approaches (Bray
> Curtis after various data transformation)
> Message-ID: <3834fea1-040a-12b5-c3a3-633e68dc6...@uni-bremen.de>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Dear list,
>
> i am not an ecologist by training, so please bear with me.
>
> It is my understanding that Bray Curtis distances seem to be sensitive to
> different community sizes. Thus, they seem to deliver inadequate results
> when the different community sizes are the result of technical artifacts
> rather than biology (see e.g. Weiss et al, 2017 on microbiome data).
>
> Therefore, i often see BC distances made on relative data (which seems to
> be equivalent to the Manhattan distance) or on data which has been
> subsampled to even sizes (e.g. rarefying). Sometimes i also see Bray Curtis
> distances calculated on Hellinger-transformed data,
>
> which is the square root of relative data. This again makes sample sizes
> unequal (but only to a small degree), so i wondered if this is a valid
> approach, especially considering that the "natural" distance choice for
> Hellinger transformed data is Euclidean (to obtain, well, the Hellinger
> distance).
>
> Another question is what different sizes (i.e. the sums) of Hellinger
> transformed  communities represent? I tested some datasets, and couldnt
> find a correlation between original sample sizes and their hellinger
> transformed counterparts.
>
> Any advice is very much welcome. Thank you.
>
> --
> Dr. Tim Richter-Heitmann
>
> University of Bremen
> Microbial Ecophysiology Group (AG Friedrich)
> FB02 - Biologie/Chemie
> Leobener Straße (NW2 A2130)
> D-28359 Bremen
> Tel.: 0049(0)421 218-63062
> Fax: 0049(0)421 218-63069
>
>
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

   

Re: [R-sig-eco] interpreting ecological distance approaches (Bray Curtis after various data transformation)

2019-04-03 Thread Torsten Hauffe
Hi,

you may have a look to the following publication:

http://onlinelibrary.wiley.com/doi/10./1365-2656.12362/abstract

Barwell et al. 2015 nicely compare the characteristics of different
pairwise beta-diversity measures. They give recommendations for choosing
beta-diversity measures along the gradient of focusing on richness
differences to turnover.

HTH,
Torsten

On Wed, 3 Apr 2019 at 09:10, Botta-Dukát Zoltán <
botta-dukat.zol...@okologia.mta.hu> wrote:

> Dear Tim,
>
> You are right: Bray-Curtis distance will be non-zero if two communities
> differ in size (sum of abundances), even if the relative abundances is
> the same. If you have number of individuals data, rarefying is the best
> solution. If you cannot apply it (e.g. because only cover data are
> available), you can calculate distance from relative abundance, and yes,
> this case BC is equivalent to Manhattan. Note that using relative
> abundances don't remove fully the effect of different sampling effort,
> because rare species could missing from the smaller sample.
>
> I don't recommend calculating BC-distance from Hellinger-transformed
> data, because sum of transformed abundances are meaningless.
>
> Best regards,
>
> Zoltan
>
> 2019. 04. 02. 17:15 keltezéssel, Tim Richter-Heitmann írta:
> > Dear list,
> >
> > i am not an ecologist by training, so please bear with me.
> >
> > It is my understanding that Bray Curtis distances seem to be sensitive
> > to different community sizes. Thus, they seem to deliver inadequate
> > results when the different community sizes are the result of technical
> > artifacts rather than biology (see e.g. Weiss et al, 2017 on
> > microbiome data).
> >
> > Therefore, i often see BC distances made on relative data (which seems
> > to be equivalent to the Manhattan distance) or on data which has been
> > subsampled to even sizes (e.g. rarefying). Sometimes i also see Bray
> > Curtis distances calculated on Hellinger-transformed data,
> >
> > which is the square root of relative data. This again makes sample
> > sizes unequal (but only to a small degree), so i wondered if this is a
> > valid approach, especially considering that the "natural" distance
> > choice for Hellinger transformed data is Euclidean (to obtain, well,
> > the Hellinger distance).
> >
> > Another question is what different sizes (i.e. the sums) of Hellinger
> > transformed  communities represent? I tested some datasets, and
> > couldnt find a correlation between original sample sizes and their
> > hellinger transformed counterparts.
> >
> > Any advice is very much welcome. Thank you.
> >
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Any R based GIS package to extract layer associations revisited

2019-02-20 Thread Torsten Hauffe
Hi Bruce,

Sounds like that you are looking for sp:::over().

HTH,
Torsten

On Wed, 20 Feb 2019 at 16:20, Bruce Miller  wrote:

> Hi all,
> Back in January I inquired about R packages to extract associations of
> spatial layers.
> The one reply related to raster data.
>
> The shape file layers I am working with are vector layers.
> I need to revisit this to see what I can do.
> I have species distribution layers (Vector shape files) and
> ecological/habitat layers (also vector shp files) and need to derive the
> species associations for each ecosystem/habitat layer where they occur
> and extract the resulting data tbls.
>
> Any other suggestion I might try using R based packages?
>
> Again I am traveling and do not have access to my workstation ArcMap so
> need to derive these overlap associations using an R based approach.
>
> Thanks all.
> Bruce
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Regression when Y has an estimation variance

2019-01-14 Thread Torsten Hauffe
Bayesian mixed models implemented in MCMCglmm and brms have an argument to
specify the variances for meta analysis. I never used them for this task,
though. However, the author of brms is psychologist where meta analyses are
common.

Cheers!

On Mon, 14 Jan 2019 at 15:52, Dixon, Philip M [STAT] 
wrote:

> Roy,
>
> One relevant literature is that on meta-regression (a generalization of
> meta-analysis).  There is a very good handbook by Koricheva, Gurevitch and
> Mengerson.  Meta analysis mostly deals with Gaussian responses (or
> transformable to approximately Gaussian).  If there has been any work on
> non-gaussian responses, I expect it would be summarized in Koricheva.
>
> The metafor package is one implementation specifically for meta analysis.
> A resource on metafor and other R packages is Schwarzer and Carpenter,
> Meta-analysis with R.
>
> Other programs can also fit the models as mixed models with heterogenerous
> specified variances, lme() and lmer() do not let you do this.  lmer()
> doesn't allow heterogeneous variances; lme() does, but only of the form
> k_i*sigma^2 (i.e. variances relative to a common scaling factor, not
> absolutely specified variances).   For a meta analysis, you need to specify
> the absolute variance for each estimate.  If someone knows how to trick
> lme() to use exactly the error variances that have been specified, I would
> love to hear about it.
>
> Best,
> Philip Dixon
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Error in Kriging Procedure

2018-12-14 Thread Torsten Hauffe
Hi Alexandre,

looks like you are trying to apply inverse distance weighting with gstat.

For that your command should be something like this:

Model_ok  <- gstat( id='NMDS1_kri',  formula= NMDS1 ~ 1 , data = X)

Where X is a data.frame of your coordinates with NMDS scores or a spatial
object like your nmds_scores.

HTH,
Torsten

On Fri, 14 Dec 2018 at 17:38, Alexandre F. Souza <
alexsouza.cb.ufrn...@gmail.com> wrote:

> Hello,
>
> I am new to interpolating techiques, and I am getting a persistent erro
> message I have not been able to resolve. I am trying to krig spatialized
> ordination scores into a raster of the Brazilian Atlantic Forest, as you
> can see below. I previously run a NMDS with 5 dimensions on species
> presence-absence data and saved the nmds scores. I send in attachment the
> atlantic forest shapefile and the nmds scores, to make the code more
> reproducible.
>
> # Convert NMDS-scores to SpatialPoints objects
> coords = as.data.frame(coords)
> names(coords) = c("longitude","latitude")
> nmds_scores<-cbind(coords, nmds_scores)
> coordinates(nmds_scores)<-~longitude+latitude # Convert 'nmds_scores'
> dataframe to SpatialPointsDataframe
> wgs84<-"+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0" #
> WGS84 Coordinate Reference System (CRS)
> crs(nmds_scores)<-wgs84 # Set the original CRS (WGS84)
> new_crs<-"+proj=robin +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m
> +no_defs" # Transform CRS to Robinson projection (it is necessary to have
> projected data for interpolation)
> nmds_scores<-spTransform(nmds_scores, new_crs)
>
>
> # Read the shapefile of Brazilian Atlantic Forest (BAF) and rasterize it
> BAF_limit<-readOGR("C:/Users/Augusto/Documents/MESTRADO/Projeto
> CAATINGA/Analise k-means/shapecaa")
> BAF_limit<-spTransform(BAF_limit, wgs84) # Change the CRS from SIRGAS2000
> to WGS84
> r_ext<-extent(BAF_limit)
> r<-raster() # Create a empty raster to receive data
> res(r)<-0.0417 # Define raster resolution in decimal degrees (= 10
> arc-min)
> r<-crop(r, r_ext) # Define spatial extent of the raster (same as BAF)
> BAF_raster<-rasterize(BAF_limit, r, field=1, background=NA)
>
> # Get the spatial coordinates of BAF pixels
> get_coords<-rasterToPoints(BAF_raster)
> get_coords<-as.data.frame(get_coords[, c(1:2)])
> get_coords<-cbind(get_coords, NA, NA, NA)
> names(get_coords)<-c("longitude", "latitude", "NMDS1", "NMDS2", "NMDS3")
> coordinates(get_coords)<-~longitude+latitude # Convert 'get_coords'
> dataframe to SpatialPointsDataframe
> crs(get_coords)<-wgs84 # Set the original CRS (WGS84)
> get_coords<-spTransform(get_coords, new_crs) # Transform CRS to Robinson
> projection
>
> gModel_ok <- gstat(NULL, id='NMDS1_kri',
>formula= NMDS1 ~ 1,
>locations=coords, model=data.fit)
>
> G0y_ok <- interpolate(BAF_raster, gModel_ok, xyOnly=FALSE)
>
> Error in as(data, "data.frame") :
>   no method or default for coercing “NULL” to “data.frame”
>
>
> Do anyone has any idea of what may be wrong? I tried to empty the raster
> changing all vaues to zero but did not work.
>
> Thanks a log in advance,
>
> Alexandre
> --
> Dr. Alexandre F. Souza
> Professor Adjunto IV
> Chefe do Departamento de Ecologia
> Universidade Federal do Rio Grande do Norte
> CB, Departamento de Ecologia
> Campus Universitário - Lagoa Nova
> 59072-970 - Natal, RN - Brasil
> lattes: lattes.cnpq.br/7844758818522706
> http://www.esferacientifica.com.br
> http://www.docente.ufrn.br/alexsouza
> orcid.org/-0001-7468-3631 
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Torsten Hauffe
I see. Thanks for explaining Jari!

On Tue, 16 Oct 2018 at 14:54, Jari Oksanen  wrote:

>
>
> On 16/10/18 11:23, Torsten Hauffe wrote:
> >   "adonis2(speciesdataset~A*B, by="margin") but then only the effect of
> the
> > interaction is tested."
> >
> > This is not entirely correct.
> > adonis2(speciesdataset~A:B, by="margin") would test the interaction
> alone.
> > ~A*B unfolds to ~A+B+A:B
>
> Well, it was correct: the only **marginal** effect in ~A+B+A:B is A:B (A
> and B are not marginal), and by = "margin" will only analyse marginal
> effects.
>
> Cheers, Jari Oksanen
> >
> > On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:
> >
> >> Hi all,
> >>
> >> I don't know whether this is the correct mailing group to address this
> >> question:
> >>
> >> I would like to perform a 2-way permanova analysis in R (using adonis in
> >> vegan). By default you are performing sequential tests (by="terms"), so
> >> when you have 2 or more factors, the order of these factors matter.
> >> However, since I wanted to circumvent this, I chose for the option
> >> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> >> effect of the interaction is tested. On the "help page" of anova. cca it
> >> says: "if you select by="margin" -> the current function only evaluates
> >> marginal terms. It will, for instance, ignore main effects that are
> >> included in interaction terms."
> >>
> >>
> >> My question now is: can I somehow get the main effects tested anyhow,
> when
> >> the interaction term is not significant?
> >>
> >> Thanks,
> >> Ellen
> >>
> >>  [[alternative HTML version deleted]]
> >>
> >> ___
> >> R-sig-ecology mailing list
> >> R-sig-ecology@r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >>
> >
> >   [[alternative HTML version deleted]]
> >
> > ___
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Torsten Hauffe
 "adonis2(speciesdataset~A*B, by="margin") but then only the effect of the
interaction is tested."

This is not entirely correct.
adonis2(speciesdataset~A:B, by="margin") would test the interaction alone.
~A*B unfolds to ~A+B+A:B

On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:

> Hi all,
>
> I don't know whether this is the correct mailing group to address this
> question:
>
> I would like to perform a 2-way permanova analysis in R (using adonis in
> vegan). By default you are performing sequential tests (by="terms"), so
> when you have 2 or more factors, the order of these factors matter.
> However, since I wanted to circumvent this, I chose for the option
> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> effect of the interaction is tested. On the "help page" of anova. cca it
> says: "if you select by="margin" -> the current function only evaluates
> marginal terms. It will, for instance, ignore main effects that are
> included in interaction terms."
>
>
> My question now is: can I somehow get the main effects tested anyhow, when
> the interaction term is not significant?
>
> Thanks,
> Ellen
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] mvpart alternatives and machine learning multivariate analysis

2017-06-24 Thread Torsten Hauffe
As far as I remember, on Windows you will need to download and install the
Rtools first (https://cran.r-project.org/bin/windows/Rtools/) because some
parts of mvpart need to be compiled.

You can analyse multiple species-environment relationships with the mvabund
package. This is not fancy machine-learning but solid likelihood statistic.

HTH,
Torsten

On 24 June 2017 at 11:57, Ralf Schäfer  wrote:

> Manuel,
>
> I just checked, it is currently still compatible. So you can download from
> the archive and install from source - at least on Linux and OS X, nut sure
> about Windows.
> See Session information below:
>
> > R version 3.4.0 (2017-04-21)
> > Platform: x86_64-apple-darwin15.6.0 (64-bit)
> > Running under: macOS Sierra 10.12.5
> >
> > Matrix products: default
> > BLAS: /Library/Frameworks/R.framework/Versions/3.4/
> Resources/lib/libRblas.0.dylib
> > LAPACK: /Library/Frameworks/R.framework/Versions/3.4/
> Resources/lib/libRlapack.dylib
> >
> > locale:
> > [1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8
> >
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods   base
> >
> > other attached packages:
> > [1] mvpart_1.6-2
> >
> > loaded via a namespace (and not attached):
> > [1] compiler_3.4.0
>
>
> However, there are certainly other packages that can partition
> multivariate ecological data, though I am not aware of other packages for
> use with multivariate regression trees.
>
> Regards
> Ralf
>
>
>
> > Am 24.06.2017 um 17:47 schrieb Manuel Spínola :
> >
> > Thank you Ralf,
> >
> > But I guess is not going to be newer versions and could be incompatible
> with newer version of R, so at some moment there will be no accessibility
> to the package.
> >
> > Manuel
> >
> > 2017-06-24 5:25 GMT-06:00 Ralf Schäfer  >:
> > Dear Manuel
> >
> > despite it has been removed, it should still work.
> > At least I used it last year - just install the version from the archive
> manually:
> > https://cran.r-project.org/src/contrib/Archive/mvpart/ <
> https://cran.r-project.org/src/contrib/Archive/mvpart/>
> >
> > Best regards
> > Ralf
> >
> >
> >> Date: Fri, 23 Jun 2017 13:59:13 -0600
> >> From: Manuel Sp?nola  >>
> >> To: "r-sig-ecology@r-project.org "
> >
> >> Subject: [R-sig-eco] mvpart alternatives and machine learning
> >>  multivariateanalysis
> >> Message-ID:
> >>  

Re: [R-sig-eco] graphs in corner of the pane, Windows 10 is the difference

2017-05-05 Thread Torsten Hauffe
Hi Mike,

not sure whether I understand what you mean with Word 7 (2007?). Do you
copy and paste the figure or do you export it with a function like  tiff()
or pdf()?
In the first case, this is maybe an issue with the high display resolution
of the Surface PC. I would try to set it to a regular 1300x768 resolution
and see what happens. However, in general I would recommend to use pdf()
export to get high resolution figures suitable for publishing.

HTH!

On 5 May 2017 at 11:00, Michael Marsh  wrote:

>
> Clustering with mvpart and rpartpca, graphs fill the pane normally in
> Windows 7 as copied into Word 7, But with the same script and datasets,
> they only occupy the upper left-hand quarter of the pane in Windows 10 on
> SURFACE BOOK, again, as copied into a Word 7 document.
> when I test graphic parameters on either computer, following suggestions
> by another reader, I get:
> > par("mfrow")
> [1] 1 1
> > par("plt")
> [1] 0.1455083 0.8544917 0.2342400 0.8425600
> >
> I would like to re-set the  graphics output in my Windows 10 computer so
> that I getgraphs that fill the graphics pane in Word 7.
>
> Mike Marsh
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology