[R] taylor.diagram from plotrix package

2012-04-10 Thread anaraster
Is there a way to access the numeric results (standard deviation and correlation) obtained with the taylor.diagram ? -- View this message in context: http://r.789695.n4.nabble.com/taylor-diagram-from-plotrix-package-tp4545669p4545669.html Sent from the R help mailing list archive at Nabble.com.

[R] Time Series - Trend Line

2012-02-20 Thread anaraster
How can I had a trend line to my plot? My data looks like this: Date=seq(as.Date(1910/1/1), as.Date(1920/1/1), day) Values=runif(length(Date), min=-5, max=5) dataset=data.frame(Values,as.Date(Date)) I just want to add a linear trend line to this plot(dataset,col=rgb(1,0,0,1/8),cex=0.5,pch=19)

[R] sample points - sp package

2012-02-09 Thread anaraster
When I make a sample in sp, for example a random samping of 5 points in dataset1: sample.dataset1=spsample(dataset1, n = 5, random) I have a sp object for the selected sampling... My question is : How can I extract from dataset2 the points data for the coordinates(sample.dataset1) ? The

[R] R2WinBUGS error message

2012-02-07 Thread anaraster
Hi! I am new to BUGS and running BUGS from R. I am trying to run a regression model from R, however I have this error message: Error in file(con, wb) : cannot open the connection In addition: Warning messages: 1: In file.create(to[okay]) : cannot create file 'c:/Program

[R] Load Libraries from list

2011-12-15 Thread anaraster
Hi How can I load libraries from a list containing the library names? Something like this ListOfLibraries=c(foreign,survival) for (in in 1:length(ListOfLibraries)){library(as.name(ListOfLibraries[i]))} I already tried this with no results. Any help appreciated. Thanks -- View this

[R] Create a function with multiple object as an output

2011-11-15 Thread anaraster
I've seen some questions regarding the output of multiple objects from a function, however the suggestions all end up suggesting the use of return(list(result1=result1, result2=result2 , result3=result3)). How can I return multiple objects that are 2 big to be added to a list? -- View this

[R] random selection of elements from a matrix

2011-07-14 Thread anaraster
Hi! How can I make a random selection of n row elements from a matrix. The matrix was previously created from a table with different rows and columns. However I want to keep all the information (columns), I just want to reduce the number of observations. Thanks, Ana -- View this message in

Re: [R] random selection of elements from a matrix

2011-07-14 Thread anaraster
ups...already found the solution matrix2 - matrix1[sample(samplenumber,replace=F),] -- View this message in context: http://r.789695.n4.nabble.com/random-selection-of-elements-from-a-matrix-tp3668574p3668594.html Sent from the R help mailing list archive at Nabble.com.