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
Can you answer these questions?
View all unanswered questionsThese questions still don't have an answer
Adding nested lists using xmlrpc2 package
1-D flow model in lsode in r
ggsurvfit Kaplan Meier risk table customisation
Exit swirl in the middle of a cmd_question
Extracting WAIC using rjags::jags.samples() from single chain of bayesian model run in parallel with JagsUI
Looking for an extra challenge?
View all bountied questionsThese questions have a bounty on them
Spectral interpolation of Sentinel-2 in r
Optimizing a complex, custom data problem - find the optimal polygon that contains a give fraction of data, with constraints
Recommended answers
View all recommended answersThese answers have been recommended
Create plot with variable height in facet_wrap
One option to achieve your desired result would be to use a combo of ggforce and patchwork. First, split your data by columns. Then create a facetted plot for each column using ggforce::facet_col ...
In ggplot2 how can I display in single legend the line color and point shape mapped to vector of single-character strings?
We can map the shape to cyl_word and force manual shapes: ggplot(mtcars2, aes(mpg, wt, color=cyl_word)) + geom_line() + geom_point(aes(shape=cyl_word), size=3) + scale_shape_manual(values = ...
Efficient method to estimate the group membership
If efficiency is at stakes, and the Interval is not necessarily contiguous, then we can write our own {Rcpp} function: library(Rcpp) library(inline) findIntervalGroup <- cxxfunction( signature(...
Change colour of text that labels a tile in ggplot2
I think your second code block ("Answer:") is a good approach, though you may run into problems when a fill is light enough that white lettering on the weekends will be washed out. An ...
Drop rows with missing values in all columns [duplicate]
I usually recommend collapse::na_omit for that. The oddly-specific prop argument will remove rows with a proportion of missing values >= prop. It's the fastest and most flexible option: collapse::...
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