Re: [R] Putting names on a ggplot

2009-10-18 Thread ml
hello, On Sun, Oct 18, 2009 at 08:29:19AM -0700, John Kane wrote: > Thanks Stefan, the annotate approach works beautifully. I had not got > that far in Hadley's book apparently :( > > I'm not convinced though that the explaination > > > you shouldn't use aes in this case since nampost, > > temp

Re: [R] Putting names on a ggplot

2009-10-17 Thread ml
hi, On Sat, Oct 17, 2009 at 02:04:43PM -0700, John Kane wrote: > Putting names on a ggplot > > p <- p + geom_text(aes(x = namposts + 2.5, y = temprange[2], label = > mlabs), > data = year, size = 2.5, colour='black', hjust = 0, vjust = 0) > you shouldn't use aes in this case since nampost

Re: [R] How to read and write an S4 class

2009-08-12 Thread ml-r-help
see ?dput ?save e.g. setClass("track", representation(x="numeric", y="numeric")) x <- new("track", x=1:4, y=5:8) # save as binary fn <- tempfile() save(x, ascii=FALSE, file=fn) rm(x) load(fn) x # save as ASCII save(x, ascii=TRUE, file=fn) # ASCII text representation from which to regenerate

Re: [R] How to stop function printing unwanted output?

2009-08-06 Thread ml-r-help
?capture.output so with the given example this line should do what you wanted while avoiding the output file dummy <- capture.output(comparison <- LSD.test(yield,virus,df,MSerror, p.adj="bonferroni", group=FALSE, main="Yield of sweetpotato\ndealt with different virus")) Matthias David Winsemi

Re: [R] Bug in package.skeleton, R 2.9.0?

2009-07-15 Thread ml-r-help
Daniel Klevebring wrote: > Bump > > Anyone? > > Thanks > Daniel > > On 13 jul 2009, at 10.57, Daniel Klevebring wrote: > >> Dear all, >> >> I am using package.skeleton to build a small packages of misc function >> for personal use. I have recently discovered that the option >> force=TRUE doesn'

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 29.04.2009 17:05:01: > >> see >> ?is.null >> >> e.g. >> if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) >> { >> your code >> } > > It probably will not work as > > sub_grp_whr_cls_data[sbgrp_no,1]=="NULL" > > implicates tha

Re: [R] if condition doesn't evaluate to True/False

2009-04-29 Thread ml-r-help
see ?is.null e.g. if( is.null(sub_grp_whr_cls_data[sbgrp_no, 1]) ) { your code } Moumita Das wrote: > Hi friends, > Please help me with this bug. > > *Bug in my code:* > > In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where > clause.every sub group has a where condition linked

Re: [R] Error in var(x, na.rm = na.rm) : no complete element pairs

2009-03-05 Thread ml-r-help
Carlos Morales wrote: > Hello, > > I still have the same error which I have written in the Subject field, I > leave here the code and I hope you can help me with this: > [removed] the lengthy code example does not make it easier to help you, in particular without the data you used. All the com

Re: [R] R package tests

2009-01-15 Thread ml-r-help
Hi Nathan, in addition to what others have already mentioned there is some documentation in the Writing R Extensions Manual: - on the supported structure of packages, indicating where test code might be added http://stat.ethz.ch/R-manual/R-patched/doc/manual/R-exts.html#Package-subdirectories -