[R] polygon

2004-04-20 Thread mike . campana
Dear all
I try once again.
In order to clearly mark values wich are larger than a treshold value, I 

would like to color the surface below the line given by plot (yy~xx). To 
color is only the surface between abline (treshold) and yy if they are 
larger than the specific limit. I guess I can use the function polygon, 
but I can not find any valuable solution.
I'm grateful to you for an advice, an example or a link.
Mike  

xx <- c(1:100)
yy <- rnorm(100)
plot (yy~xx,type="l")
abline (h=0.5,col="red")
#?? how can I use polygon()
#in order to color surface below yy value and > abline??
polygon(xx,yy,col="gray")

---


---


---


---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: RE: [R] import Excel file ?

2004-04-20 Thread mike . campana
You can also find different examples in the manual R for Beginners by 
Emmanuel Paradis (that you can easily download from the internet)

under http://zoonek2.free.fr/UNIX/48_R/all.html you find a lot of 
information about R in french, which is also very useful

Mike

---


---


---


---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] polygon

2004-04-20 Thread mike . campana
Dear all

In order to clearly mark values wich are larger than a treshold value, I 
would like to color the surface below the line given by plot (yy~xx). To 
color is only the surface between abline (treshold) and yy if they are 
larger than the specific limit. I guess I can use the function polygon, 
but I can not find any valuable solution.
I'm grateful to you for an advice or an example.
Mike  

xx <- c(1:100)
yy <- rnorm(100)
plot (yy~xx,type="l")
abline (h=0.5,col="red")
#?? how can I use polygon()
#in order to color surface below yy value and > abline??
polygon(xx,yy,col="gray")

---
60 Minuten pro Monat gratis telefonieren: So werden bei sunrise treue Kunden belohnt!
http://internet.sunrise.ch/de/wireline/wir_60.asp
---
Téléphoner gratuitement pendant 60 minutes: sunrise sait récompenser les clients 
fidèles. 
http://internet.sunrise.ch/fr/wireline/wir_60.asp
---
Telefonate gratuitamente per 60 minuti: sunrise premia così la vostra fiducia.  
http://internet.sunrise.ch/it/wireline/wir_60.asp
---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] outliers

2004-04-08 Thread mike . campana
Dear all

I would like to represent the outliers in the plot. These few outliers 
are much larger than the limit of 50 in the ylim-argument.

plot(daten$month~daten$no,ylim=c(0,50))

I know that it is possible to introduce the information about the 
presence of outliers without changing the range of the axis. Do you have 
an advice? I hope the question is understandable!!

Thanks a lot for your explantion

Mike

---

Aufgrund grosser Nachfrage: sunrise ADSL Null-Franken-Angebot verlängert bis Ende 
April 2004!

---

En raison de la forte demande: offre sunrise ADSL à CHF 0.- prolongée jusqu'à fin 
avril 2004!

---

Considerando la grande domanda, l'offerta sunrise ADSL a zero franchi sarà prolungata 
sino a fine aprile 2004!

---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] plot & easy question

2004-04-03 Thread mike . campana
Dear all

I guess I have a quite simple question
I do not have any problem to plot the data (daily averages)in different 
plots as monthly time series (for example with a for –loop over the 
different months). My problem begin when I want to represent always as a 
time serie 1999 data (from june) and 2000 data (until june) in a single 
plot(always as daily averages). Actually I would like to see the winter 
data in the middle of the plot.

Do you have an advice? Thank you for your answer
Mike

> data

Datum Bod Loc  Mag Chi  Lug  Mil  Com  day month year Smog
1  19990601  NA  NA 27.6  33 30.8 74.1 53.3  16 19991
2  19990602  NA  NA 21.8  49 48.9 81.9 70.2  26 19991
3  19990603  NA  NA 38.9  31 26.9 53.3 49.4  36 19991
4  19990604  NA  NA 16.8  11 11.0 23.4 19.5  46 19991
5  19990605  NA  NA  9.0  18 13.6 36.4 32.5  56 19991
6  19990606  NA  NA 12.9  37 23.2 33.8 39.0  66 19991

