[R] mhplot error with test example: "ylim not found"
Jing Hua Zhao
JingHua.Zhao at mrc-epid.cam.ac.uk
Mon Jun 28 20:45:54 CEST 2010
Many thanks Peter. I have uploaded 1.0-23 which should have this fixed.
From: Peter Ehlers [mailto:ehlers at ucalgary.ca]
Sent: 28 June 2010 15:47
Cc: r-help at r-project.org; Jing Hua Zhao
Subject: Re: [R] mhplot error with test example: "ylim not found"
It seems to me that gap::mhtplot needs a fix.
You might want to contact the maintainer (cc'd).
In the meantime, you should be able to place an
object ylim in your workspace before calling the
ylim <- c(0, 10)
mhtplot(test, ylim = c(0, 10))
Of course, you could also just fixt the function
(it's short and the fix is easy).
On 2010-06-23 8:47, vaneet wrote:
> Hello all,
> I am trying to make a genome association plot for p-values related to
> and was fortunate to find that R contains a package that produces
> plots which is what's preferred for my current project. The function
> mhtplot() is found in the 'gap' package which I installed in R 2.11.1
> Windows. I thought I'd test out the function first with the examples
> give in the documentation:
> # foo example
> test<- matrix(c(1,1,4,1,1,6,1,10,3,2,1,5,2,2,6,2,4,8),byrow=TRUE,6)
> # fake example with Affy500k data
> affy<-c(40220, 41400, 33801, 32334, 32056, 31470, 25835, 27457, 22864,
> 28501, 26273,
> 24954, 19188, 15721, 14356, 15309, 11281, 14881, 6399,
> CM<- cumsum(affy)
> n.markers<- sum(affy)
> n.chr<- length(affy)
> # to reduce size of the plot
> # bitmap("mhtplot.bmp",res=72*5)
> oldpar<- par()
> colors<- rep(c("blue","green"),11)
> title("A simulated example according to EPIC-Norfolk QCed SNPs")
> When I run either of the examples the following results:
> Error in mhtplot(........) : object 'ylim' not found
> Even though I'm not sure why it would require this parameter, when I
> to fill in the parameter (ylim = c(0,10)) the same error results. I
> sure how to get around this.
More information about the R-help