[R] R2HTML: how to include comments in html output

2010-07-16 Thread Vikas Rawal
Is there any way to include comments in the html output of R2HTML? Or is there any other function in any package that produces an html output including comments, commands and output of the commands. Vikas Rawal __ R-help@r-project.org mailing list

[R] (no subject)

2009-01-22 Thread Vikas Rawal
> ggplot2 should make legends automatically if the data is in the > correct format. If you could send a reproducible example, that would > help detect the error. Take the following two plots. The first one produces a broken line. In the second one, the variable Phase is numeric and therefore it

[R] ggplot2

2009-01-22 Thread Vikas Rawal
I have been struggling to get the legends in ggplot2 right or do away with them altogether (on which I have already sent a post). In the following code, the labels argument in the scale_colour_gradient2 does not give me the desired labels in the legend. Could someone explain? qplot(Year,CDR,da

[R] ggplot2, pretty=FALSE

2009-01-22 Thread Vikas Rawal
() pushViewport(viewport(height=0.4, width=0.4, x=0.4, y=0.8)) print(p, newpage=FALSE, pretty=FALSE) Is there some other way of doing "pretty=FALSE" in the new version of ggplot2? Vikas Rawal [[alternative HTML version deleted]] _

Re: [R] Fitting a curve to data

2008-07-02 Thread Vikas Rawal
> There is an integrate.xy in sfsmic. Limitations discussed there. Also see trap.rule in Hmisc Vikas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gu

Re: [R] reshaping data frame

2008-02-21 Thread Vikas Rawal
> # 2. create one new row for each case in level.1 and level.2 > > # the new reshaped data.frame would should look like this: > > # indiv factorcovar case.id > # A level.1 4.6141051 > # A level.1 4.6141052 > # A level.2 31.0644051 > # A level.2 31.064405

Re: [R] qplot

2008-02-19 Thread Vikas Rawal
> Format your dataframe into a long format. Then use a grouping variable > to distinguish both lines. > > library(ggplot2) > DF <- data.frame(X = rep(0:20, 2), Y = c(rnorm(21), runif(21)), Z = > gl(2, 21)) > ggplot(data = DF, aes(x = X, y = Y, colour = Z)) + geom_line() You can also use ggplot a