How to perform a Wilcoxon signed rank test for survival data in R? Say you have survival data like this:
obs <- data.frame(
  time = c(floor(runif(100) * 30), floor((runif(100)^2) * 30)),
  status = c(rbinom(100, 1, 0.2), rbinom(100, 1, 0.7)),
  group = gl(2,100)
  )

To perform a standard log rank test, one can use
survdiff(Surv(time, status) ~ group, data = obs, rho = 0)

right?
But what about other test?
How could you perform a Wilcoxon signed rank test, a Peto test or a Fleming-Harrington test?
R provides a possibility to perform a Wilcoxon test, however I didn't find how to let it take censoring into account.
Furthermore the doc states that setting rho = 1 would make the test a "Peto & Peto modification of the Gehan-Wilcoxon test". But is this the same as the Peto test?
 A: (You should probably cite the source for your naming conventions and explain in more detail why this question is being posed. If this a case of trying to match the documentation for SAS or SPSS we might have cross-cultural difficulties.)
The quick answer to your specific question about how to get a "Peto test" is to use rho=1, but it will be an approximation. Referring to the one-sample and two-sample sections of chapter 7 in Klein and Moeschberger's "Survival Analysis", we read that the Peto-Peto version and the Gehan versions were both two-sample (censored) versions of the Mann-Whitney Wilcoxon two-sample test but used different versions of the survival function estimator. There is no single 'Fleming-Harrington test' since that term refers to a family of tests which reduce to the log-rank and the Wilcoxon-type  tests at specified values of rho. (The R/S surv.diff function has the q-parameter of the Fleming-Harrington family fixed at 0 and only varies the p-parameter which it names rho.)
A meta-question is whether you should be focusing on the names and not on the mathematical substance? Choosing p=rho=0 (with q fixed at 0) in the Fleming-Harrington family weights the (O-E) or cross-group differences equally across the range of times, whereas both the Gehan-Wilcoxon and Peto-Peto tests weight the early deaths more strongly. My opinion (as a physician) is that it's sensible to have a weighting the considers early differences more probative for the typical case, but can imagine specific instances where the other choice could be defended.
A: To answer your question on how to calculate this in R, you can use the comp() function from the survMisc package. Example:
> library(survMisc)
> fit = survfit(Surv(time, status) ~ x, data = aml)
> comp(fit)$tests$lrTests
                              ChiSq df      p
Log-rank                       3.40  1 0.0653
Gehan-Breslow (mod~ Wilcoxon)  2.72  1 0.0989
Tarone-Ware                    2.98  1 0.0842
Peto-Peto                      2.71  1 0.0998
Mod~ Peto-Peto (Andersen)      2.64  1 0.1042
Flem~-Harr~ with p=1, q=1      1.45  1 0.2281

To choose the parameters for the Fleming-Harrington test (shown in the last line), you use the FHp and FHq arguments. For example,
> comp(fit, FHp=0, FHq=0)$tests$lrTests
[…]
Flem~-Harr~ with p=0, q=0      3.40  1 0.0653

gives you the normal log-rank test (also shown in the first line in the first example).
