Displaying 10 results from an estimated 10 matches for "names_to".
2024 Jun 12
1
my R code worked well when running the first 1000 lines of R code
...> For conflicting issue,
>
> What I tried was to add dplyr::pivot_longer or tidyr:: pivot_longer,
Do that to all functions comming from contributed packages. At least to
those.
summary_anno1148ft <- anno1148ft %>%
tidyr::pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to =
"measure") %>%
dplyr::group_by(dat, measure) %>%
dplyr::summarize(minimum = min(value,na.rm=T),
q25 = quantile(value, probs = 0.25,na.rm=T),
med = median(value,na.rm=T),
q75 = quantile(value, probs = 0.75,na.rm=T),...
2024 Jun 12
1
my R code worked well when running the first 1000 lines of R code
...For conflicting issue,
>
> What I tried was to add dplyr::pivot_longer or tidyr:: pivot_longer,
Do that to all functions comming from contributed packages. At least to
those.
summary_anno1148ft <- anno1148ft %>%
tidyr::pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to =
"measure") %>%
dplyr::group_by(dat, measure) %>%
dplyr::summarize(minimum = min(value,na.rm=T),
q25 = quantile(value, probs = 0.25,na.rm=T),
med = median(value,na.rm=T),
q75 = quantile(value, probs = 0.75,na.r...
2024 Jun 12
3
my R code worked well when running the first 1000 lines of R code
...hed.
However, after running another 2000 lines of R codes using functions from more than 10 other R libraries, then it only generated one column of summary.
Do you know why?
Thank you,
Yuan Chun Ding
summary_anno1148ft <- anno1148ft %>%
pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to = "measure") %>%
group_by(dat, measure) %>%
summarize(minimum = min(value,na.rm=T),
q25 = quantile(value, probs = 0.25,na.rm=T),
med = median(value,na.rm=T),
q75 = quantile(value, probs = 0.75,na.rm=T),
maximum = max(value,na.rm=T)...
2024 Jun 12
1
my R code worked well when running the first 1000 lines of R code
...hed.
However, after running another 2000 lines of R codes using functions from more than 10 other R libraries, then it only generated one column of summary.
Do you know why?
Thank you,
Yuan Chun Ding
summary_anno1148ft <- anno1148ft %>%
pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to = "measure") %>%
group_by(dat, measure) %>%
summarize(minimum = min(value,na.rm=T),
q25 = quantile(value, probs = 0.25,na.rm=T),
med = median(value,na.rm=T),
q75 = quantile(value, probs = 0.75,na.rm=T),
maximum = max(value,na.rm=T)...
2023 May 02
1
Reg: Help regarding ggplot2
...ata using dput in future: saves us having to do
something like that to reclaim it!
### pivot that longer to make it easy to get country data as separate lines
data_vol3 %>%? select(-rowN) %>%
? pivot_longer(cols = -index, # as you want to pivot the other
variables/columns
?????????????? names_to = "countries") -> tibDataVol3Long
ggplot(data = tibDataVol3Long,
?????? aes(x = index, y = value,
???????????? ### now get the grouping and use it for a colour legend
???????????? group = countries, colour = countries)) +
? geom_line()
> Any help in this regard will be highly...
2024 Jun 12
1
my R code worked well when running the first 1000 lines of R code
...of R codes using functions from
> more than 10 other R libraries, then it only generated one column of
> summary.
> Do you know why?
>
> Thank you,
>
> Yuan Chun Ding
>
> summary_anno1148ft <- anno1148ft %>%
> pivot_longer(c(t_depth, t_alt_count, t_alt_ratio), names_to = "measure")
> %>%
> group_by(dat, measure) %>%
> summarize(minimum = min(value,na.rm=T),
> q25 = quantile(value, probs = 0.25,na.rm=T),
> med = median(value,na.rm=T),
> q75 = quantile(value, probs = 0.75,na.rm=T),
>...
2023 Oct 31
1
weights vs. offset (negative binomial regression)
...low.
>
> ? ?cheers
> ? ? Ben Bolker
>
>
> edata <- data.frame(Catch, Effort, xx1, xx2, xx3)
>
> ## graphical exploration
>
> library(ggplot2); theme_set(theme_bw())
> library(tidyr)
> edata_long <- edata |> pivot_longer(names_to="var", cols =-c("Catch",
> "Effort"))
> ggplot(edata_long, aes(value, Catch)) +
> ? ? ?geom_point(alpha = 0.2, aes(size = Effort)) +
> ? ? ?facet_wrap(~var, scale="free_x") +
> ? ? ?geom_smooth(method = "glm", m...
2023 May 02
5
Reg: Help regarding ggplot2
Dear All,
I have a dataset which contains date and 12 other countries data. I
have extracted the data as xts object.
I am not able to recall all the series in the Y axis. My data set
looks like this
index crepub finland france germany italy netherlands norway poland
<date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
2023 Apr 04
1
Simple Stacking of Two Columns
Just to repeat:
you have
NamesWide<-data.frame(Name1=c("Tom","Dick"),Name2=c("Larry","Curly"))
and you want
NamesLong<-data.frame(Names=c("Tom","Dick","Larry","Curly"))
There must be something I am missing, because
NamesLong <- data.frame(Names = c(NamesWide$Name1, NamesWide$Name2))
appears to
2024 Jun 28
1
Ayuda para hacer una lista
Hola, que tal?
Sin saber nada mas de los datos, por lo que dices, mi aprioximacion
seria usar la funcion split, e.g.:
splittedData <- split(myData, "variablegrupo/condicion")
Esto te crearia una lista con tantos objectos como condiciones tengas.
Saludos
On 6/27/24 10:15, Leticia G Leon wrote:
> Muchas fracias por la rapida contastacion Javier.
>
> Si, ya me he dado