[R] how to simulate brown, white and pink noise time series

2009-12-11 Thread Enrico R. Crema
Dear List, Is it possible to simulate a time-series in R based on 1/f noise? Many Thanks Enrico Crema --- Enrico R. Crema PhD Candidate Institute of Archaeology, UCL AHRC Centre for the Evolution of Cultural Diversity, UCL Centre for Advanced Spatial Analysis

[R] selecting rows based on multiple criteria

2013-05-01 Thread Enrico R. Crema
Dear List, I am struggling with the following problem. Suppose I have the following data.frame: coord<-expand.grid(x=1:10,y=1:10) and I want to extract the row numbers of those matching the criteria defined by the following data.frame: choice<-data.frame(x=c(2,1,2),y=c(1,2,2)) the result s

Re: [R] selecting rows based on multiple criteria

2013-05-01 Thread Enrico R. Crema
Cool! Thanks! Enrico On 1 May 2013, at 14:09, arun wrote: > match(interaction(choice),interaction(coord)) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

[R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
Dear List, I am using the cpt.mean() function in the "changepoint" package to detect change-points in my data and noticed that when there are no visible changes, the function returns the last point as the point of change. The following script can illustrate this: table(unlist(replicate(500,cpt

Re: [R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
taining the changepoint locations for the penalty > supplied. This always ends with n. > > i.e. as your series is of length 50, the last value returned in cpts > will always be 50. > > Martyn > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bou

Re: [R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
Although, I got the similar results using AMOC, which should: cpt The most probable location of a changepoint if a change was identified or NA if no changepoint. Enrico --- Dr Enrico R. Crema ERC EUROEVOL Research Associate UCL Institute of Archaeology

[R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Enrico R. Crema
Dear List, I've been running a numerical simulation and I found this odd error in my code where the which command could not identify which rows of a column of data.frame were corresponding to the value 0.3. There are 7 unique values in this column (0.01,0.05,0.1,0.2,0.3,0.4,0.5), and this does

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Enrico R. Crema
Well...thanks to everybody for suggestions and reading...I guess I have to study more! Enrico On 28 Oct 2010, at 11:48, Rainer M Krug wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 28/10/10 12:23, Enrico R. Crema wrote: >> Dear List, >> >>

[R] Time Series of Histograms

2010-12-19 Thread Enrico R. Crema
Dear List, I have a set of distributions recorded at an equal interval of time and I would like to plot them as series of horizontal histograms (with the x-axis representing time, and y-axis representing the bins) since the distribution shifts from unimodal to multimodal in several occasions.

Re: [R] Time Series of Histograms

2010-12-19 Thread Enrico R. Crema
ight be. A reproducible example with data and code > would undoubtedly elicit more useful responses. > > HTH, > Dennis > > > On Sun, Dec 19, 2010 at 4:03 PM, Enrico R. Crema wrote: > Dear List, > > I have a set of distributions recorded at an equal interval of ti

Re: [R] Time Series of Histograms

2010-12-19 Thread Enrico R. Crema
> > On Sun, Dec 19, 2010 at 7:03 PM, Enrico R. Crema <> wrote: > Dear List, > > I have a set of distributions recorded at an equal interval of time and I > would like to plot them as series of horizontal histograms (with the x-axis > representing time, and y-axis re

[R] obtain the probability distribution of the slope coefficient

2011-04-14 Thread Enrico R. Crema
Dear All, #I have the following data: primate<-log(c(100,95,90,85,80,75,60,40,20,10)) rank<-log(1:10) #from which I can compute a linear regression, and obtain the confidence interval for the slope coefficient as follows: res<-lm(primate~rank) confint(res,level=0.9)[2,] #Now, what I would like

[R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread Enrico R. Crema
#x27;t get access to it! I tried to coerce the SpatialPolygon into a data.frame but it doesn't work. Want I want is just a list of x and y coordinates of my polygon vertices without doing the workflow in GRASS!!! Thanks very much! Enrico Crema ----------- Enri