Displaying 10 results from an estimated 10 matches for "qi_a".
2024 Aug 16
2
boxplot notch
...d in the 1st layer.
Caused by error in `ans[ypos] <- rep(yes, length.out = len)[ypos]`:
! replacement has length zero
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
In rep(yes, length.out = len) : 'x' is NULL so the result will be NULL
Data
Farm_ID Jahr Bio QI_A
1 2015 1 9.5
2 2018 1 15.7
3 2020 1 21.5
1 2015 1 50.5
2 2018 1 12.9
3 2020 1 11.2
1 2015 1 30.6
2 2018 1 28.7
3 2020 1 29.8
1 2015 1 30.1
2 2018 1 NA
3 2020 1 16.9
1 2015 0 6.5
2 2018 0 7.9
3 2020 0 10.2
1 2015 0 11.2
2 2018 0 18.5
3 2020 0 29.5
1 2015 0 25.1
2 2018 0 16.1
3 2020 0 15.9
1 2015 0 1...
2024 Aug 16
1
boxplot notch
...command ?notch=TRUE? is at the wrong place in my special code
> construct?
>
>
>
> Without notch=TRUE the code provides the planned ggplot.
>
>
>
> Kind regards
>
> Sibylle
>
>
>
> Code:
>
>
>
> MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
>
> MS1$Jahr<-as.factor(MS1$Jahr)
>
>
>
> MS1s <- MS1 %>%
>
> group_by(MS1$Jahr, MS1$Bio) %>%
>
> summarise(
>
> y0 = quantile(QI_A, 0.05),
>
> y25 = quantile(QI_A, 0.25),
>
>...
2024 Aug 16
1
boxplot notch
...mmunity
I tried the following code using geom_boxplot() and notch=TRUE. Does anyone
know if the command ?notch=TRUE? is at the wrong place in my special code
construct?
Without notch=TRUE the code provides the planned ggplot.
Kind regards
Sibylle
Code:
MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
MS1$Jahr<-as.factor(MS1$Jahr)
MS1s <- MS1 %>%
group_by(MS1$Jahr, MS1$Bio) %>%
summarise(
y0 = quantile(QI_A, 0.05),
y25 = quantile(QI_A, 0.25),
y50 = mean(QI_A),
y75 = quantile(QI_A, 0.75),
y100 = quantile(QI_A, 0....
2024 Aug 11
1
geom_smooth with sd
...E ST?CKLI via R-help <
r-help at r-project.org> wrote:
> Dear community
>
>
>
> Using after_stat() I was able to visualise ggplot with standard deviations
> instead of a confidence interval as seen in the R help.
>
>
>
> p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,color=Bio, linetype=Bio)) +
>
> geom_smooth(aes(fill=Bio,
> ymax=after_stat(y+se*sqrt(length(y))), ymin=after_stat(y-se*sqrt(y))) ,
> method = "lm" , formula = y ~ x + I(x^2),linewidth=1) +
>
> theme(panel.background = element_blank())+
&g...
2024 Aug 16
1
boxplot notch
...o
do in the geom_boxplot() call and how it uses the summarised data tibble.
It may even be that if you do that, you will find what's causing the
problem!? (I speak from bitter experience!!)
Very best (all),
Chris
On 16/08/2024 17:51, SIBYLLE ST?CKLI via R-help wrote:
> Farm_ID Jahr Bio QI_A
> 1 2015 1 9.5
> 2 2018 1 15.7
> 3 2020 1 21.5
> 1 2015 1 50.5
> 2 2018 1 12.9
> 3 2020 1 11.2
> 1 2015 1 30.6
> 2 2018 1 28.7
> 3 2020 1 29.8
> 1 2015 1 30.1
> 2 2018 1 NA
> 3 2020 1 16.9
> 1 2015 0 6.5
> 2 2018 0 7.9
> 3 2020 0 10.2
> 1 2015 0 11.2...
2024 Aug 11
1
geom_smooth with sd
Dear community
Using after_stat() I was able to visualise ggplot with standard deviations
instead of a confidence interval as seen in the R help.
p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,color=Bio, linetype=Bio)) +
geom_smooth(aes(fill=Bio,
ymax=after_stat(y+se*sqrt(length(y))), ymin=after_stat(y-se*sqrt(y))) ,
method = "lm" , formula = y ~ x + I(x^2),linewidth=1) +
theme(panel.background = element_blank())+
theme(axis.l...
2024 Jul 18
2
ggplot two-factor legend
...inetype (solid and dashed).
Challenge: my code produces now two legends. One with the colors for the
group and one with the linetype for the group. Does somebody have a hint how
to adapt the code to produce one legend? Group 0 = red and dashed, Group 1 =
green and solid?
MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
dev.new(width=4, height=2.75)
par(mar = c(0,6,0,0))
p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,group=Bio,color=Bio,
linetype=Bio)) +
geom_smooth(aes(fill=Bio) , method = "lm" , formula = y ~ x +
I(x^2),linewidth=1) +
theme(panel.background =...
2024 Jul 18
1
ggplot two-factor legend
...allenge: my code produces now two legends. One with the colors for the
> group and one with the linetype for the group. Does somebody have a hint how
> to adapt the code to produce one legend? Group 0 = red and dashed, Group 1 =
> green and solid?
>
>
> MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
> dev.new(width=4, height=2.75)
> par(mar = c(0,6,0,0))
> p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,group=Bio,color=Bio,
> linetype=Bio)) +
> geom_smooth(aes(fill=Bio) , method = "lm" , formula = y ~ x +
> I(x^2),linewidth=...
2024 Jul 18
1
ggplot two-factor legend
...>Challenge: my code produces now two legends. One with the colors for the
>group and one with the linetype for the group. Does somebody have a hint how
>to adapt the code to produce one legend? Group 0 = red and dashed, Group 1 =
>green and solid?
>
>
>MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
>dev.new(width=4, height=2.75)
>par(mar = c(0,6,0,0))
>p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,group=Bio,color=Bio,
>linetype=Bio)) +
> geom_smooth(aes(fill=Bio) , method = "lm" , formula = y ~ x +
>I(x^2),linewidth=1) +
&...
2024 Jul 18
1
ggplot two-factor legend
...One with the colors for the
>> group and one with the linetype for the group. Does somebody have a
>> hint how
>> to adapt the code to produce one legend? Group 0 = red and dashed,
>> Group 1 =
>> green and solid?
>>
>>
>> MS1<- MS %>% filter(QI_A!="NA") %>% droplevels()
>> dev.new(width=4, height=2.75)
>> par(mar = c(0,6,0,0))
>> p1<-ggplot(data = MS1, aes(x= Jahr, y= QI_A,group=Bio,color=Bio,
>> linetype=Bio)) +
>> ???????? geom_smooth(aes(fill=Bio) , method = "lm" , formula = y ~ x +...