Re: [R] daily batch mail in R?

2012-10-14 Thread peter dalgaard
On Oct 14, 2012, at 07:12 , Alok K. |Bohara, PhD wrote: Is there anyway I could receive R emails once a day (in a batch)? How could I set it up? Yes, go to . wait for it . Alok -- __ R-help@r-project.org mailing list ... *this*

[R] Least upper bound in PPS systematic sampling

2012-10-14 Thread Lib Gray
Hello, I'm trying to take a PPS systematic sample of a data set, and I've gotten stuck at the last point. I have selection numbers, and just need to pick out the units whose cumulative size are the least upper bounds of these numbers This is as close as I've gotten: selected-array(dim=c(97,4))

[R] stop at error point in for-loop

2012-10-14 Thread mrzung
hi all: Following is simple example, for(i in 1:1000){ a-function(i){ #some function that has an error } } What I want to know is the way to find the error point in for-loop, What i makes the error. is there any way to solve it instead of debugging and finding an error manually? Thanks,

Re: [R] stop at error point in for-loop

2012-10-14 Thread Jeff Newmiller
options(error = recover) --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live:

Re: [R] White test

2012-10-14 Thread Achim Zeileis
On Sat, 13 Oct 2012, Afrae Hassouni wrote: Hello, Is there a way to perform a White test (testing heteroscedasticity) under R? White's test is a special case of the Breusch-Pagan test using a particular choice of auxiliary regressors. The Breusch-Pagan test is available in bptest() from

Re: [R] White test

2012-10-14 Thread Achim Zeileis
On Sat, 13 Oct 2012, Rui Barradas wrote: Hello, Try package tseries, function white.test(). That's not White's test for heteroskedasticity but White's network test for nonlinearity, i.e., a different test. Z Hope this helps, Rui Barradas Em 13-10-2012 21:40, Afrae Hassouni escreveu:

[R] listing the files in a directory using regular expressions

2012-10-14 Thread siddu479
Hi Experts, This might be silly question that I am asking, but no way as I am new to R. I want to list the files in a directory using regular expression like A_B*_C*.csv etc. How to make this possible in R ? I tried like this list.files(dir=., pattern=A_B*_C*.csv) but this gives no output,

Re: [R] listing the files in a directory using regular expressions

2012-10-14 Thread Gabor Grothendieck
On Sun, Oct 14, 2012 at 3:13 AM, siddu479 onlyfordigitalst...@gmail.com wrote: Hi Experts, This might be silly question that I am asking, but no way as I am new to R. I want to list the files in a directory using regular expression like A_B*_C*.csv etc. How to make this possible in R ?

[R] Finding root of quadratic equation

2012-10-14 Thread gmasyata
Dear R Helpers, I need to find the root of following equationy=x^2+3*x-1 by substitution a random number from less to more in the certain segment.I had tried using this codef - function (x) x^2+x-12str(xmin - uniroot(f, c(2, 4), tol = 0.0001)) but $ f.root: num -7.85e-07not 0, and so I'm not

[R] plotting principal components on geographic map

2012-10-14 Thread marco milella
Dear all, I have a dataset representing several geographical points (locations), each one having a specific value after performing a PCA. Now I'm trying to understand how to separately represent on a geographic map (of Europe) the pattern of PC1,2, ecc.with colors (e.g.heatmap) I have to add that

Re: [R] listing the files in a directory using regular expressions

2012-10-14 Thread Rui Barradas
Hello, Try the pattern A_B.*_C.*\\.csv. Hope this helps, Rui Barradas Em 14-10-2012 08:13, siddu479 escreveu: Hi Experts, This might be silly question that I am asking, but no way as I am new to R. I want to list the files in a directory using regular expression like A_B*_C*.csv etc.

Re: [R] error msg using na.approx x and index must have the same length

2012-10-14 Thread R. Michael Weylandt
On Fri, Oct 12, 2012 at 1:26 AM, Jay Rice jsric...@gmail.com wrote: Below I have written out some simplified data from my dataset. My goal is to interpolate Price based on timestamp. Therefore the closer a Price is in time to another price, the more like that price it will be. I want the

Re: [R] party for prediction [REPOST]

2012-10-14 Thread Achim Zeileis
Ed: I'm experiencing some problems using the party package (specifically mob) for prediction. I have a real scalar y I want to predict from a real valued vector x and an integral vector z. mob seemed the ideal choice from the documentation. I'm not sure what you mean by integral vector. If

[R] Poisson Regression: questions about tests of assumptions

2012-10-14 Thread Eiko Fried
I would like to test in R what regression fits my data best. My dependent variable is a count, and has a lot of zeros. And I would need some help to determine what model and family to use (poisson or quasipoisson, or zero-inflated poisson regression), and how to test the assumptions. 1) Poisson

Re: [R] Poisson Regression: questions about tests of assumptions

2012-10-14 Thread Achim Zeileis
On Sun, 14 Oct 2012, Eiko Fried wrote: I would like to test in R what regression fits my data best. My dependent variable is a count, and has a lot of zeros. And I would need some help to determine what model and family to use (poisson or quasipoisson, or zero-inflated poisson regression), and

[R] how to show iterations

2012-10-14 Thread sffarooqi
Hi, I am new to R, and am working on some optimization problems - I was wondering if there was a way that I could show all the iterations in R -i.e. showing for each iteration, what the iteration is, how much the function is, what the norm of the gradient would be... Any help is greatly

[R] multivariate lognormal distribution simulation in compositions

2012-10-14 Thread Andras Farkas
Dear All,   thanks to Berend, my question posted yesturday was solved succesfully here: http://r.789695.n4.nabble.com/hep-on-arithmetic-covariance-conversion-to-log-covariance-td4646068.html . I posted the question with the assumption of using the results with rlnorm.rplus() from compositions.

[R] PFIM 3.2

2012-10-14 Thread Naser Jamil
Dear R-user, I'm having some difficulty with working PFIM 3.2, a package for implementing population PK/PD in R. I wish to evaluate the determinant of Fisher information matrix each time with successive dose from a pre defined sequence of doses and want to store those values in a vector. It's

[R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Carlos Andrade
Hi, I have been searching everywhere for an implementation of those algorithms, but I have only observed them in Matlab and on the literature. I noticed a package called 'ada' in CRAN but it is not for multi class. I would be happy with just Adaboost.m2, Smoteboost over adaboost.m2 or any other

[R] Asking help about drawing and saving candle chart automatically....

2012-10-14 Thread 박상규
Hello, I have trouble with saving and showing candlestick graph. I want to draw daily 1-minute candle chart per each day and save it repeatedly. The data I saved and is used in my code is as the following format: - Index,Open,High,Low,Close #

Re: [R] party for prediction [REPOST]

2012-10-14 Thread Ed
First up, thanks hugely for your response. I've been beating my head against this! On 14 October 2012 16:51, Achim Zeileis achim.zeil...@uibk.ac.at wrote: I'm not sure what you mean by integral vector. If you want to apply the approach to hundreds of thousands of observations, I gues that these

[R] Date Math

2012-10-14 Thread Noah Silverman
Hello, I have a time series object (xts) that I iterate over in a loop. Works fine. My challenge is that I want to be able to reference other entries in the series by math. i.e. For today's observation, what were the last 5 observations? If indexed numerically, it is trivial, but I can

Re: [R] plotting principal components on geographic map

2012-10-14 Thread anna freni sterrantino
Hi Marco, a small example will be helpful to get better to the point. But I suggest you either to address this question to  R geo mailing list  https://stat.ethz.ch/mailman/listinfo/r-sig-geo and eventually take a look to GeoXp library. Cheers Anna   Anna Freni Sterrantino Department of

Re: [R] transforming a .csv file column names as per a particular column rows using R code

2012-10-14 Thread Jeff Newmiller
Not clear to me what your successive rows indicate in your output. However, you may get something similar to what you want using the reshape2 library: library(reshape2) dta1 - read.csv( text= Tool,Step_Number,Data1,Data2 A,1,0,1 A,2,3,2 A,3,2,3 B,1,3,2 B,2,1,2 B,3,3,2 ) # put into long form

Re: [R] how to show iterations

2012-10-14 Thread Pieter Schoonees
If you are writing the loop yourself, you can use print() statements in the loop. If you are using something like optim(), have a look at the documentation and use the trace option under the control argument. Otherwise, put a print statement in the function you are passing to optim. If this

Re: [R] how to show iterations

2012-10-14 Thread Jeff Newmiller
Optimization is not something R does... this is something implemented by specific functions that may be in the base install or in add-on packages, but you have not indicated how you are currently approaching your problem. If you are using the optim() function, then I refer you to the fine

Re: [R] Date Math

2012-10-14 Thread Jeff Newmiller
There are a few ways. The xts package has a lag function. So does zoo. Pay careful attention to the conventions used for specifying relative time in these various packages. You can also infill your missing data to create a regularly-spaced time series. There is no shortage of web

Re: [R] Efficient method: Equality of all elements of two vectors

2012-10-14 Thread Ista Zahn
Hi, On Sun, Oct 14, 2012 at 11:23 AM, Shant Ch sha1...@yahoo.com wrote: n=10 x1-(1:n)/n y1-rnorm(n,x1^2,1) m=20 x2-(1:m)/m The value of y2 will be rnorm (m, x2^2,1) if none of the elements of x2 is same as x1, but for every same elements in x1 and x2, the value of y2 will be same as

Re: [R] PFIM 3.2

2012-10-14 Thread Pieter Schoonees
I am not sure exactly what errors you are getting, but here are some comments. It is good practice to initialize a vector to the total length that you will require instead of changing the dimension each time you substitute a value. I.e. use something like deter - rep(NA, length(true.dose) )

Re: [R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Jeff Newmiller
May I suggest you use a more appropriate tool for your search: RSiteSearch(multiclass classification) On Sun, 14 Oct 2012, Carlos Andrade wrote: Hi, I have been searching everywhere for an implementation of those algorithms, but I have only observed them in Matlab and on the literature. I

Re: [R] party for prediction [REPOST]

2012-10-14 Thread Achim Zeileis
On Sun, 14 Oct 2012, Ed wrote: First up, thanks hugely for your response. I've been beating my head against this! On 14 October 2012 16:51, Achim Zeileis achim.zeil...@uibk.ac.at wrote: I'm not sure what you mean by integral vector. If you want to apply the approach to hundreds of thousands

[R] Unable to work with Rattle

2012-10-14 Thread balaji sarangarajan
Hello, I have installed R version 2.15.1 and I am trying to work with rattle package. I have got an error stating as below; Error in loadTooltips() : could not find function xmlTreeParse In addition: Warning messages: 1: package ‘XML’ is not available (for R version 2.15.1) 2: In

Re: [R] transforming a .csv file column names as per a particular column rows using R code

2012-10-14 Thread arun
Hi, If you don't want the column Tool to be repeated, try this: dat1-read.table(text= Tool Step_Number Data1 Data2 A 1 0 1 A 2 3 1 A 3 2 1 B 1 3 2 B 2 1 2 B 3 3 2 ,sep=,header=TRUE,stringsAsFactors=FALSE)     with(dat1,aggregate(cbind(Data1,Data2),list(Tool=Tool),function(x) x))   Tool

Re: [R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Carlos Andrade
Dear Jeff Newmiller, Thanks for the suggestion I did not know the website but the problem is more dry than simple multiclass classification. In fact, there are even few papers addressing the problem. I was in hope that if not yet available in CRAN someone from the R community could point out any

Re: [R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Carlos Andrade
Pardon, *I hope it is not inappropriate to ask such questions here. Carlos Andrade http://carlosandrade.co 2012/10/14 Carlos Andrade carlosvia...@gmail.com Dear Jeff Newmiller, Thanks for the suggestion I did not know the website but the problem is more dry than simple multiclass

Re: [R] how to show iterations

2012-10-14 Thread sffarooqi
Hi Pieter, thank you for your response. I am indeed using the optim function. I had already tried the trace option under the control argument - however it only provides me with iteration no. 10, 20, 30 etc. I would like to be able to generate the results for every iteration. Here is an example

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
Jeff, My understanding is that the lag command will lag an entire time series. That isn't what I'm looking for. I just want, for example, today, and 5 entries back. for exmple: iter - '2011-05-18' observations[iter] # works fine, returns the row at that date. index(observations[iter[)

Re: [R] Unable to work with Rattle

2012-10-14 Thread Anindya Sankar Dey
Hi, You can download the package here http://cran.r-project.org/web/packages/XML/index.html Regards, Anindya On Sun, Oct 14, 2012 at 10:14 PM, balaji sarangarajan bala_...@hotmail.comwrote: Hello, I have installed R version 2.15.1 and I am trying to work with rattle package. I have

Re: [R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Jeff Newmiller
Asking questions and giving answers about R is what this mailing list is about. It is not really a theory list. If you understand the theory you can search among the libraries yourself. But when the first search I make brings up what to me looks like the answer to your question, then you either

Re: [R] how to show iterations

2012-10-14 Thread Pieter Schoonees
Have you tried other values for trace? Higher values will likely provide more information (depending on the method - BFGS here) - e.g. use trace = 2 or 3 etc instead of TRUE (which is similar to using 1). Optim calls an internal function (implemented in C I presume) so putting a print

Re: [R] how to show iterations

2012-10-14 Thread William Dunlap
The following shows how to use trace() to track and store information about evaluations of the objective function: https://stat.ethz.ch/pipermail/r-help/2010-September/252790.html Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From:

Re: [R] Date Math

2012-10-14 Thread Jeff Newmiller
?embed --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#..

Re: [R] Problems with coxph and survfit in a stratified model, with interactions

2012-10-14 Thread Terry Therneau
First, here is your message as it appears on R-help. On 10/14/2012 05:00 AM, r-help-requ...@r-project.org wrote: I?m trying to set up proportional hazard model that is stratified with respect to covariate 1 and has an interaction between covariate 1 and another variable, covariate 2. Both

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
Jeff, My understanding is that the lag command will lag an entire time series. That isn't what I'm looking for. I just want, for example, today, and 5 entries back. for exmple: iter - '2011-05-18' observations[iter] # works fine, returns the row at that date. index(observations[iter[)

Re: [R] transforming a .csv file column names as per a particular column rows using R code

2012-10-14 Thread Rui Barradas
Hello, Try the following. dta1 - read.csv( text= Tool,Step_Number,Data1,Data2 A,1,0,1 A,2,3,2 A,3,2,3 B,1,3,2 B,2,1,2 B,3,3,2 ) sp - split(dta1[-2], dta1$Tool) dta2 - do.call(rbind, lapply(sp, function(x) as.vector(unlist(t(x) dta2 - data.frame(dta2, stringsAsFactors = FALSE) idx -

Re: [R] transforming a .csv file column names as per a particular column rows using R code

2012-10-14 Thread arun
HI, If you need the Tool column repeated, Try this: dat1-read.table(text= Tool Step_Number Data1 Data2 Data3 A 1 0 1 2 A 2 3 1 4  A 3 2 1 3 B 1 3 2 1 B 2 1 2 3 B 3 3 2 0 ,sep=,header=TRUE,stringsAsFactors=FALSE)     dat3-with(dat1,aggregate(dat1[,3:5],list(Tool=Tool),function(x) x)) dat3

Re: [R] Is there any R package that contains Rusboost based on Adaboost.m2?

2012-10-14 Thread Carlos Andrade
Dear Jeff Newmiller, I apologize if then I did not clarify what I am looking properly. I used the combination you suggested in the query but I did not see any of the resultings adressing what I asked in my title: Rusboost implemented over AdaBoost.M2. Searching for the words 'rusboost',

Re: [R] listing the files in a directory using regular expressions

2012-10-14 Thread Gabor Grothendieck
On Sun, Oct 14, 2012 at 8:03 AM, siddu479 onlyfordigitalst...@gmail.com wrote: Hi Gabor, Thanks for your reply.. *glob2rx()* function works for my requirement to address global pattern(using *) of files like we use in Unix shell. Sidda Also Sys.glob may be useful here.

Re: [R] Poisson Regression: questions about tests of assumptions

2012-10-14 Thread Eiko Fried
Thank you for the detailed answer, that was really helpful. I did some excessive reading and calculating in the last hours since your reply, and have a few (hopefully much more informed) follow up questions. 1) In the vignette(countreg, package = pscl), LLH, AIC and BIC values are listed for the

Re: [R] Poisson Regression: questions about tests of assumptions

2012-10-14 Thread Joshua Wiley
Hi Eiko, This is not a direct response to your question, but I thought you might find these pages helpful: On negative binomial: http://www.ats.ucla.edu/stat/R/dae/nbreg.htm and zero inflated poisson: http://www.ats.ucla.edu/stat/R/dae/zipoisson.htm In general this page lists a variety of

Re: [R] Poisson Regression: questions about tests of assumptions

2012-10-14 Thread Wensui Liu
just a side note for your 4th question. for a small sample, clarke test instead of vuong test might be more appropriate and the calculation is so simple that even excel can handle it :-) On Sun, Oct 14, 2012 at 12:00 PM, Eiko Fried tor...@gmail.com wrote: I would like to test in R what

Re: [R] party for prediction [REPOST]

2012-10-14 Thread Ed
This was an exceptionally helpful answer, I can only thank you again. I have plenty of avenues ahead where I was worried before I was getting trapped in a dead end. If all else fails, the idea of using anova is brilliant. Thank you! Ed On 14 October 2012 18:36, Achim Zeileis

Re: [R] Columns and rows

2012-10-14 Thread Santana Sarma
Thank you everyone for your response. However, for my actual spreadsheet where the rows are of unequal length, I was getting blanks (e.g., while combining multiple rows into a single column). Thus, I added just one line to the final object to avoid getting such blanks. blankLess - dat2

[R] (no subject)

2012-10-14 Thread Erin Hodgess
-- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] installing spsurvey, rgeos on Ubuntu

2012-10-14 Thread Erin Hodgess
Dear R People: I'm trying to install spsurvey and rgeos in R-2.15.1 on Ubuntu 12.04. However, I am getting the following: * installing *source* package ‘rgeos’ ... ** package ‘rgeos’ successfully unpacked and MD5 sums checked checking geos-config usability... ./configure: line 1342:

[R] installing spsurvey, rgeos on Ubuntu SOLVED

2012-10-14 Thread Erin Hodgess
Dear R People: Here is the answer sudo apt-get install proj sudo apt-get install gdal-bin sudo apt-get install libxml2-dev And all is well to install the R packages. -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: