Pinned content
View all 3 collectionsR Language admins have deemed these posts noteworthy.
How to write a good R question with a reproducible example
R Language Frequently Asked Questions
Can you answer these questions?
View all unanswered questionsThese questions still don't have an answer
Remove extra measurements within specific brackets per ID in R
Using rgl's extrude3d() function to make a 3D mesh from polygons in R
R Synthpop - Unable to write rules to ensure float1 <= float2 <= float3
Different outputs of marginaleffects::avg_prediction and ggeffects::ggeffect in R
Use SMD or raw difference in proportions when comparing balance of binary covariates used in propensity matching?
Looking for an extra challenge?
View all bountied questionsThese questions have a bounty on them
ROracle installation errors on EL8
SparkR: creating a Spark table with a nested data column
Recommended answers
View all recommended answersThese answers have been recommended
Trying to create a grouped barchart in R - producing a stacked one instead
As the variable mapped on fill is a numeric aka continuous variable you have to convert to a discrete or categorical variable using e.g. factor or explicitly map on the group aes: library(ggplot2) ...
Display all levels in legend of ggplotly object
We can add a dummy row (schoolname == NA) with "Excellent" rating, then that level is shown in the legend without getting plotted. Moreover, you had a typo where your levels in cut() did not ...
Convert a list into a tibble with nested columns
Perhaps something like: list_transpose(lst, default = NA, template = unique(unlist(map(lst, names)))) |> as_tibble() |> mutate(across(where(is.list), \(l) if (all(lengths(l) == 1)) unlist(...
Pad column numbers while using separate_wider_delim in R
You can specify the names, e.g. like so: df %>% separate_wider_delim( fruits_selected, delim = "+", names = sprintf("%02d", 1:3), names_sep = '_' ) If ...
How to add semicircles overlying geom_point in ggplot2
A more elaborated option would be to use some custom shapes. The approach below builds on this answer by @AllanCameron (which I already applied here) and this answer by @Baptiste to create the custom ...
See what's trending
View all trending questionsThese are the most active questions in R Language Collective
How to make a great R reproducible example
Sort (order) data frame rows by multiple columns
How do I replace NA values with zeros in an R dataframe?
Drop data frame columns by name
How to join (merge) data frames (inner, outer, left, right)
How to write a good R question with a reproducible example
Create multiple PDF/HTML reports using R Markdown in a loop
Simply submit a proposal, get it approved, and publish it.
See how the process works