[R] Richiesta informazioni

2004-12-27 Thread Andrea Nesi
Sono Andrea Nesi, studente di Ingegneria dell’Università di Firenze. Sto 
facendo il tirocinio nell’Ufficio di Protezione Civile del Comune di Prato, 
dove sto cercando di effettuare una statistica sui dati idrometrici rilevati, 
relativi ad una serie storica di 12 anni (per ogni anno è in mio possesso un 
file txt di valori idrometrici delle letture ogni 15 minuti). Scopo del lavoro 
è quello di verificare le altezze relative ad una portata con tempo di ritorno 
biennale e quinquennale (che già esistono ma appaiono sottostimate) in 
ottemperanza della c.d. legge Bertolaso.  
Per questo lavoro ho deciso di utilizzare il software R, ma le mie conoscenze 
del programma sono, in pratica, nulle. E’ da un po’ di tempo che lavoro alla 
manipolazione dei dati in  mio possesso, ma anche utilizzando le dispense che 
ho trovato non riesco a giungere ad una soluzione definitiva del problema. Non 
avendo purtroppo nessuno che mi possa dare aiuto sul programma, ho pensato di 
chiedere a lei se può fornirmi dei riferimenti riguardo testi che possano 
essere utili al mio lavoro, o qualsiasi altra informazione (comandi, lavori già 
effettuati sul tema, etc.) attinente il mio studio in R, se lei ne conosce 
qualcuna.
Ringraziandola molto per la disponibilità, se mi può rispondere le sarei molto 
grato.

Andrea Nesi

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


RE: [R] vector

2004-12-27 Thread BXC (Bendix Carstensen)
If you have all your vectors in a list

vl - list( p1, p2, p3)

the the following should do the trick:

res - numeric(0)
for( i in 1:length(vl) ) res - c( res, vl[[i]] ) 

Bendix Carstensen
--
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 30 75 87 38
fax: +45 44 43 07 06
[EMAIL PROTECTED]
www.biostat.ku.dk/~bxc
--

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Frederic renaud
 Sent: Monday, December 27, 2004 1:57 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] vector
 
 
 Hi!
 Can you help me? I would like to make a vector from p 
 pre-determined vector. The parameter p can change. I've try 
 with ?c with unsuccess! An idee?
 
 Sorry for my english!
 Thanks
 Fred
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read 
 the posting guide! http://www.R-project.org/posting-guide.html


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


Re: [R] vector

2004-12-27 Thread Peter Dalgaard
BXC (Bendix Carstensen) [EMAIL PROTECTED] writes:

 If you have all your vectors in a list
 
 vl - list( p1, p2, p3)
 
 the the following should do the trick:
 
 res - numeric(0)
 for( i in 1:length(vl) ) res - c( res, vl[[i]] ) 

Or,

  do.call(c, vl)

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


Re: [R] vector

2004-12-27 Thread Göran Broström
On Mon, Dec 27, 2004 at 11:09:13AM +0100, BXC (Bendix Carstensen) wrote:
 If you have all your vectors in a list
 
 vl - list( p1, p2, p3)
 
 the the following should do the trick:
 
 res - numeric(0)
 for( i in 1:length(vl) ) res - c( res, vl[[i]] ) 

or, shorter, and faster I would guess,

res - unlist(v1)


 Bendix Carstensen
 --
 Bendix Carstensen
 Senior Statistician
 Steno Diabetes Center
 Niels Steensens Vej 2
 DK-2820 Gentofte
 Denmark
 tel: +45 44 43 87 38
 mob: +45 30 75 87 38
 fax: +45 44 43 07 06
 [EMAIL PROTECTED]
 www.biostat.ku.dk/~bxc
 --
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Frederic renaud
  Sent: Monday, December 27, 2004 1:57 AM
  To: r-help@stat.math.ethz.ch
  Subject: [R] vector
  
  
  Hi!
  Can you help me? I would like to make a vector from p 
  pre-determined vector. The parameter p can change. I've try 
  with ?c with unsuccess! An idee?
  
  Sorry for my english!
  Thanks
  Fred
  
  __
  R-help@stat.math.ethz.ch mailing list 
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read 
  the posting guide! http://www.R-project.org/posting-guide.html
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
 Göran Broströmtel: +46 90 786 5223
 Department of Statistics  fax: +46 90 786 6614
 Umeå University   http://www.stat.umu.se/egna/gb/
 SE-90187 Umeå, Sweden e-mail: [EMAIL PROTECTED]

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


Re: [R] list(0) to integer

2004-12-27 Thread Tobias Verbeke
On Mon, 27 Dec 2004 03:18:53 -0800 (PST)
Frederic renaud [EMAIL PROTECTED] wrote:

 Hello
 I've another question :-)
 I would like to transform a list to a integer.
 I must be sure that the number entered by the user is
 an integer! Thus, I've made :
 
 
 repeat{
   cat(Effectif des populations (integer):)
   n-scan(,n=1,what=list(0),quiet=TRUE)
 
   if (is.integer(n[[1]])==TRUE) break
   print(L'effectif des population doit etre un
 entier)
   }

