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
Extracting matched data using overlap weights
clmm function gives me an error "Error in x$code == 0L || action == "silent" : Error 'length = 2' in coercion to 'logical(1)'"
Convert ordinal word string to ordinal number string?
How do I order a barchart, but not by ascending or descending order?
NA values when using avg_predictions() from marginaleffects with a flexsurv model
Looking for an extra challenge?
View all bountied questionsThese questions have a bounty on them
Create dropdown list in R using plotly?
Using LaTeX packages in Quarto YAML for Typst output-formats
Recommended answers
View all recommended answersThese answers have been recommended
Confused about lists in R?
Keep in mind the distinction in R between lists and vectors. In R, 1:4 is a vector. list(1:4) is a list of length 1 that contains a vector of length 4. as.list(1:4) is a list of length 4 where each ...
Using the approx function for several variables within 2 groups
fx doesn't need to interpolate sex, and it should probably return a data.frame. Then you can nest, mutate and unnest: fx = function(d){ fapp <- function(v) approx(d$agedays,v,xout=746:776)$y as....
dplyr identify rows that do not have a matched column within group
Within each name, there should be: At least one observation for each levels of LEVEL (0 and 1). At least one (length(...) != 0) TITLE among the LEVEL == 1 that is different (setdiff) from any of the ...
Convert a dataframe of nearest neighbors to onehot coding
as.data.frame.matrix(table(reshape2::melt(df, id = 1)[-2])) #> Fiat Honda Lotus Mazda Toyota #> Fiat 0 1 1 0 0 #> Honda 0 0 0 1 1 #> ...
How to stop the run, and throw customized and original error messages using tryCatch in R?
E.g. something like: a <- 1 res <- tryCatch( a+"T", error = function(e) cat("We get the following errors:\n", e$message) ) We get the following errors: non-numeric ...
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