Re: [R] Find missing days

2008-01-02 Thread Lauri.Nikkinen
Thanks Gabor. Neat, it creates a df but this in not the solution I'm looking for. This is hard to explain but I'll give it a try. See, in my original df, in lev1, there is only 20 days > range(df$date1[df$lev == "lev1"]) [1] "2007-09-01" "2007-09-23" and we all know that in September there is 30

Re: [R] Find missing days

2008-01-01 Thread Lauri.Nikkinen
Thanks Gabor for your reply. Your script will find missing days in date1 range but my intention was to find missing days in each level (df$lev) in corresponding month. The resulting df could look like this: lev date1 1 lev1 2007-09-03 2 lev1 2007-09-04 4 lev1 2007-09-24 5 lev1 2007-09

[R] Find missing days

2008-01-01 Thread Lauri.Nikkinen
Hi, I have a data.frame like this: y <- rnorm(60) lev <- gl(3,20, labels=paste("lev", 1:3, sep="")) date1 <- as.Date(seq(ISOdate(2007,9,1), ISOdate(2007,11,5), by=60*60*24)) date1 <- date1[-c(3,4,15,34,38,40)] df <- data.frame(lev=lev, date1=date1, y=y) I would like to produce a new data.frame w

[R] Plotting question: how to plot SNP location data?

2007-10-30 Thread Lauri.Nikkinen
Hello, I would like to plot specific SNPs with their exact locations on a chromosome. Based on my genotyping results I would like to separate these SNPs in three different categories: 1, 2 and 3 and use different colours to represent these categories. The script below generates the sample data. I