similar to: ggplot adjust two y-axis

Displaying 20 results from an estimated 500 matches similar to: "ggplot adjust two y-axis"

2023 Nov 24
1
ggplot adjust two y-axis
Hi Sibylle, For that kind of data with two different scales, I generally use two graphs that I name gg1 and gg2 and join them using gridExtra::grid.arrange(gg1, gg2). This way, the red part of your graph is easier to interpret. Have a nice day, Charles-?douard -----Message d'origine----- De?: R-help <r-help-bounces at r-project.org> De la part de sibylle.stoeckli at gmx.ch Envoy??:
2023 Nov 24
1
ggplot adjust two y-axis
Hi, I don't know the axis mecanism well enough in ggplot but using the original barplot function you can add an axis on the right using the axis function. Here is an example: test <- as.table(matrix(c(2,10,3,11), 2,2)) barplot(test, beside = TRUE, col = scales::brewer_pal(palette = 1)(2)) axis(4, at = c(0, 5, 10), labels = c(0,50,100)) -----Message d'origine----- De?:
2023 Nov 24
1
ggplot adjust two y-axis
Dear Charles-Edouard Thanks a lot. Yes indeed barplot sounds excellent. Unfortunately, the scale of the smaller axis is fixed, even If I am able to draw to axes. The idea is to expand the scale to the scale to the second axis for comparison. F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey"))
2023 Nov 24
1
ggplot adjust two y-axis
Hi, Just find a scaling factor that would make the two sets of data comparable. Here I divided the second row by 5 and did the same for the second axis. Charles-?douard F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey")) axis(2, at=c(0,10,20,30,40,50,60, labels=c(0,10,20,30,40,50,60))) axis(4, at =
2018 May 05
1
error in chol.default((value + t(value))/2) : , the leading minor of order 1 is not positive definite
Dear friends - I'm having troubles with nlme fitting a simplified model as shown below eliciting the error Error in chol.default((value + t(value))/2) : ? the leading minor of order 1 is not positive definite - I have seen the threads on this error but it didn't help me solve the problem. The model runs well in brms and identifies the used parameters even with fixed effects for TRT?
2024 Feb 05
2
ggarrange & legend
Dear John Kane Dear R community Here my working example 1. Example that is working with legend=?top?. However, as mentioned, the legend is in the middle of the top axis. mylist<-list(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", labels = c("(A)", "(B)"), font.label = list(size = 18, color =
2024 Feb 05
1
ggarrange & legend
I'm sorry but that is not a working example. A working example needs to create the plots being used. For example, stealing some code from https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html #================================================================= data <https://rdrr.io/r/utils/data.html>("ToothGrowth")df <- ToothGrowthdf$dose <- as.factor
2024 Feb 05
1
ggarrange & legend
Could you supply us with a MWE (minimal working example)of what you have so far? Thanks. On Mon, 5 Feb 2024 at 05:00, SIBYLLE ST?CKLI via R-help < r-help at r-project.org> wrote: > 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
2009 Sep 29
2
rbind for a list
Dear All, I´m using the following code: all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } to create a new matrix that contains all the matrices in a list called gg2. gg2 is a list that looks like >> gg2 [[1]] [[1]][[1]] <matrix one> [[2]] [[2]][[1]] <matrix two> . . . [[48]] [[48]][[1]] <matrix 48> Is there a faster way to do the rbind?
2024 Apr 18
2
Import multiple tif raster
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_2022/InVEST/Species_Input/valpar_bee_presence", pattern='.tif$', all.files= T, full.names= T) At
2024 Apr 18
1
Import multiple tif raster
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\Desktop\NCCS_Impacts_Lot2_2022\InVEST\Species_Input\valpar_bee_presence", pattern='.tif$', all.files=
2009 Feb 16
1
Overdispersion with binomial distribution
I am attempting to run a glm with a binomial model to analyze proportion data. I have been following Crawley's book closely and am wondering if there is an accepted standard for how much is too much overdispersion? (e.g. change in AIC has an accepted standard of 2). In the example, he fits several models, binomial and quasibinomial and then accepts the quasibinomial. The output for residual
2018 Jan 09
3
barplot_add=TRUE
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 trapcatch in males and females (variable m_w: m and w) problem I used the function "add" to
2024 Apr 18
1
Import multiple tif raster
? Thu, 18 Apr 2024 11:08:33 +0200 SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????: > > #to check the index numbers of all imported raster list elements > > allrasters > list() > > > > #call single raster element > > allrasters[[1]] > Error in allrasters[[1]] : subscript out of bounds `allrasters` is an empty list, so it doesn't have a
2010 Oct 27
1
Fwd: as.list
-------- Original-Nachricht -------- Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: "Sibylle St?ckli" <sibylle.stoeckli at gmx.ch> An: Rhelp <r-help at 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 and columns, and to create barplots. (1) selection of parameter
2013 Aug 22
1
varpart
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 cbind() for the conditional fractions, but it should be similar to condition()? Thanks very much
2010 Sep 23
2
dnorm
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 the dnorm line with the specific histogram. Thanks Sibylle hist(Biotree[Ld,]$Height2008,
2018 Jan 09
1
barplot_add=TRUE
Dear Gerrit Thanks a lot. "rbind" seems to be the right function. Unfortunately there is a shift in the x-axis (see pdf). There are 52 trapcatch values each, m and w, but m$trapcatch and w$trapcatch are shifted up to x-value 60. The follow-up lines for temp and humidity are fine. Thanks Sibylle setwd("~/Desktop/DatenLogger2017") # am Mac sks trap =
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle, since you write '"mathematically" add', does barplot(rbind(m$trapcatch, w$trapcatch)) do what you want (modulo layout details)? Hth -- Gerrit --------------------------------------------------------------------- Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel:
2024 Feb 26
1
igraph_vertex
? Mon, 26 Feb 2024 09:02:56 +0100 SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????: > In the following code, which loads the tiff file, I get the following > error This warning is definitely worth investigating, but it shouldn't interrupt your code. Does the figure come out wrong after you see this warning? > In doTryCatch(return(expr), name, parentenv, handler) :