Top "R-faq" questions

The r-faq tag is created to group a limited number of questions discussing problems that come up regularly on the R tag.

Add column which contains binned values of an integer column

I have a dataframe with a few columns, one of those columns is ranks, an integer between 1 and 20. I want …

r r-faq
How to create a consecutive group number

I have a data frame (all_data) in which I have a list of sites (1... to n) and their scores …

r r-faq
Index values from a matrix using row, col indices

I have a 2D matrix mat with 500 rows × 335 columns, and a data.frame dat with 120425 rows. The data.frame dat …

r indexing matrix r-faq
ggplot's qplot does not execute on sourcing

Let's assume I have 2 source files, the first one named example1.r and the second one example2.r (given below). …

r ggplot2 r-faq
Subset data frame based on number of rows per group

I have data like this, where some "name" occurs more than three times: df <- data.frame(name = c("…

r dataframe subset r-faq
What are the differences between concatenating strings with cat() and paste()?

What are the differences between concatenating strings with cat and paste? In particular, I have the following questions. Why does …

r character string-concatenation r-faq
How to generate permutations or combinations of object in R?

How to generate sequences of r objects from n objects? I'm looking for a way to do either permutations or …

r combinations permutation multiset r-faq
Calculate group mean (or other summary stats) and assign to original data

I want to calculate mean (or any other summary statistics of length one, e.g. min, max, length, sum) of …

r mean summary mutate r-faq
How to check the OS within R

Possible Duplicates: detecting operating system in R (e.g. for adaptive .Rprofile files) How can I determine in R what …

r r-faq
Reshaping multiple sets of measurement columns (wide format) into single columns (long format)

I have a dataframe in a wide format, with repeated measurements taken within different date ranges. In my example there …

r reshape tidyr reshape2 r-faq