[R] boxplot ranked x labels

2010-10-18 Thread Sibylle Stöckli
Dear R users, x-values (EI) = Adw, EG1, LA1, Ad1, LA2, LA3...(14 levels, insect stages) y-valus = antpop within the boxplot function x-values are ordered alphabetically Idea: x-values ranked by list order (insect stage: Egg stage 1 is followed by Larvae 1 and not by Egg stage 2 as it

[R] as.list

2010-10-27 Thread Sibylle Stöckli
Dear R-users I would like to read a txt file as list, to select rows and columns, and to create barplots. (1) selection of parameter site and part: ok (2) read txt file as list: problem with (1) as there are NA's (the lines not selected) (3) barplot: 5 different groups of bars (the selected

[R] Fwd: as.list

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch An: Rhelp r-help@r-project.org Betreff: as.list Dear R-users sorry, here Rcode included (attachment has been removed) I would like to read a txt file as list, to select rows

[R] as.list rcode

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:09:59 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch An: Rhelp r-help@r-project.org Betreff: Fwd: as.list Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch

Re: [R] Fwd: as.list

2010-10-27 Thread Sibylle Stöckli
?[ or ?subset to understand more The barplot() might work better then. HTH, Ivan Le 10/27/2010 15:09, Sibylle Stöckli a écrit : Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: Sibylle Stöcklisibylle.stoec...@gmx.ch An: Rhelpr-help@r-project.org Betreff: as.list Dear R

[R] make many barplot into one plot

2010-10-29 Thread Sibylle Stöckli
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars). The

[R] make many barplot into one plot

2010-10-31 Thread Sibylle Stöckli
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars).

[R] anova(lme.model)

2010-11-06 Thread Sibylle Stöckli
Dear R users Topic: Linear effect model fitting using the nlme package (recomended by Pinheiro et al. 2008 for unbalanced data set). The R help provides much info about the controversy to use the anova(lme.model) function to present numerator df and F values. Additionally different p-values

[R] lme weights glht

