Re: [R] data from graph [SEC=UNCLASSIFIED]

2007-06-12 Thread Augusto.Sanabria
Jam, If you use fpot the GPD of package evd to calculate your return periods, you can generate the table you want by using the following commands: RP - c(10,100,500,1000) #return periods rf - your clean vector of rainfall data thres - the threshold for your data nopy - number of observations

[R] Extracting a subset from a dataframe

2007-02-22 Thread Augusto.Sanabria
Good day everyone, Can anyone suggest an effective method to solve the following problem: I have 2 dataframes D1 and D2 as follows: D1: dates ws wc pwc 2005-10-19:12:00 10.8 80 81 2005-10-20:12:00 12.3 5 15 2005-10-21:15:00 12.3 3 15 2005-10-22:15:00 11.3 13 95

[R] Software for kriging

2007-01-03 Thread Augusto.Sanabria
Dear R-list members, I wish everyone a happy and successful 2007! Does anyone know of R-based software for optimal spatial prediction (kriging)? We are working on a seismic event characterisation technique and need to do some kriging. Any help would be greatly appreciated. Augusto

Re: [R] ML fit of gamma distribution to grouped data

2006-11-29 Thread Augusto.Sanabria
Thomas, The Gamma distr. can be fitted via ML using: Library(MASS) GF - fitdistr(given_data,gamma) sh - GF$estimate[1] ra - GF$estimate[2] Fitting via Moments, m: var - m[2] - m[1]*m[1] sh - m[1]*m[1]/var sc - m[1]/var ra - 1/sc G_pdf - dgamma(breaks,shape=sh,rate=ra,scale=1/ra) Hope it

[R] Empirical CDF

2006-06-29 Thread Augusto.Sanabria
Good day everyone, I want to assess the error when fitting a Gram-Charlier CDF to some data 'ws', that is, I want to calculate: Err = |ecdf(ws) - GCh_ser(ws)| The problem is, I cannot get the F(x) values from the ecdf. 'Summary(ecdf())' returns some of the x-axis values, but how do you

Re: [R] Off topic --- help in locating a source.

2006-05-18 Thread Augusto.Sanabria
Rolf, The formula can be found in section 1.44-1.45 'Trigonometric (Fourier) series' of the famous book: Gradshteyn I.S and Ryzhik I.M. Tables of Integrals, Series, and Products. Academic Press Inc. 4th printing. London 1983. Which is a translation of the Russian book from 1963. Hope it helps,

Re: [R] how to evaluate logistic model fit the data or not?

2006-05-03 Thread Augusto.Sanabria
Youme, The question has been asked before, you can have a look at the R archives for that issue using: RSiteSearch(logistic goodness of fit). Last time I did this, the command found some 53 entries! Hope it helps, Augusto Augusto Sanabria. MSc,

Re: [R] head function

2006-04-02 Thread Augusto.Sanabria
The functions 'page()', 'head()' and 'tail()' let you look at a dataframe or array without actually opening the file. They are equivalent to 'less', 'more' and 'tail' in UNIX. Hope it helps, Augusto -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of stat

Re: [R] [Q] How to make a multi-line title with expression()

2006-03-28 Thread Augusto.Sanabria
Young-Jin, The expression tit1 - Max. Daily Wind Speed \nSydney Airport hist(ws,xlab='Wind Speed',ylab='Freq.,main=tit1) works fine in my case. Try using your title between one set of quotes. Hope it helps, Augusto Augusto Sanabria. MSc, PhD.

Re: [R] newbie question: grouping rows

2006-03-09 Thread Augusto.Sanabria
Matt, Have a look at subset specially the examples at the end. I use it a lot. Hope it helps, Augusto Augusto Sanabria. MSc, PhD. Mathematical Modeller Risk Research Group Geospatial Earth Monitoring Division Geoscience Australia (www.ga.gov.au)

Re: [R] Date and Times a la Dalgaard

2006-03-09 Thread Augusto.Sanabria
To manipulate date/time I use packages zoo and survival. Hope it helps, Augusto Augusto Sanabria. MSc, PhD. Mathematical Modeller Risk Research Group Geospatial Earth Monitoring Division Geoscience Australia (www.ga.gov.au) Cnr. Jerrabomberra Av.

Re: [R] How do I tell it which directory to use?

2006-02-21 Thread Augusto.Sanabria
Tom, You can define your working directory by using: setwd(C:\Documents and Settings\Tom\My Documents\qpaper7\R Project Started 19 Dec 05) check that your file is there: list.files() and then use: source(myFile.txt) the machine should load myFile You can go to another directory:

[R] Gram-Charlier series

2006-02-21 Thread Augusto.Sanabria
Good day everyone, I want to use the Gram-Charlier series expansion to model some data. To do that, I need functions to: 1) Calculate 'n' moments from given data 2) Transform 'n' moments to 'n' central moments, or 3) Transform 'n' moments to 'n' cumulants 4) Calculate a number of Hermite

Re: [R] 15-min mean values

2006-02-07 Thread Augusto.Sanabria
Thanks a lot to Gabor for his help with the solution of this problem. The solution using zoo(aggregate) is easy to implement efficient. I have calculated the 15min mean values of a 1min wind speed file containing 2.9 million records x 16 columns (size 179 MB) in just 144 seconds (R-2.1.1

[R] 15-min mean values

2006-02-01 Thread Augusto.Sanabria
Good day everyone, I want to use zoo(aggregate) to calculate 15-min mean values from a wind dataset which has 1-min values. The data I have looks like this: vector VDATE vector WS 1 1998-10-22:02:11 12.5 2 1998-10-22:02:12 10.1 3 1998-10-22:02:13

[R] Calculation of daily max

2006-01-17 Thread Augusto.Sanabria
Thank you Gabor, the 'aggregate' function operating on zoo(WS) does the job beautifully! 'zoo' has a lot of other goodies too, great package (thanks for that too). Cheers, Augusto Augusto Sanabria. MSc, PhD. Mathematical Modeller Risk Research

[R] Calculation of daily max

2006-01-16 Thread Augusto.Sanabria
Good day everyone. I have a large dataset of 1 min wind speeds covering 5 years. How can I make an array of maximum daily values? The vectors I have are: 'VDATE' with dates in format '%Y-%m-%d' (like '1992-10-28') and 'WS' with wind speed data (same number of elements as VDATE). I want an