[R] problem of "constrOptim.nl", no hessian and convergence values

2011-12-28 Thread Sunny2011
Dear Helper, I used "constrOptim.nl" and got the value of par. The estimations looks good even if the number of iterations is only 16. But the values of hessian and convergence are both "NULL". I tested the objective function and gradient function by "optim" and didn't see any problem there. Wi

Re: [R] Census ARIMA x-12 seasonal adjustment in R?

2011-12-28 Thread Majid Hasan Khattak
Another place to find r functions and info is http://www.rseek.org regards Majid -Original Message- From: tony.ctr.c...@faa.gov Sent: Thursday, December 29, 2011 12:24 AM To: R-help@r-project.org Subject: [R] Census ARIMA x-12 seasonal adjustment in R? Hello, I am new to usin R - whic

Re: [R] How would I rewrite my code so that I can implement the use of multicore on an Rstudio server to run regsubsets using the "exhaustive" method? The data has 1200 variables and 9000 obs so the c

2011-12-28 Thread Jeff Newmiller
This is not the RStudio server support mailing list. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live:

[R] rJava and JRI

2011-12-28 Thread PermataRussiana
Dear All, I am writing R code and I want to interface with JAVA using netbeans. I want to call R from JAVA. What i should pick?rJAVA or JRI? and can someone provide me step-by-step to installing and code for connecting to R. As i am using path analysis. Is it possible to use? Thank you in ad

[R] How would I rewrite my code so that I can implement the use of multicore on an Rstudio server to run regsubsets using the "exhaustive" method? The data has 1200 variables and 9000 obs so the code