579 2530  NA  16  12.9  16  11.3  48.1  15.6 30   12 2000   2
580 2531  NA  18  21.0  22  12.1  66.3  39.0 31   12 2000   2 

---

Aufgrund grosser Nachfrage: sunrise ADSL Null-Franken-Angebot verlängert bis Ende 
April 2004!

---

En raison de la forte demande: offre sunrise ADSL à CHF 0.- prolongée jusqu'à fin 
avril 2004!

---

Considerando la grande domanda, l'offerta sunrise ADSL a zero franchi sarà prolungata 
sino a fine aprile 2004!

---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] tapply

2004-03-18 Thread mike . campana
Dear all
I have a dataframe containing hourly data of 3 parameters. 
I would like to create a dataframe containg daily mean values of these 
parameters. Additionally I want to keep information about time of 
measurement ("year","month","day"). 
With the function tapply I can average  over a column of the dataframe. 
I can repeat the function 2 time and  merge the vectors. In this way I 
obtain my new dataframe (see below).If I want to add the column day, 
month and year I can repeat tapply other three time. This system works.  


Question: is there a function that average in a single step over the 3 
columns?

Thanks a lot for your answer!
Regards
Mike Campana   

 read the data
setwd("c:/R")
data <- NULL
data <- as.data.frame(read.table(file="Montreal.txt",header=F,skip=15))
colnames(data) 
<-c("year","month","day","hour","min","temp","press","ozone")
### create  mean value
temp_daily <- 
tapply(data$temp,data$year*1+data$month*100+data$day,FUN=mean)
press_daily <- 
tapply(data$press,data$year*1+data$month*100+data$day,FUN=mean)
ozone_daily <- 
tapply(data$ozone,data$year*1+data$month*100+data$day,FUN=mean)
### merge the data
newdata <- as.data.frame (cbind(temp_daily,temp_daily,temp_daily))

---



---



---



---



---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] creating a ps. file

2004-03-15 Thread mike . campana
Dear all

I wrote a routine. At the end of each cycle of the loop I would like to 
save the result (plot) in a postcriptfile.
Of course if I just use dev.print in the following way: 
dev.print(device=postcript, 'c:/Rfigures/plot_1.ps")
I overwrite my results with the second cycle of the loop. I suppose 
there is a way to define the file name so that several plots are 
created(plot_1,plot_2...).

Could you give me an advice? Thanks a lot

Best Regards 
Mike

---
sunrise ADSL
Gratis, einfach und schnell: sunrise ADSL, inkl. USB Modem und einmalige 
Aufschaltgebühr
http://internet.sunrise.ch/de/internet/int_ads.asp
---
sunrise ADSL
Gratuit, simple et rapide: sunrise ADSL, Modem USB inclus, aucun frais de mise en 
service
http://internet.sunrise.ch/fr/internet/int_ads.asp
---
sunrise ADSL
Gratis, pratico e veloce: sunrise ADSL, incl. Modem USB et tassa attivazione
http://internet.sunrise.ch/it/internet/int_ads.asp
---
sunrise ADSL
free, simple and fast: ADSL from sunrise,  incl. Modem USB and one- time activation fee
http://internet.sunrise.ch/de/internet/int_ads.asp
---

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] failure in simple calculation!!

2004-03-10 Thread Mike Campana
Hello

I have a dataframe, at least I think I created it by using:

DELTA <- as.data.frame(DELTA)

The dataframe has 2 columns made of numbers("data" and "delta")

If I use   DELTA$delta + 12
I get a sequence of NA  Warning message:
"+" not meaningful for factors in: Ops.factor(DELTA$deltatemp, 12)

What does this mean? Can you explain me please why I can not make this
simple calculation? And what can I do to the calculation?



further information:
mode(DELTA)
[1] "list"

DELTA$delta
.
[685] 6.04  7.84  8.01  8.43  6.6   6.33  8.42  8.86  10.25 8.2   9.32  9.77
[697] 7.9   6.42  5.95
474 Levels: -0.02 -0.13 -0.22 -0.46 -0.55 -1.26 -1.83 -1.86 -2.45 -3.2 ...
9.9
What does this last row mean?

Thanks a lot for the answer and on general for the help contaned in the
mailing list

Mike

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html