[R] Number Regular Expressions

2009-03-03 Thread Bob Roberts
Hi, I'm trying to write a regular expression that captures numbers in the form 9,007,653,372,262.48 but does not capture dates in the form 09/30/2005 I have tried numerous expressions, but they all seem to return the dates as well. Thanks. [[alternative HTML version deleted]]

Re: [R] How to generate fake population (ie. not sample) data?

2009-03-03 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of CB > Sent: Tuesday, March 03, 2009 10:05 PM > To: David Winsemius > Cc: r-help@r-project.org > Subject: Re: [R] How to generate fake population (ie. not > sample) data? > > My u

Re: [R] Multivariate GARCH Package

2009-03-03 Thread andrew
in the seond link on the pdf you have cited is http://www.vsthost.com/vstDocs/mgarchBEKK/ HTH. On Mar 4, 1:52 pm, Mohammad Sabr wrote: > Good day everyone, >   > I tried to find a multivariate GARCH package and failed to find one. Although > when I searched R I found the following link which d

Re: [R] flaw in CRAN package "wavelets": Daubechies "d8" not recognized by function wt.filter

2009-03-03 Thread David Winsemius
You can look at the code yourself. The d8 filter appears to have a deletion mutation making it "different" than the other d-series and the fix looks feasible for testing: d6.filter <- function(mod = F) { class <- "Daubechies" name <- "d6" L <- as.integer(6)

[R] Selecting one row or multiple rows per ID

2009-03-03 Thread Vedula, Satyanarayana
Hi, Could someone help with coding this in R? I need to select one row per patient i in clinic j. The data is organized similar to that shown below. Two columns - patient i in column j identify each unique patient. There are two columns on outcome. Some patients have multiple rows with each ro

[R] R CMD check detects parse error, but in which file?

2009-03-03 Thread Matthieu Stigler
Hello I looked on the archives but did not find answer for that... Running R CMD check for a package, i get an error: Error in parse(n = -1, file = file) : unexpected symbol at 3341: } But how can I find which file is guilty? What is this 3342 referring to? Finally the solution I found is to

Re: [R] How to generate fake population (ie. not sample) data?

2009-03-03 Thread CB
My understanding is that rnorm(n, x, s) will give me an n-sized sample from an (x, s) normal distribution. So the vector returned will have a mean from the sampling distribution of the mean. But what I want is a set of n numbers literally with a mean of x and sd of s. I am at the very beginning of

Re: [R] sm.density.compare

