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.

How to plot a function curve in R

What are the alternatives for drawing a simple curve for a function like eq = function(x){x*x} in R? …

r ggplot2 plot lattice r-faq
Changing date format in R

I have some very simple data in R that needs to have its date format changed: date midpoint 1 31/08/2011 0.8378 2 31/07/2011 0.8457 3 30/06/2011 0.8147 4 31/05/2011 0.7970 5 30/04/2011 0.7877 6 31/03/2011 0.7411 7 28/02/2011 0.7624 8 31/01/2011 0.7665 9 31/12/2010 0.7500 10 30/11/2010 0.7734 11 31/10/2010 0.7511 12 30/09/2010 0.7263 13 31/08/2010 0.7158 14 31/07/2010 0.7110 15 30/06/2010 0.6921 16 31/05/2010 0.7005 17 30/04/2010 0.7113 18 31/03/2010 0.7027 19 28/02/2010 0.6973 20 31/01/2010 0.7260 21 31/12/2009 0.7154 22 30/11/2009 0.7287 23 31/10/2009 0.7375 Rather than %…

r date format strptime r-faq
What does "The following object is masked from 'package:xxx'" mean?

When I load a package, I get a message stating that: "The following object is masked from 'package:xxx' For …

r r-faq
Calculate the mean by group

I have a large data frame that looks similar to this: df <- data.frame(dive = factor(sample(c("…

r dataframe r-faq
How can I subset rows in a data frame in R based on a vector of values?

I have two data sets that are supposed to be the same size but aren't. I need to trim the …

r subset r-faq
Elegant way to check for missing packages and install them?

I seem to be sharing a lot of code with coauthors these days. Many of them are novice/intermediate R …

r packages r-faq
Understanding the order() function

I'm trying to understand how the order() function works. I was under the impression that it returned a permutation of …

r sorting r-faq
do-while loop in R

I was wondering about how to write do-while-style loop? I found this post: you can use repeat{} and check conditions …

r loops repeat do-while r-faq
duplicate 'row.names' are not allowed error

I am trying to load a csv file that has 14 columns like this: StartDate, var1, var2, var3, ..., var14 when I …

r csv r-faq
What is the difference between require() and library()?

What is the difference between require() and library()?

r package r-faq