2010-11-17 Thread Sibylle Stöckli
Dear R-user I used lme to fit a linear mixed model inlcuding weights=varPower(). Additionally I wanted to use glht to calculate Tukey-Kramer multiple comparision. error: glht(modelF, linfct=mcp(Species=Tukey)) Error in glht.matrix(model = list(modelStruct = list(reStruct = list(SubPlot

[R] kstest vs shapirotest

2010-09-22 Thread Sibylle Stöckli
Dear R-users Idea: Analysing tree height frequency with hist(), normal distribution (ks.test shapiro.test) and skewness (package e1071 - thanks a lot for this useful package)as an indication of possible self-thinning in an experimental tree stand. Problem: Results from the ks.test and the

[R] dnorm

2010-09-23 Thread Sibylle Stöckli
Dear R-users Idea: Plot a dnorm line using specific mean/sd to complete a histogram (skewed). xs:range of y-values, ys: dnorm function Problem: I expected to multiply the ys function with the sample size (n=250-300). I was wondering about a factor between 12'000 and 30'000 to match the size of

[R] vegan rda na adaptation

2011-09-23 Thread Sibylle Stöckli
Dear R users, I know, the topic is more related to the r-sig-ecology. I decided to post it to the r-help as some specific topics of my question deals with NA-values and RDA (R vegan) and an adaptated RDA code due to a specific study design (including a second matrix). I am calculating a

[R] lme (weights) and glht

2013-07-25 Thread Sibylle Stöckli
Dear R members, I tried to fit an lme model and to use the glht function of multcomp. However, the glht function gives me some errors when using weights=varPower(). The glht error makes sense as glht needs factor levels and the model works fine without weights=. Does anyone know a solution

[R] varpart

2013-08-22 Thread Sibylle Stöckli
Dear R-users I applied vegan's varpart function to partition the effects of explanatory matrices. Adj. R square for the unique fraction [a] is 0.25. Does anyone know why the decomposition by hand using rda gives me a different result for [a] (constrained proportion is 0.32)? I used

Re: [R] varpart

2013-08-27 Thread Sibylle Stöckli
On 23.08.2013, at 11:06, Jari Oksanen wrote: Sibylle Stöckli sibylle.stoeckli at gmx.ch writes: I applied vegan's varpart function to partition the effects of explanatory matrices. Adj. R square for the unique fraction [a] is 0.25. Does anyone know why the decomposition by hand using rda

[R] Vegan pca and cor

2014-06-12 Thread Sibylle Stöckli
Dear R colleagues, I applied a pca to 130 farms (sites) and 25 variables (species) using the R package vegan. Besides analyzing the variation explained by the different pca axes and the variables the pca axis are correlated with, I am also interested to analyze the correlation between the

[R] Vegan_p-values_RDA

2015-06-04 Thread Sibylle Stöckli
Dear R members, I understand the main principles why R-Vegan does not provide p-values for the biplot scores and/or canonical coefficients (see also post on stackoverflow). (i) We can obtain linear regression statistics and refit an ordination result as multiple response linear model (lm, see

[R] NCDF_arrays

2015-08-03 Thread Sibylle Stöckli
Dear R-users I am working with ncdf data using the variables time (1-365), lon (longitude), lat (latitude) and the Temperature variable daily). After setting the parameters for the model, I am able to calculate the output for each lon-lat grid point. The model works well including one ncdf

[R] glmer and glht

2016-08-15 Thread Sibylle Stöckli
Dear R colleagues, The effect of habitat type on bee species number was tested using a glmer model with habitat as fixed effect (5 habitat types) and site and time as random terms. The idea was now to conduct post hoc tests with glht (package "multcomp") for pairwise comparisons. The matrix

[R] vegan NMDS labels

2016-12-09 Thread Sibylle Stöckli
Dear R users Does anybody know how it may be possible to plot the labels of a ordihull function separately (in R vegan)? We have studied the bee community in 5 different habitat types. As you see from the code, we use different point types (pch) and line types (lty). This is only possible if

[R] barplot_add=TRUE

2018-01-09 Thread Sibylle Stöckli
Dear R users aim Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week). It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable

Re: [R] barplot_add=TRUE

2018-01-09 Thread Sibylle Stöckli
h, w$trapcatch)) > > do what you want (modulo layout details)? > > Hth -- Gerrit > > - > Dr. Gerrit Eichner Mathematical Institute, Room 212 > gerrit.eich...@math.uni-giessen.de Jus

[R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
Dear R community It is possible to adjust the legend in combined ggplots using ggarrange with be positions top, bottom, left and right. My question: Is there a function to change the position of the legend to topright or bottomleft? Right and top etc are in the middle of the axis. Kind regards

Re: [R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
uot;black"), ncol=2) fig1 Kind regards Sibylle From: John Kane Sent: Monday, February 5, 2024 1:59 PM To: sibylle.stoec...@gmx.ch Cc: r-help@r-project.org Subject: Re: [R] ggarrange & legend Could you supply us with a MWE (minimal working example)of what you have so far?

Re: [R] ggplot 3-dimensions

2023-12-17 Thread SIBYLLE STÖCKLI via R-help
change the angel of the x-axis. However, I was able to change the first x-axis (BB...), but not the second one (Voegel). Maybe this would solve the problem. - If not, is there another possibility to fix the number of subplots per line? Kind regards Sibylle -Original Message- From: R-help On Beha

[R] igraph_vertex

2024-02-24 Thread SIBYLLE STÖCKLI via R-help
Dear R-community It would be nice to get some input how to find a solution for the following error in igraph and vertex setting. Thank you very much Sibylle > par(bg="black") > network %>% plot( + vertex.color=clrs[V(.)$community], + vertex.size=V(.)$hub_score*1, +

Re: [R] igraph_vertex

2024-02-24 Thread SIBYLLE STÖCKLI via R-help
Dear R-community It would be nice to get some input how to find a solution for the following error in igraph and vertex setting. Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : Index größer als maximales 6 Kind regards Sibylle Working example library(circlize) library(ggplot2)

Re: [R] igraph_vertex

2024-02-25 Thread SIBYLLE STÖCKLI via R-help
Dear coummunity Thanks a lot to David and Kimmo. Yes I see now that I need to provide the two raw tables. Find here the reproducible example. Kind regards Sibylle # R-labraries library(circlize) library(ggplot2) library(igraph) library(tidyverse) library(RColorBrewer) library(stringi)

Re: [R] igraph_vertex

2024-02-26 Thread SIBYLLE STÖCKLI via R-help
Dear Kimmo First of all many thanks for the valuable advice to publish code and csv. Noted. Yes, "edge.width= E(.)$weight" makes definitively sense. In the following code, which loads the tiff file, I get the following error tiff("figures/AES_network_bymembership.tiff", width=1000, height=700,

Re: [R] igraph_vertex

2024-02-26 Thread SIBYLLE STÖCKLI via R-help
lt layout > dev.off() TIFFOpen: figures/AES_network_bymembership.tiff: Cannot open. RStudioGD 2 Warning message: In dev.off() : unable to open TIFF file 'figures/AES_network_bymembership.tiff' Kind regards Sibylle -Original Message- From: Ivan Krylov Sent: Monday, February 26,

Re: [R] geom_edge & color

2024-03-22 Thread SIBYLLE STÖCKLI via R-help
h(range = c(0.2,4))+ scale_size(range = c(0.5,15)) + theme(plot.background = element_rect(fill = "black"), legend.position = "right", panel.background = element_rect(fill = "black")) dev.off() -Original Message- From: R-help

[R] geom_edge & color

2024-03-20 Thread SIBYLLE STÖCKLI via R-help
Dear community I am using ggraph to plot a network analysis. See part 2 in the working example. Besides different colors for different groups of nodes: --> geom_node_point(aes(size = V(network)$hub_score*200, color= as.factor(V(network)$community))) I additionally want to consider different

Re: [R] geom_edge & color

2024-03-24 Thread SIBYLLE STÖCKLI via R-help
t;, > > value = c(viridis::viridis(21)) > > [match(E(.)$type, c(factor(V(.)$name)))]) %>% > > set_vertex_attr(name = "trans_v_net", value = c(transitivity(., type > = > "local"))) %>% > > set_vertex_attr(

[R] Import multiple tif raster

2024-04-18 Thread SIBYLLE STÖCKLI via R-help
lllrasters: is list() ok or should there be a number (the number of imported .tif files? Kind regards Sibylle > library(terra) > library(raster) > getwd() [1] "C:/Users/Sibylle Stöckli/Desktop" > > #first import all files in a single folder as a list > rastlist <- l

Re: [R] Import multiple tif raster

2024-04-18 Thread SIBYLLE STÖCKLI via R-help
Dear Ivan Thanks a lot. I tried now to provide the full path. However probably the "ö" in the path produces the error, would that be possible? > #first import all files in a single folder as a list > rastlist <- list.files(path = "C:\Users\Sibylle > Stöckli\Des

Re: [R] Import multiple tif raster

2024-04-18 Thread SIBYLLE STÖCKLI via R-help
Dear community Dear Ivan Thanks a lot. The code works now. Solution: direct and full path to the .tif files. I confused back and forward slash #first import all files in a single folder as a list rastlist <- list.files(path = "C:/Users/Sibylle Stöckli/Desktop/NCCS_Impacts_Lot2_202