2011-12-28 Thread cconnell
How would I rewrite my code so that I can implement the use of multicore on an Rstudio server to run regsubsets using the "exhaustive" method? The data has 1200 variables and 9000 obs so the code has been shortened here: model<-regsubsets(price~x + y + z + a + b + , data=sample, nvmax=50

Re: [R] folders of path - platform independent (repost)

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 5:57 PM, Ben quant wrote: One quick follow-up on reversing your example. Is there an easy way to get the file.path separator for the platform? file.path("","") seems the be the only way to do it. I don't get it. Did you look at ?file.path ? It's default call shows

Re: [R] folders of path - platform independent (repost)

2011-12-28 Thread Ben quant
One quick follow-up on reversing your example. Is there an easy way to get the file.path separator for the platform? file.path("","") seems the be the only way to do it. So if filename is a valid file path, this will return the folders, drive, and file name in vector form regardless of the platfo

Re: [R] importing NPDB

2011-12-28 Thread Clint Bowman
Alison, library(foreign) ndpb<-read.spss("NPDB1107.por") generates: Warning message: In `levels<-`(`*tmp*`, value = c("Self Query Processing", "Non-Fed. Malp. Payor", : duplicated levels will not be allowed in factors anymore and summary(ndpb) does generate quite a list. Perhaps you can

Re: [R] Census ARIMA x-12 seasonal adjustment in R?

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 4:31 PM, Duncan Murdoch wrote: On 11-12-28 3:53 PM, David Winsemius wrote: On Dec 28, 2011, at 2:24 PM, tony.ctr.c...@faa.gov wrote: Hello, I am new to usin R - which is a great tool - and would like to know if R has a seasonal adjustment program for time series and/if i

Re: [R] folders of path - platform independent (repost)

2011-12-28 Thread Ben quant
Excellent! Thanks, ben On Wed, Dec 28, 2011 at 2:37 PM, Duncan Murdoch wrote: > On 11-12-28 4:30 PM, Ben quant wrote: > >> Hello, (sorry re-posting due to typo) >> >> I'm attempting to get the folders of a path in a robust way (platform >> independent, format independent). It has to run on Wind

Re: [R] folders of path - platform independent (repost)

2011-12-28 Thread Duncan Murdoch
On 11-12-28 4:30 PM, Ben quant wrote: Hello, (sorry re-posting due to typo) I'm attempting to get the folders of a path in a robust way (platform independent, format independent). It has to run on Windows and Linux and tolerate different formats. For these: (The paths don't actually exist in Li

Re: [R] Census ARIMA x-12 seasonal adjustment in R?

2011-12-28 Thread Duncan Murdoch
On 11-12-28 3:53 PM, David Winsemius wrote: On Dec 28, 2011, at 2:24 PM, tony.ctr.c...@faa.gov wrote: Hello, I am new to usin R - which is a great tool - and would like to know if R has a seasonal adjustment program for time series and/if it incorporates the Census Bureau's ARIMA x-12 seasonal

[R] folders of path - platform independent (repost)

2011-12-28 Thread Ben quant
Hello, (sorry re-posting due to typo) I'm attempting to get the folders of a path in a robust way (platform independent, format independent). It has to run on Windows and Linux and tolerate different formats. For these: (The paths don't actually exist in Linux but you get the idea.) Windows: fil

[R] folders of path - platform independent

2011-12-28 Thread Ben quant
Hello, I'm attempting to get the folders of a path in a robust way (platform independent, format independent). It has to run on Windows and Linux and tolerate different formats. For these: (The paths don't actually exist in Linux but you get the idea.) Windows: file_full_path = "C://Program File

Re: [R] R Commander options

2011-12-28 Thread John Fox
Dear Michael, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Michael Schmidt > Sent: December-28-11 2:12 PM > To: r-help@r-project.org > Subject: Re: [R] R Commander options > > Folks, > Thanks for the help and I've used it

Re: [R] error options

2011-12-28 Thread Bert Gunter
Below. -- Bert On Wed, Dec 28, 2011 at 11:35 AM, Paul Murtaugh wrote: > Hi, > > I'm running simulations that include a function that occasionally fails > because of an unpredictable singularity in a matrix that it tries to invert. > I'd like to have the function return 'NA' when that happens, so

Re: [R] Census ARIMA x-12 seasonal adjustment in R?

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 2:24 PM, tony.ctr.c...@faa.gov wrote: Hello, I am new to usin R - which is a great tool - and would like to know if R has a seasonal adjustment program for time series and/if it incorporates the Census Bureau's ARIMA x-12 seasonal adjustment program in any way? I'm wo

Re: [R] Loops and vector operations

2011-12-28 Thread R. Michael Weylandt
Look at ?ifelse. You'll need to nest them however. If you are feeling a little more ambitious this can be done with ?switch, but for clarity, I'd rather see pre-allocation followed by assignments Something along this pattern: out <- numeric(50) x <- sample(3, 50, TRUE) out[x==3] <- "A" out[x==2

[R] Census ARIMA x-12 seasonal adjustment in R?

2011-12-28 Thread Tony . CTR . Choi
Hello, I am new to usin R - which is a great tool - and would like to know if R has a seasonal adjustment program for time series and/if it incorporates the Census Bureau's ARIMA x-12 seasonal adjustment program in any way? Thanks so much! Tony [[alternative HTML version deleted]] ___

Re: [R] R Commander options

2011-12-28 Thread Michael Schmidt
Folks, Thanks for the help and I've used it as follows. I've created a .Rprofile file in my home directory and placed the following code in it: options(Rcmdr = list(default.font="*helvetica-medium-r-normal-*-15*", log.font.size = 15, log.width = 54, log.height = 6, output.height = 18, scale.fact

Re: [R] Custom XML Readers

2011-12-28 Thread pl.r...@gmail.com
Thanks all for helpful advise, however I'm still running in to an error while trying to run "readSolrDoc" provided by Ducan Temple Lang. The documents I'm trying to parse come from solr and look very much like the example provided on http://www.omegahat.org/RSXML/ I'm not that familiar with th

[R] Gale-Shapley Algorithm for R

2011-12-28 Thread VictorDelgado
Dear R-helpers, I'm not a speciallist in writing complex functions, and the function still very rusty (any kind of suggestions are very welcome). I want to implement Gale-Shapley algorithm for R Language. It is based on http://www.jstor.org/stable/10.2307/2312726 Gale and Shapley (1962) , and it

[R] error options

2011-12-28 Thread Paul Murtaugh
Hi, I'm running simulations that include a function that occasionally fails because of an unpredictable singularity in a matrix that it tries to invert. I'd like to have the function return 'NA' when that happens, so that the simulations can continue. I've tried things like: test <- function

[R] Loops and vector operations

2011-12-28 Thread Mago84
Dear all, this is my first post and I´m very new at R, I don´t know if somebody can help with an issue. I´m doing some exercices and I don´t know if for example I can convert this for in an operation with vectors: for (i in 2:n){ if (ES[i-1]==0 && sprd[i-1]>mediaSDP[i-1] && sprd[i]<=medi

Re: [R] regarding QRb() function

2011-12-28 Thread Douglas Bates
2011/12/28 Uwe Ligges : > > > On 26.12.2011 15:30, narendarreddy kalam wrote: >> >> Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing = >> decreasing)) :    undefined columns selected during the execution of >> following r sequence of commands >> X<-subset(data,select=c(V1,V2,V3,V4,

Re: [R] subset() missing one factor [FIXED]

2011-12-28 Thread Rich Shepard
On Wed, 28 Dec 2011, Jeff Newmiller wrote: Might I suggest looking in chemdata? You have supplied sample records from your original data file, but the transition from that to your result is still opaque. Jeff, Yep. I must have been sleeping and forgot to re-read the source table. Sigh. That

Re: [R] subset() missing one factor

2011-12-28 Thread Jeff Newmiller
Might I suggest looking in chemdata? You have supplied sample records from your original data file, but the transition from that to your result is still opaque. Try to generate a reproducible sequence of steps starting with your data that we can follow along with. Comment: you keep saying that t

Re: [R] Contingency tables example

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 12:48 PM, steve_fried...@nps.gov wrote: Steven: Why are you sending copies to r-help-bounces? Do you think the moderators need an extra copy? This is a elementary problem concerned with tests of association. You should read up on categorical statistics, chi squar

Re: [R] extract factor scores post-varimax

2011-12-28 Thread Uwe Ligges
On 24.12.2011 23:57, ark06 wrote: Hello all, I've run a principal component regression using the PLS package. I then applied varimax rotation (i.e., using http://stat.ethz.ch/R-manual/R-patched/library/stats/html/varimax.html). I cannot figure out how to extract the factor loadings post-var

Re: [R] transparency using plot+points with sp classes

2011-12-28 Thread Uwe Ligges
This code is not reproducible, hence hard to know if there is a problem with R, a contributed package, or what you wrote or did. Best, Uwe Ligges On 28.12.2011 18:07, Ana wrote: Hi guys, Thansk for the help with the transparency. I've made some modifications to my code , added rgb in colour t

Re: [R] regarding QRb() function

2011-12-28 Thread Uwe Ligges
On 26.12.2011 15:30, narendarreddy kalam wrote: Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing = decreasing)) :undefined columns selected during the execution of following r sequence of commands X<-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9)) y<-subset(data,selcet=10

Re: [R] transparency using plot+points with sp classes

2011-12-28 Thread Jeff Newmiller
Some output devices don't support transparency. Try a different output device. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] subset() missing one factor

2011-12-28 Thread Rich Shepard
The data set (called 'chemdata') has 6 columns (4 factors, 1 date, 1 numeric) and I need to create subsets for each of one of the factors ('stream'). This has worked flawlessly for all but two streams which were created yesterday. The command I use to create the subsets is like this: rnchH

Re: [R] Contingency tables example

2011-12-28 Thread Steve_Friedman
This is a elementary problem concerned with tests of association. You should read up on categorical statistics, chi square tests, and general linear models. Steve Friedman Ph. D. Ecologist / Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Home

Re: [R] transparency using plot+points with sp classes

2011-12-28 Thread Ana
Hi guys, Thansk for the help with the transparency. I've made some modifications to my code , added rgb in colour to play with the transparency and included also a north arrow. I was trying to make the code look better, however i am facing another problem, once I use symbols with a bg colour. Some

Re: [R] Hinton Diagram for a matrix of weights

2011-12-28 Thread Xavier Fernández i Marín
Jim Lemon vas escriure el dia dj, 08 des 2011: > On 12/08/2011 03:45 AM, Xavier Fernández i Marín wrote: > > Hello, > > > > Although I have used a general search engine, r-seek, and browsed CRAN for > > contributed packages and R Gallery, I have not been able to find an > > implementation of Hinto

Re: [R] convert variable types when creating data frame from cor.test results

2011-12-28 Thread Jean V Adams
Keith Larson wrote on 12/28/2011 04:02:39 AM: > Dear list, > > The below dataset and code creates a new dataset with the results from > the function cor.test being performed on each individual > ('Individual_ID') from my original dataset. How do I convert each > variable from the cor.test results

[R] Contingency tables example

2011-12-28 Thread sambooth21
I have this question: http://r.789695.n4.nabble.com/file/n4240145/data%5D.jpg This table and data represents a sample of social housing residents in Copenhagen and I'm asked to analyse the data with a view to seeing what might be related to residents satisfaction levels. And I just don't know w

Re: [R] Optimising timeboxing in xts

2011-12-28 Thread R. Michael Weylandt
I might try something like this, untested: (I think you can do a vector of arguments to `[.xts` but I'm not in a position to verify) # let n be the times you want # i be the width of the intervals x[paste(n - i, n + i, sep = "::")] Hope this helps, Michael On Fri, Dec 23, 2011 at 11:55 PM, Ha

Re: [R] convert variable types when creating data frame from cor.test results

2011-12-28 Thread Petr PIKAL
Hi > > Dear list, > > The below dataset and code creates a new dataset with the results from > the function cor.test being performed on each individual > ('Individual_ID') from my original dataset. How do I convert each > variable from the cor.test results to a numeric data type, as it is > passe

Re: [R] Problem of COX model with time dependent covariate

2011-12-28 Thread Terry Therneau
I'll add just a little to what David said. The normal meaning of a "time dependent covariate" is a covariate that changes with time. For instance in a model that included x="most recent available blood pressure" the value of x will change at each patient visit. You obviously can't get those new

[R] [R-pkgs] new version of the Rcmdr package

2011-12-28 Thread John Fox
Dear R users, I'd like to announce a new version, 1.8-1, of the Rcmdr package. The Rcmdr ("R Commander") package provides a basic-statistics graphical user interface (GUI) to R, implemented in Tcl/Tk via the standard R tcltk package. Beyond small changes and additions, the new version of the Rcm

Re: [R] Help with PCA

2011-12-28 Thread Sarah Goslee
Hi, On Wed, Dec 28, 2011 at 7:54 AM, elisacarli21 wrote: > Dear all, > > I've  a correlation matrix with rows and columns headings. > I've two questions: > > 1) How can i import it in R, setting first row as row heading and first > column as column heading? read.table, with the appropriate optio

Re: [R] Lavaan and Average Variance Extracted

2011-12-28 Thread Mark Difford
On Dec 28, 2011 at 3:47am T.M. Rajkumar wrote: > I need a way to get at the Variance Extracted information. Is there a > simple way to do the calculation. Lavaan > does not seem to output this. It does. See: library(lavaan) ?inspect inspect( fit, "rsquare" ) Regards, Mark. - Mark Difford

[R] Help with PCA

2011-12-28 Thread elisacarli21
Dear all, I've a correlation matrix with rows and columns headings. I've two questions: 1) How can i import it in R, setting first row as row heading and first column as column heading? 2) Which is the best principal component anlysis package in R? Thanks in advance -- View this message in con

[R] convert variable types when creating data frame from cor.test results

2011-12-28 Thread Keith Larson
Dear list, The below dataset and code creates a new dataset with the results from the function cor.test being performed on each individual ('Individual_ID') from my original dataset. How do I convert each variable from the cor.test results to a numeric data type, as it is passed into the new dataf

Re: [R] Lavaan and Average Variance Extracted

2011-12-28 Thread T.M. Rajkumar
Thank you. This helps. Rajkumar -- View this message in context: http://r.789695.n4.nabble.com/Lavaan-and-Average-Variance-Extracted-tp4238791p4239821.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list ht

Re: [R] transparency using plot+points with sp classes

2011-12-28 Thread Chris Campbell
# use the alpha argument of rgb or hsv to create transparent colours require(sp) xc <- round(runif(20), 2) yc <- round(runif(20), 2) xy <- cbind(xc, yc) xy.sp <- SpatialPoints(xy) col1 <- hsv(h = (1:10)/80, v = 0.9, alpha = 0.3) col2 <- hsv(h = 0.25+(1:10)/50, v = 0.8, alpha = 0.4) plot(xy.sp[1:

Re: [R] transparency using plot+points with sp classes

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 7:13 AM, Ana wrote: How can I make one point graphics with transparency These are all sp classes: plot(polygons_area,axes=TRUE,asp=1.5,main="Title",xlab="Latitude", ylab="Longitude") points(observations2000,type = "p",pch=21,col="green") points(observation1999,type = "p",p

Re: [R] Probability Question

2011-12-28 Thread David Winsemius
On Dec 28, 2011, at 3:15 AM, peter dalgaard wrote: On Dec 28, 2011, at 05:11 , Matilda E. Gogos wrote: Hello, This is a question from a class I'm not in (it's also winter break). But, all the same, I don't know where to start in R with this. It's supposed to be done in R. So, can anyon

Re: [R] How to create a loop and then extract values from the list generated by cor.test

2011-12-28 Thread Jean V Adams
keith.w.lar...@gmail.com wrote on 12/27/2011 04:06:09 PM: > Jean, > > Thanks! I am new to the list and R so I am unsure of the protocol for > replying to a reply. In general, cc R-help so that the entire thread of communication is available to everyone > Your code is simple and elegant. I u

[R] transparency using plot+points with sp classes

2011-12-28 Thread Ana
How can I make one point graphics with transparency These are all sp classes: plot(polygons_area,axes=TRUE,asp=1.5,main="Title",xlab="Latitude", ylab="Longitude") points(observations2000,type = "p",pch=21,col="green") points(observation1999,type = "p",pch=21,col="blue") points(reference.points,ty

Re: [R] Pascal's Triangle

2011-12-28 Thread Spencer Graves
n <- 5 PascalsTriangle <- vector('list', n) PascalsTriangle[[1]] <- 1 for(i in 2:n){ x0 <- PascalsTriangle[[i-1]] x01 <- c(0, x0) x10 <- c(x0, 0) PascalsTriangle[[i]] <- x01+x10 } I hope I'm not doing a homework problem. Spencer On 12/28/2011 1:53 AM, Jason J. Pitt wrote: Oh

Re: [R] Pascal's Triangle

2011-12-28 Thread Jason J. Pitt
Oh and also, if it makes sense, you can use n choose k ( choose() ) to calculate each element of the triangle if you don't want to deal with indicies, addition, etc. Jason Original message >Date: Wed, 28 Dec 2011 03:42:11 -0600 (CST) >From: r-help-boun...@r-project.org (on behalf of "

Re: [R] Pascal's Triangle

2011-12-28 Thread Ingmar Visser
binomial coeffecients can be computed using ?choose hth, Ingmar On Wed, Dec 28, 2011 at 10:42 AM, Jason J. Pitt wrote: > Hi Matilda, > > My ignorance of the mathematical properties of Pascal's > Triangle might make me overlook a much easier way to do this, > but my first brute force thought was

Re: [R] Pascal's Triangle

2011-12-28 Thread Jason J. Pitt
Hi Matilda, My ignorance of the mathematical properties of Pascal's Triangle might make me overlook a much easier way to do this, but my first brute force thought was to use a list to store each level of the triangle (i.e. a list of vectors). You can then use the values of the previous level t

Re: [R] Probability Question

2011-12-28 Thread peter dalgaard
On Dec 28, 2011, at 05:11 , Matilda E. Gogos wrote: > Hello, > > This is a question from a class I'm not in (it's also winter break). But, > all the same, I don't know where to start in R with this. It's supposed to > be done in R. So, can anyone direct me with a helpful hint or 2, on how to >