if (!is.integer(unlist(n))) stop(L'effectif ...)

You don't need `== TRUE' (and I guess you meant `== FALSE')
An error action can be executed using stop(some error message).
`break' breaks out of the loop (ie goes to the first statement
after the loop), so the print statement cannot be executed.

Are you sure you need n to be a list ?

HTH,
Tobias

  That doesn't work of course but I've no idea to do
 this. How verify that n[[1]] is an integer an
 transform them as an integer (as.integer(n) doesn't
 work!) 

 Someone can help me? Thanks!
 Fred
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


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


[R] email lists

2004-12-27 Thread JC
I need to get this to everyone possible...how?

www.geocities.com/dollbottgreen

This is totally legit...don't want to break any laws.  Don't want to and can't 
wait weeks and months before search engines pick it up.
[[alternative HTML version deleted]]

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


[R] classification using logistic regression

2004-12-27 Thread Rajdeep Das
Dear Colleagues,

I would like to do classification using logistic regression. Which R package 
can I use? 

Also is there any package for feature selection for logistic regression based 
method?

Thanks a lot in advance.

Happy holidays.

Regards,

Raj
[[alternative HTML version deleted]]

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


Re: [R] how to ignore t.test error message

2004-12-27 Thread burak kutlu
Hi 
Although t.test does not give an error with
t.test(c(0, 0), c(0, 0));

if you try doing that with any number other than 0, 

 t.test(c(1,1),c(1,1))

(R gives the following error)


Error in t.test.default(c(1, 1), c(1, 1)) : 
data are essentially constant

The logic in insisting is that my data has different
columns, and I'd like to tolerate if in one of the
columns, the data fail to pass the t.test.

Thanks
Burak

--- Uwe Ligges [EMAIL PROTECTED]
wrote:

 burak kutlu wrote:
  Hello,
  I was wondering if there is a way to ignore the
 error
  message you get when some of the data means you
  compare are constant in some lines of your data
 frame.
 
 What does the error message say exactly?
 Do you have an example?
 
 Even with the degenerated case
t.test(c(0, 0), c(0, 0))
 I don't get any error message.
 
 
  I'd like to go ahead with t.test 
 
 See ?try
 
  and get the calculated p-values anyway in such a
 case.
 
 And what is the p-value in such a case?
 
 I guess I haven't understood the problem correctly,
 so please be more 
 specific!
 
 Uwe Ligges
 
 
  Thanks
  -burak
  
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 


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


RE: [R] how to ignore t.test error message

2004-12-27 Thread Liaw, Andy
See ?try (as Uwe said) or ?tryCatch.

Andy

 From: burak kutlu
 
 Hi 
 Although t.test does not give an error with
 t.test(c(0, 0), c(0, 0));
 
 if you try doing that with any number other than 0, 
 
  t.test(c(1,1),c(1,1))
 
 (R gives the following error)
 
 
 Error in t.test.default(c(1, 1), c(1, 1)) : 
   data are essentially constant
 
 The logic in insisting is that my data has different
 columns, and I'd like to tolerate if in one of the
 columns, the data fail to pass the t.test.
 
 Thanks
 Burak
 
 --- Uwe Ligges [EMAIL PROTECTED]
 wrote:
 
  burak kutlu wrote:
   Hello,
   I was wondering if there is a way to ignore the
  error
   message you get when some of the data means you
   compare are constant in some lines of your data
  frame.
  
  What does the error message say exactly?
  Do you have an example?
  
  Even with the degenerated case
 t.test(c(0, 0), c(0, 0))
  I don't get any error message.
  
  
   I'd like to go ahead with t.test 
  
  See ?try
  
   and get the calculated p-values anyway in such a
  case.
  
  And what is the p-value in such a case?
  
  I guess I haven't understood the problem correctly,
  so please be more 
  specific!
  
  Uwe Ligges
  
  
   Thanks
   -burak
   
   __
   R-help@stat.math.ethz.ch mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html
  
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


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


Re: [R] classification using logistic regression

2004-12-27 Thread Kevin Wang
Hi,

On Mon, 27 Dec 2004, Rajdeep Das wrote:

 I would like to do classification using logistic regression. Which R package 
 can I use?

Have you tried glm() function?

 Also is there any package for feature selection for logistic regression based 
 method?

Do you mean model selection methods like forward selection?  If so, try
step()

HTH,

Kevin


Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

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


[R] RandomFields: Controling seed with GaussRF

2004-12-27 Thread Ernesto Jardim
Hi,

I'm using RF to simulate a correlated variable with GaussRF

set.seed=1
GaussRF(sim.kfinegrid, grid=F, model=exponential,
param=c(0,0.5,0,0.2))

However when I simulate again using the same random seed I get different
results.

 set.seed=1 
 summary(GaussRF(sim.kfinegrid, grid=F, model=exponential,
param=c(0,0.5,0,0.2)))
   Min. 1st Qu.  MedianMean 3rd Qu.Max.
-2.3110 -0.9726 -0.3831 -0.3048  0.2378  2.0100
 set.seed=1 
 summary(GaussRF(sim.kfinegrid, grid=F, model=exponential,
param=c(0,0.5,0,0.2)))
Min.  1st Qu.   Median Mean  3rd Qu. Max.
-1.83400 -0.33260  0.10340  0.06004  0.47310  1.68300

How can I control the seed with GaussRF ?

Regards

EJ

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


[R] random numbers within a given range

2004-12-27 Thread Rajdeep Das
Dear Colleagues,

Is there a way to get random numbers within a given range?

Regards and thanks in advance,

Raj
[[alternative HTML version deleted]]

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


Re: [R] RandomFields: Controling seed with GaussRF

2004-12-27 Thread Peter Dalgaard
Ernesto Jardim [EMAIL PROTECTED] writes:

 set.seed=1
 GaussRF(sim.kfinegrid, grid=F, model=exponential,
 param=c(0,0.5,0,0.2))
 
 However when I simulate again using the same random seed I get different
 results.
 
  set.seed=1 
  summary(GaussRF(sim.kfinegrid, grid=F, model=exponential,

 How can I control the seed with GaussRF ?

Surely not by assigning values to set.seed - it is a function! 

Look at ?set.seed and pay attention to the Usage: section.


-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


Re: [R] RandomFields: Controling seed with GaussRF

2004-12-27 Thread Ernesto Jardim
On Tue, 2004-12-28 at 00:30, Peter Dalgaard wrote:
 Ernesto Jardim [EMAIL PROTECTED] writes:
 
  set.seed=1
  GaussRF(sim.kfinegrid, grid=F, model=exponential,
  param=c(0,0.5,0,0.2))
  
  However when I simulate again using the same random seed I get different
  results.
  
   set.seed=1 
   summary(GaussRF(sim.kfinegrid, grid=F, model=exponential,
 
  How can I control the seed with GaussRF ?
 
 Surely not by assigning values to set.seed - it is a function! 
 
 Look at ?set.seed and pay attention to the Usage: section.
 

You're correct ! Sorry. It's a problem of the interface between the
computer and the chair :)

EJ

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


Re: [R] random numbers within a given range

2004-12-27 Thread Peter Dalgaard
Rajdeep Das [EMAIL PROTECTED] writes:

 Is there a way to get random numbers within a given range?

Yes. What distribution? If uniform, see help(Uniform).

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


[R] plots

2004-12-27 Thread duraikannan sundaramoorthi
Is there a way to save plots and use in a word
document. Thanks for your help in advance.
durai



__ 

Send holiday email and support a worthy cause. Do good.

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


RE: [R] plots

2004-12-27 Thread Charles Annis, P.E.
Yes.  Assuming you are using R in Windows, right click on the plot, and
choose Save as metafile, or more expeditiously, Copy as metafile, and then
paste directly into your WORD document.



Charles Annis, P.E.
 
[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of duraikannan
sundaramoorthi
Sent: Monday, December 27, 2004 8:00 PM
To: r-help@stat.math.ethz.ch
Subject: [R] plots

Is there a way to save plots and use in a word
document. Thanks for your help in advance.
durai



__ 

Send holiday email and support a worthy cause. Do good.

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

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


Re: [R] Question about creating error bars

2004-12-27 Thread Dan Bolser

On Thu, 23 Dec 2004, Dan Bolser wrote:


I have data that looks (very roughly) like this...

Declarative: 
Several 'groups', each group with a very variable number of
data points associated.


Procedural:
v.1 - c(rep(50,1), rep(5,5), rep(2,10))  # Set up 
v.2 - c('a','b','c','d','e','f','g','h', # the
 'i','j','k','l','m','n','o','p') # groups
v.3 - rep(v.2,v.1)   # here.
v.4 - rnorm(length(v.3)) # Simulate data.
v.5 - tapply(v.4,v.3,mean)   # My analysis.

plot(v.5)

As the number of data points in a group gets smaller, so the variance of
the mean value for that group goes up. I would like to bootstrap some
error bars to show roughly how variable the value for each group is. Here
we have a normal distribution, but mostly my data is binary (i.e. each
group has a different number of (nearly) binary observations). The groups
are ordered, and I want to see any trend in my data accross the groups.

Dan.

Nothing I can do to help pal, sorry.



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


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


RE: [R] plots

2004-12-27 Thread BXC (Bendix Carstensen)
For exact contol of height and width, you may want to have a look at:

?win.metafile

Bendix Carstensen
--
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 30 75 87 38
fax: +45 44 43 07 06
[EMAIL PROTECTED]
www.biostat.ku.dk/~bxc
--



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 duraikannan sundaramoorthi
 Sent: Tuesday, December 28, 2004 2:00 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] plots
 
 
 Is there a way to save plots and use in a word
 document. Thanks for your help in advance.
 durai
 
 
   
 __ 
 
 Send holiday email and support a worthy cause. Do good.
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read 
 the posting guide! http://www.R-project.org/posting-guide.html


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