2009-03-03 Thread Mark Difford
Hi James, >> Error in if (from == to) rep.int(from, length.out) else as.vector(c(from, >> : >> missing value where TRUE/FALSE needed ... >> ... The only difference with my data is that I have some missing values >> that show as NA This is precisely the problem. ## Show the error [message] y <

Re: [R] How to generate fake population (ie. not sample) data?

2009-03-03 Thread David Winsemius
In what ways is rnorm not a satisfactory answer? -- David Winsemius On Mar 3, 2009, at 9:33 PM, CB wrote: This seems like it should be obvious, but searches I've tried all come up with rnorm etc. Is there a way of generating normally-distributed 'population' data with known parameters? Cheer

[R] flaw in CRAN package "wavelets": Daubechies "d8" not recognized by function wt.filter

2009-03-03 Thread mauede
> wt.filter("d8") HOW COME Error in validObject(.Object) : invalid class "wt.filter" object: invalid object for slot "transform" in class "wt.filter": got class "function", should be or extend class "character" > wt.filter("d10")

Re: [R] Inference for R Spam

2009-03-03 Thread Rolf Turner
On 4/03/2009, at 11:50 AM, Michael A. Miller wrote: "Dieter" == Dieter Menne writes: And, since my son asked me and I am basketball ignorant: Why are basketball scores mostly much too close to equality? The arguments (loose power when leading) might suggest that 2:0 might not be significant

[R] Package for determining correlation for mixed "Level of Measurement"

2009-03-03 Thread Jason Rupert
My data set has a mixed level of measurement: Nominal scale - location (city) Ordinal scale - temperature (low, medium, high) Interval scale - age & value Just curious if there is an R package available that will handle the mixed "Level of Measurement". Looking to do graphical presentation of th

[R] Multivariate GARCH Package

2009-03-03 Thread Mohammad Sabr
Good day everyone,   I tried to find a multivariate GARCH package and failed to find one. Although when I searched R I found the following link which describes the package:   http://www.r-project.org/user-2006/Slides/Schmidbauer+Tunalioglu.pdf   can any one help me with this issue.   Thank you in

[R] How to generate fake population (ie. not sample) data?

2009-03-03 Thread CB
This seems like it should be obvious, but searches I've tried all come up with rnorm etc. Is there a way of generating normally-distributed 'population' data with known parameters? Cheers, CB. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

[R] problems with exporting a chart

2009-03-03 Thread Elena Wilson
Dear R helpers, I have a problem with exporting a chart (to any format). The graphic device becomes inactive and I get the 'Error: invalid graphics state' error message. I searched the help, web and FAQ but couldn't find the solution. This is my code: I chart a histogram for differences in R2

Re: [R] modifying a built in function from the stats package (fixing arima)

2009-03-03 Thread Kjetil Halvorsen
adding to the points above: 3) after downloading the source package (stats) containung arima, rename it (my.arima) and then do the changes. Kjetil On Tue, Mar 3, 2009 at 5:29 PM, Carlos J. Gil Bellosta wrote: > Hello, > > I do not think that is the way to go. If you believe that your alg

Re: [R] Unrealistic dispersion parameter for quasibinomial

2009-03-03 Thread Ben Bolker
Menelaos Stavrinides gmail.com> writes: > > I am running a binomial glm with response variable the no of mites of two > species y->cbind(mitea,miteb) against two continuous variables (temperature > and predatory mites) - see below. My model shows overdispersion as the > residual deviance is 48.8

Re: [R] reading scanned graphs

2009-03-03 Thread Ben Bolker
Frank E Harrell Jr vanderbilt.edu> writes: > > Remko Duursma wrote: > > Check out > > > > http://www.datathief.org/ > > > > > > Remko > > For Linux I recommend the engauge-digitizer package. > Frank > I like g3data , by Jonas Frantz (on Ubuntu: apt-get install g3data ) Ben Bolker ___

Re: [R] monotonic GAM with more than one term

2009-03-03 Thread Benjamin Tyner
Simon, Many thanks, that is a very helpful example. It seems quite general in that it also works under bs="cr" as well as with fx=TRUE. -Ben There's an example at the end of the pcls help file in version 1.5-0 --- just submitted to CRAN. best, Simon __

Re: [R] periodogram smoothing question

2009-03-03 Thread stephen sefick
kernel("modified.daniell", 7) this smoother is convolved with the data in other words it is multiplying the values by a fraction "smoothing" the data. My thinking may be wrong, but this is how I understand it. On Tue, Mar 3, 2009 at 6:28 PM, wrote: > Hello - > > I am currently simulating bivar

Re: [R] detect outliers and high levarage points

2009-03-03 Thread stephen sefick
if you plot(model) one of the graphs should be leverage. I imagine if you str(model) you can probably pull out the leverage part of the model and just plot that. Stephen Sefick On Tue, Mar 3, 2009 at 5:36 PM, choonhong ang wrote: > Hi friends, > > How to detect outliers and high leverage poin

Re: [R] portable R editor

2009-03-03 Thread Gene Leynes
After (too much) research, I've settled on SciTE, which is an open source editor. I really wanted emacs to work, but the crazy keyboard shortcuts were killing me. For SciTE to work, it takes a little work. First open the global options file and change "#import r" to "import r" to enable R syntax

[R] score test statistic in logistic regression

2009-03-03 Thread Greg Dropkin
re post from bkelcey at umich.edu bkelcey at umich.edu Wed Feb 27 15:09:48 CET 2008 If the response y is given as the proportion of successes out of n trials, and y, n, p, x, and z are vectors of length M, and the model is logit(p) = b0 + b1*x + b2*z then for the score test for the null hypothesi

Re: [R] reading scanned graphs

2009-03-03 Thread Frank E Harrell Jr
Remko Duursma wrote: Check out http://www.datathief.org/ Remko For Linux I recommend the engauge-digitizer package. Frank - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus

[R] periodogram smoothing question

2009-03-03 Thread otunno
Hello - I am currently simulating bivariate AR(1) time series data and have the following line in my code: Px=spec.pgram(ts.union(X,XX),spans=c(?,?)) The spans option is where I enter in the vector containing the Daniell smoother numbers, but I don't know what a Daniell smoother is (hence the qu

Re: [R] reading scanned graphs

2009-03-03 Thread Remko Duursma
Check out http://www.datathief.org/ Remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macquarie University North Ryde NSW 2109

[R] reading scanned graphs

2009-03-03 Thread Aad Termorshuizen
I have a graph (a curve with a x- and y-axis) on paper. (The device from which I receive this is not able to output the data digitally unfortunately.) Is there a procedure by which I can scan the graph, save it into, e.g., a bitmap file and make it R to read this file into x a

Re: [R] Inference for R Spam

2009-03-03 Thread Michael A. Miller
> "Dieter" == Dieter Menne writes: > And, since my son asked me and I am basketball ignorant: > Why are basketball scores mostly much too close to > equality? The arguments (loose power when leading) might > suggest that 2:0 might not be significant, but relevant. I > tend

[R] clust with "hclustWard"

2009-03-03 Thread Anirudh Kondaveeti
Hello everyone I tried to use clust function using "hclustWard" clustering method The distance mesaured I have used is "rf" The data used is in the form of data frame (it is not a distance matrix) - sd.df The piece of code I have used is: c1 <- clust(sd.df,k=6,method="hclustWard",distMethod="rf")

[R] detect outliers and high levarage points

2009-03-03 Thread choonhong ang
Hi friends, How to detect outliers and high leverage points for GLM ? Could I use plot(model) (i) "Residuals vs Fitted" graph to detect the outliers ? (ii) "Residuals vs Leverage" graph to detect the high leverage points ? And then remove those points from the data and re-run the model ?

Re: [R] portable R editor

2009-03-03 Thread Erich Neuwirth
EditPad Pro is commercial, which makes it a nonchoice for recommending it to my students. I recently switched from tinn-R to Notepad++ with NppToR and am quite happy with it. tinn-R is quite good, but possibly the project is getting too ambitous now. It needs quite some fiddling with Rprofile.site

Re: [R] scatter plot question

2009-03-03 Thread Mark Lyman
Dipankar Basu gmail.com> writes: > > Hi R Users, > > I have a dataframe like this: > > id x rho > A 1 0.1 > B 20 0.5 > C 2 0.9 > ... > > I want to do a scatter plot of "x" versus "rho" but for each point on the > scatter plot I want the corresponding entry for "id" instead of point

Re: [R] par and a substitute for mtext to write one time a title per page

2009-03-03 Thread Aldi Kraja
Hmm, Reading some responses in the archives on mfg, the first one was simple the mfg does not control the pages. After removing mfg=c(2,1), and leaving in the program only mfrow=(4,1) although I am printing one after the other in a loop, pages are printed and do not overwrite the same page.

Re: [R] repeated measures anova, sphericity, epsilon, etc

2009-03-03 Thread Paul Gribble
> > Have a look at > > http://cran.r-project.org/doc/Rnews/Rnews_2007-2.pdf > Wow. I think my students would keel over. Anova() from the car package looks promising - I will check it out. Thanks On Tue, Mar 3, 2009 at 4:00 PM, Peter Dalgaard wrote: > Paul Gribble wrote: > >> I have 3 question

Re: [R] spatial markov chain methods

2009-03-03 Thread Torsten Lange
Rolf Turner schrieb: On 4/03/2009, at 4:36 AM, Torsten Lange wrote: Hello, can any one point me to R-packages (if available) which include spatial Markov Chain methods? My second question is more general but hopefully not OT: Currently we are using the software TPROGS, which let people simula

[R] sm.density.compare

2009-03-03 Thread James Lenihan
I am running the sm.density.compare function amd I am getting the following error:   my code is  > sm.density.compare(LBSTRESN,COHORT,xlab="Units = umol/L"subset = LBTEST=="Creatinine")   Error in if (from == to) rep.int(from, length.out) else as.vector(c(from,  :   missing value where TRUE/FALS

Re: [R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread David Winsemius
That is what I thought to be the critical paragraph. The variance is assumed to be = 1 when you use family="gaussian" rather than the default of family="qgauss". You give it a vector, 1000*rnorm(100), that ranges widely and a small (relative) variance is assumed and so the confidence interv

Re: [R] repeated measures anova, sphericity, epsilon, etc

2009-03-03 Thread Peter Dalgaard
Paul Gribble wrote: I have 3 questions (below). Background: I am teaching an introductory statistics course in which we are covering (among other things) repeated measures anova. This time around teaching it, we are using R for all of our computations. We are starting by covering the univariate

Re: [R] ggplot2: annotated horizontal lines

2009-03-03 Thread baptiste auguie
I see your problem (although label should be outside the mapping in your case, i think). A possible workaround is to provide some dummy data, as the default NULL doesn't seem to work, qplot( wt, mpg, data=mtcars ) + geom_text(data=data.frame(x=0,y=0),mapping=aes(x=1,y=0),label="test") I'

Re: [R] xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Rolf Turner
On 4/03/2009, at 2:38 AM, Marc Schwartz wrote: You perhaps missed the key point in Uwe's response, which is that the package is only available under Windows, as it depends upon Windows specific functionality (MS Office API via a third party library which is available for Windows only) to nat

Re: [R] xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Hans-Peter Suter
2009/3/2 Prof Brian Ripley : > The CRAN Windows ones. It is a windows-only package, see > http://cran.r-project.org/web/packages/xlsReadWrite/index.html > (incidentally to you: it seems no longer maintained and does not build under > R-devel on Windows, see > http://cran.r-project.org/bin/windows/

Re: [R] spatial markov chain methods

2009-03-03 Thread Rolf Turner
On 4/03/2009, at 4:36 AM, Torsten Lange wrote: Hello, can any one point me to R-packages (if available) which include spatial Markov Chain methods? My second question is more general but hopefully not OT: Currently we are using the software TPROGS, which let people simulate property distrib

Re: [R] modifying a built in function from the stats package (fixing arima)

2009-03-03 Thread Carlos J. Gil Bellosta
Hello, I do not think that is the way to go. If you believe that your algorithm is better than the existing one, talk to the author of the package and discuss the improvement. The whole community will benefit. If you want to tune the existing function and tailor it to your needs, you have several

Re: [R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread Suresh Krishna
David Winsemis wrote: I think you should read (or re-read) the locfit help page and *also* the links from that page to the help pages for locfit.raw and rv. I would have thought that since family= is not an argument to locfit per se, but rather is documented in locfit.raw that you have ye

[R] repeated measures anova, sphericity, epsilon, etc

2009-03-03 Thread Paul Gribble
I have 3 questions (below). Background: I am teaching an introductory statistics course in which we are covering (among other things) repeated measures anova. This time around teaching it, we are using R for all of our computations. We are starting by covering the univariate approach to repeated m

[R] par and a substitute for mtext to write one time a title per page

2009-03-03 Thread Aldi Kraja
RE: par and a substitute for mtext to write one time a title per page Hi, Q1. Is there way I can set mfg =c(2,1) which for me could have meant 2 pages and no split on the columns per page; and mfrow =c(4,1) which for me it means 4 graphs per page in

Re: [R] ggplot2: annotated horizontal lines

2009-03-03 Thread Dave Murray-Rust
On 3 Mar 2009, at 18:41, baptiste auguie wrote: What's wrong with geom_text? my.value = 0.65 qplot(1,1)+geom_hline(v=0)+ geom_text(mapping=aes(x=1,y=0),label=paste(my.value),vjust=-1) Well, firstly I hadn't thought to use it. Ooops. Secondly, I can't make it just do a single valu

Re: [R] save the layout using igraph

2009-03-03 Thread Gábor Csárdi
Shukai, the layout functions return a matrix that you can supply as the 'layout' argument of the plotting functions, e.g. g1 <- erdos.renyi.game(50,2/50) lay <- layout.fruchterman.reingold(g1) g2 <- delete.edges(g1, sample(ecount(g1), 30)-1) plot(g1, layout=lay, vertex.size=10) plot(g2, layout=la

Re: [R] Inefficiency of SAS Programming

2009-03-03 Thread Rolf Turner
On 3/03/2009, at 5:58 PM, Ajay ohri wrote: for an " inefficient " language , it sure has dominated the predictive analytics world for 3 plus decades. I referred once to intellectual jealousy between newton and liebnitz. i am going ahead and creating the R package called "Anne". It basically i

Re: [R] rgl persp3d bounding box color problem.

2009-03-03 Thread chaogai
rgl_0.83-3 did not help Duncan Murdoch wrote: > On 3/2/2009 2:48 PM, chaogai wrote: >> Oops, sorry >> >> R version 2.8.1 (2008-12-22) >> i686-pc-linux-gnu >> >> locale: >> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=e

[R] save the layout using igraph

2009-03-03 Thread kevinchang
Hi R users, I am using built-in functions in igraph package to draw networks . I need to compare several network with exactly the same structure but with edge hightlighted differently. I am wondering if there is a way to save the layout so that every graph will look the same as each other excep

Re: [R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread Liaw, Andy
From: Suresh Krishna [...] > ps. The package maintainer, Catherine Loader, is no longer > reachable at > her Auckland address. For the record, I'm the package maintainer for locfit, and I have not exactly vanished (yet). Please see the package description. That said, it doesn't mean I know a

[R] scatter plot question

2009-03-03 Thread Dipankar Basu
Hi R Users, I have a dataframe like this: id x rho A 1 0.1 B 20 0.5 C 2 0.9 ... I want to do a scatter plot of "x" versus "rho" but for each point on the scatter plot I want the corresponding entry for "id" instead of points. In STATA I can do so by twoway (scatter x rho, mlabel(id))

Re: [R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread David Winsemius
I think you should read (or re-read) the locfit help page and *also* the links from that page to the help pages for locfit.raw and rv. I would have thought that since family= is not an argument to locfit per se, but rather is documented in locfit.raw that you have yet done so, but perhaps

[R] nlme: problem with fitting logistic function

2009-03-03 Thread jakub kreisinger
Dear colegues I am trying to analyze growth data on mice. To do this I attempted to fit logistic curve using nlme package. However, the dataset I use is large (in total ca 20 000 measures on ca 3 000 individuals) with relatively complicated structure (several explanatory variables with interact

Re: [R] ggplot2: annotated horizontal lines

2009-03-03 Thread baptiste auguie
What's wrong with geom_text? my.value = 0.65 qplot(1,1)+geom_hline(v=0)+ geom_text(mapping=aes(x=1,y=0),label=paste(my.value),vjust=-1) baptiste On 3 Mar 2009, at 18:10, Dave Murray-Rust wrote: Hello, I'm using geom_hline to add a minimum line to my plot (representing the best s

Re: [R] Fit indexes in SEM with categorical data + ML estimation

2009-03-03 Thread jebyrnes
Hey, Dorothee. SEM does not use the S-B chi squared index. If you want to use it, however, I have some methods written for the Satorra-Bentler Chi Square test in the sem.additions package over at r-forge. To install it directly within R type install.packages("sem.additions",repos="http://R-Forg

[R] ggplot2: annotated horizontal lines

2009-03-03 Thread Dave Murray-Rust
Hello, I'm using geom_hline to add a minimum line to my plot (representing the best solution found so far by a search algorithm). I'd like to annotate this line with it's numerical value to save trying to read it off the graph, but I can't see a clear way to do this - any ideas? (Alternat

[R] preparing data for barplot()

2009-03-03 Thread Andrew Ziem
What is the best way to produce a barplot from my data? I would like the barplot to show each person with the values stacked val1+val2+val3, so there is one bar for each person When I use barplot(data.matrix(realdata)), it shows one bar for each value instead. To post here, I created an artifici

Re: [R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread Suresh Krishna
Dear all, I just realized that using family="qgauss" restores normal-looking confidence bands... I read that using family="gaussian" rather than family="qgauss" fixes the dispersion parameter at 1, but without knowing the theory behind the code, I dont understand why there is such a diff

Re: [R] Inefficiency of SAS Programming

2009-03-03 Thread Frank E Harrell Jr
Ajay ohri wrote: why didnt you call it procunivariate if that was exactly what you wanted to do . Why would I ever do that? describe is a improvement on univariate, saving an estimated 87 +/- 87 trees per year in paper by printing what you need in much less space and concentrating on r

[R] modifying a built in function from the stats package (fixing arima)

2009-03-03 Thread Marc Vinyes
Dear members of the list, I'm a beginner in R and I'm having some trouble with: "Error in optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control = optim.control, : non-finite finite-difference value [8]" when running "arima". I've seen that some people have come accross the same p

Re: [R] Comparing two matrices

2009-03-03 Thread Sarah Goslee
Hi, For the Mantel test, your matrices do not need to be Euclidean, but they do need to be symmetric. You could write a similar test that does not require a symmetric matrix, though. Sarah On Tue, Mar 3, 2009 at 11:40 AM, Koen Hufkens wrote: > Hi List, > > I would like to compare two (confusion

Re: [R] Mantel test!

2009-03-03 Thread Sarah Goslee
I'm not Gavin, but since you posted this to the R-help list I assume you are open to other respondents. Since you are asking Gavin, I assume you are using mantel() from the vegan package (it's a good idea to specify, as there are other possibilities). The help for that function explains the permu

[R] Comparing two matrices

2009-03-03 Thread Koen Hufkens
Hi List, I would like to compare two (confusion) matrices. I ended up with the ade4 mantel.rtest function as my best option. However it seems that my data is non-euclidean in nature (is.euclid gives a FALSE). I attached both matrices at the end of the document. Are there any tools to tran

[R] Mantel test!

2009-03-03 Thread Jason Sexton
Dear Gavin, What is the interpretation of a simulated p-value of 1 in a mantel test and how is the p-value derived? When we run two highly negatively correlated matrices we get this result: r: -1, simulated p value: 1 I would expect the high p-value of 1 to mean not significant. Could

Re: [R] zoo and coredata() classes

2009-03-03 Thread rory . winston
Thanks Gabor. Using the data.matrix() approach as outlined in the FAQ works for me. Cheers Rory On Mar 3, 2009 4:00pm, Gabor Grothendieck wrote: > On Tue, Mar 3, 2009 at 10:37 AM, rory.wins...@gmail.com> wrote: > > Hi guys > > > > I have a reasonably basic question with zoo usage, but I hav

[R] behavior of squishplot in TeachingDemos

2009-03-03 Thread Stephen Tucker
Hi list, I wonder if anyone has had this experience with squishplot() in the TeachingDemos package. Taking the example from the ?image help page, library(TeachingDemos) x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1)) ## 1st plot op

Re: [R] zoo and coredata() classes

2009-03-03 Thread Gabor Grothendieck
On Tue, Mar 3, 2009 at 10:37 AM, wrote: > Hi guys > > I have a reasonably basic question with zoo usage, but I havent been able > to find a satisfactory workaround yet. > > Heres a simple example of what I'm talking about (the following data frame > contains numeric columns that contains NAs): >

[R] PLS regression on near infrared (NIR) spectra data

2009-03-03 Thread Paulo Ricardo Gherardi Hein
Dear collegues, I´ ve worked with near infrared (NIR) spectroscopy to assess chemical, physical, mechanical and anatomical properties of wood. I use "The Unscrambler" software to correlate the matrix of dependent variables (Y) with the matrix of spectral data (X) and I would like to migrate to R.

[R] locfit smoothing question (package maintainer not reachable)

2009-03-03 Thread Suresh Krishna
Dear list members, I am trying to understand this output from the smoothing package locfit (1.5-4, running on R 2.8.1 on Windows Vista 64 bit). # sample code x<-1:100 y<-rnorm(100) fit<-locfit(y~x,family="gaussian") #default parameters are fine plot(fit,band="global") #plot seems "reasona

[R] Monte carlo simulation in fGARCH

2009-03-03 Thread Brajkovic J.
I use fGarch package to estimate AR(1)-ARCH(1) process for a vector of returns. Then, using the estimated parameters I want to simulate 10 000 sample paths where each path has the same length as the vector of returns. So the first line of the code is: spec=garchSpec(model=list(ar= 0.440270860,

Re: [R] xlsReadWrite package repository for Ubuntu

2009-03-03 Thread reverend33
Thanks a lot for all your answers. Indeed, i hadn't understood the previous answers. I just downloaded the gdata package and it works perfectly now. Thanks again. Gabor Grothendieck wrote: > > If your purpose is to read Excel spreadsheets on Linux read.xls in the > gdata > packages can do t

[R] spatial markov chain methods

2009-03-03 Thread Torsten Lange
Hello, can any one point me to R-packages (if available) which include spatial Markov Chain methods? My second question is more general but hopefully not OT: Currently we are using the software TPROGS, which let people simulate property distributions in space by some Markov Chain approaches. W

[R] SAS Macros for R Users Only

2009-03-03 Thread Ajay ohri
I think SAS Macros has capability to call R, and execute it without it being in the picture anywhere. So you can use SAS Macros in a file called R.sas In this you can create a macro called %Describe that can call R , load Hmisc ,run the describe function Note you will need repeated use of %pu

[R] zoo and coredata() classes

2009-03-03 Thread rory . winston
Hi guys I have a reasonably basic question with zoo usage, but I havent been able to find a satisfactory workaround yet. Heres a simple example of what I'm talking about (the following data frame contains numeric columns that contains NAs): > head(ebs) time src tstamp code bid ask 1 2009-03-

Re: [R] Inefficiency of SAS Programming

2009-03-03 Thread Ajay ohri
why didnt you call it procunivariate if that was exactly what you wanted to do . On Tue, Mar 3, 2009 at 7:11 PM, Frank E Harrell Jr wrote: > Ajay ohri wrote: > >> for an " inefficient " language , it sure has dominated the predictive >> analytics world for 3 plus decades. >> I referred once

[R] New R mailing list: R-SIG-insurance

2009-03-03 Thread Vincent Goulet
Dear useRs, Over the last few years R has gained a significant momentum in the insurance industry. Dedicated packages have been written, numerous presentations given, courses held, businesses set up, and IT departments convinced. ;-) Therefore, together with Markus Gesmann of Lloyd's of L

[R] REMINDER: DSC 2009 abstract submission before March 15

2009-03-03 Thread Peter Dalgaard
Just a friendly reminder that the closing date for abstract submissions for the DSC conference in Copenhagen is next Sunday. See http://www.r-project.org/dsc-2009 Notice that the website has been revised since we decided to engage a professional convention bureau. The good news is that payment b

Re: [R] Question about multiple plots of zoo objects

2009-03-03 Thread Sergey Goriatchev
Supreme! Thanks Gabor! On Tue, Mar 3, 2009 at 15:20, Gabor Grothendieck wrote: > If you want to use abline on a multivariate plot it must be issued > within a panel function like this: > > # same set up as in prior email > p <- function(x, y, ...) { points(x, y); lines(x, y); abline(v = > time(s)

Re: [R] Reshape

2009-03-03 Thread baptiste auguie
If you have many such repetitions it can be annoying to type the rbind(cbind ... sequence. Perhaps this would help, m <- read.table(textConnection(" IndividualsValue A3 B4 C5 D2"), head=T) data.frame(groups= rep(c("group1", "group2", "group3"), each=nrow(m)), Ind=m[, 1]

Re: [R] portable R editor

2009-03-03 Thread Thompson, David (MNR)
Werner, Another alternative is EditPad Pro . DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources david.john.thomp...@ontario.ca http://ontario.ca/ofri ***

Re: [R] Arbirtrary column names with write.csv

2009-03-03 Thread Rafael Laboissiere
* Uwe Ligges [2009-03-03 15:27]: > Rafael Laboissiere wrote: >> Is there a way to prevent write.csv to transform the column names a la >> make.names? I mean, if I write the code: >> >> x <- structure (NULL) >> x [["a+b"]] <- c (1,2) >> write.csv (x, file = "foo.csv", row.names = FALS

Re: [R] Inefficiency of SAS Programming

2009-03-03 Thread Girish A.R.
On Mar 3, 9:58 am, Ajay ohri wrote: > for an " inefficient " language , it sure has dominated the predictive > analytics world for 3 plus decades. > I referred once to intellectual jealousy between newton and liebnitz. > > i am going ahead and creating the R package called "Anne". > > It basically

Re: [R] Reshape

2009-03-03 Thread David Winsemius
Your data objects could not be matrices with that composition of values. Let's use the correct data type: > df <- data.frame(Ind = letters[1:4], val = sample(1:4, 4)) > df Ind val 1 a 4 2 b 2 3 c 3 4 d 1 > rbind(cbind(df,"GruppeEin"),cbind(df,"GruppeZwei")) #v ariable recyc

Re: [R] Arbirtrary column names with write.csv

2009-03-03 Thread Uwe Ligges
Rafael Laboissiere wrote: Is there a way to prevent write.csv to transform the column names a la make.names? I mean, if I write the code: x <- structure (NULL) x [["a+b"]] <- c (1,2) write.csv (x, file = "foo.csv", row.names = FALSE, quote = FALSE) your x is not a data.frame, he

Re: [R] survival::survfit,plot.survfit

2009-03-03 Thread Terry Therneau
--- begin included message #Two models coxsst4 <- coxph(Surv(schaeden)~ S5, data=nino4) coxsst4_full <- coxph(Surv(schaeden)~ 0+S1+S2+S3+S4+S5+S6+S7+S8+S9+S10, data=nino4) #Set all covariates 0 attach(nino4) newS4 <- data.frame(S0=0., S1=0., S2=0., S3=0., S4=0., S5=0., S6=0., S7=0., S8=0.

Re: [R] Question about multiple plots of zoo objects

2009-03-03 Thread Gabor Grothendieck
If you want to use abline on a multivariate plot it must be issued within a panel function like this: # same set up as in prior email p <- function(x, y, ...) { points(x, y); lines(x, y); abline(v = time(s)[s > 0], col = "green") } plot(cbind(x, s), panel = p) There are further examples of panel

Re: [R] xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Dirk Eddelbuettel
On 3 March 2009 at 07:38, Marc Schwartz wrote: | You perhaps missed the key point in Uwe's response, which is that the | package is only available under Windows, as it depends upon Windows | specific functionality (MS Office API via a third party library which is | available for Windows only) to n

Re: [R] RES: xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Gabor Grothendieck
There is a recently updated review of the alternatives on the R Wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:data-io:ms_windows On Tue, Mar 3, 2009 at 9:00 AM, Marc Schwartz wrote: > That is fine if you only have one or two R objects to write out to CSV > files and then read them into

Re: [R] Reshape

2009-03-03 Thread stephen sefick
check out the melt function in the reshape package. On Tue, Mar 3, 2009 at 8:53 AM, Usuario R wrote: > Hi all, > > I would like to transform to long format a matrix  which has only > information about individuals and a value for each individual. I would like > to have it in ling format with more

Re: [R] Question about multiple plots of zoo objects

2009-03-03 Thread Sergey Goriatchev
Gabor, yes, I want to color portions of EACH plot of the MULTIPLE plot done with plot.zoo() I tried to do: plot(multivariate zoo object) abline(v=...) but that does not work. I will check your suggestions of the examples. Thank you for your help, as always! Best, Sergey On Tue, Mar 3, 2009 at

Re: [R] RES: xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Marc Schwartz
That is fine if you only have one or two R objects to write out to CSV files and then read them into Excel. It becomes rapidly tedious as the number of objects increases. If you go back and read my original post, the incentive for me to write the Perl routine was that I had to create an Excel file

[R] Reshape

2009-03-03 Thread Usuario R
Hi all, I would like to transform to long format a matrix which has only information about individuals and a value for each individual. I would like to have it in ling format with more information related to groups, so ell values and individuals are repeated for each group. Let me show the exampl

[R] RES: xlsReadWrite package repository for Ubuntu

2009-03-03 Thread Leandro Marino
I think in this case its better use the write.csv. Microsoft Excel reads csv files normally. Atenciosamente, Leandro Lins Marino Centro de Avaliação Fundação CESGRANRIO Rua Santa Alexandrina, 1011 - 2º andar Rio de Janeiro, RJ - CEP: 20261-903 R (21) 2103-9600 R.:236 ( (21) 8777-7907 ( lean...@

Re: [R] FW: partial residual plots

2009-03-03 Thread John Fox
Dear Dwayne, I didn't see your post until now, because our email system was down all day yesterday. Mark Difford has already pointed your towards the cr.plots() and ceres.plots() functions in the car package. In your description of what you want to do, you mention the "adjusted explanatory varia

Re: [R] SPSS data import: problems & work arounds for GSS surveys

2009-03-03 Thread John Fox
Dear Paul, I encountered this problem the other day, and it went away when I updated the foreign package from version 0.8-32 to 0.8-33. I hope this helps, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.m

Re: [R] Question about multiple plots of zoo objects

2009-03-03 Thread Gabor Grothendieck
Do you mean you want to shade a portion of the plot? There are two examples of that in the examples section of ?plot.zoo and a further example using xyplot.zoo in the examples section of ?xyplot.zoo On Tue, Mar 3, 2009 at 8:37 AM, Sergey Goriatchev wrote: > Hi, Gabor > > No, what I am trying to

Re: [R] Inefficiency of SAS Programming

2009-03-03 Thread Frank E Harrell Jr
Ajay ohri wrote: for an " inefficient " language , it sure has dominated the predictive analytics world for 3 plus decades. I referred once to intellectual jealousy between newton and liebnitz. i am going ahead and creating the R package called "Anne". It basically is meant only for SAS users w

Re: [R] R - need more memory, or rejection sampling algorithm doesn't work?

2009-03-03 Thread Ben Bolker
ekwaters wrote: > >> b12=log(.4/.6) >> b13=log(.85/.15) > > Can you point out the syntax errors in the first one? > > You have a double caret (^^). f(k) should be f[k] Watch out for raising numbers to such large powers (although to my surprise things didn't over/underflow when I tri

  1   2   >