Pinned Bulletins
View all 1 bulletinsR Language has some news to share
Pinned content
View all 3 collectionsR Language admins have deemed these posts noteworthy.
R Language Frequently Asked Questions
How to write a good R question with a reproducible example
Can you answer these questions?
View all unanswered questionsThese questions still don't have an answer
Making data.frames of different lengths the same length based on same values in one column across data.frames (or: how to manage subsetting)
Control the size of the output plot in R notebook in Positron
R expressions for branch labels in `rpart` object
Run reticulate::py_require() once on package installation
shinybusy does not work in bslib::page_navbar
Recommended answers
View all recommended answersThese answers have been recommended
How to format numbers with commas using table1
library(table1) set.seed(42) dat <- data.frame( Group = factor(rep(c("Treatment", "Control"), each = 50000)), Count = round(rnorm(100000, 50, 15)), Category = ...
How to correctly read German special characters from CSV file in R on Linux?
Looking at the file, it is incorrectly encoded. It does satisfy the requirements for looking like a UTF-8 file, but it doesn't encode the characters you are expecting. For example, in Nürnberg, the &...
Persist R function defined in Rprofile even if user clears environment
Edit: changed from using rlang::env_unlock() (which is deprecated) to something more local. Somes notes about this: I'm using dot-names, mostly because it is one-step more to "find" them ...
Creating (ggplot2-)boxplots based on integer x values with correct spacing on the x axis
A pure {ggplot2} option would be to convert your p column to integers and to explicitly set the group aes to group by both p and q: library(ggplot2) set.seed(123) min_ex <- data.frame( p = ...
Plotting actual words as the bars in R
Yet another ggplot option, if you want your labels to sit inside actual bars: library(tidyverse) df %>% mutate(nchar = nchar(Title)) %>% ggplot(aes(Year, 0)) + geom_label(aes(label = ...
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