Re: [R] Error in rowMeans function

2012-10-14 Thread PIKAL Petr
Hi I did not use cfa function, the former poster (Catherine)did and I only advised almost the same as you did. Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of yrosseel > Sent: Monday, October 15, 2012 8:40 AM

Re: [R] Error in rowMeans function

2012-10-14 Thread yrosseel
On 10/15/2012 08:28 AM, PIKAL Petr wrote: Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Gunsalus, Catherine Sent: Friday, October 12, 2012 8:52 PM To: r-help@r-project.org Subject: [R] Error in rowMeans function Hello, I a

Re: [R] How to get rid of page 1 and 4 i.e Only dots pages while generating the graphs?

2012-10-14 Thread PIKAL Petr
Hi > > While I am generating graphs for the above data I am getting four > graphs in four pages in a pdf with the following programme. > > Page1: Only dots (No lines) > Page2: Lines observed > Page3: Lines observed > Page4: Only dots (No lines) > > I want to get rid of page 1 and 4 i.e Only d

Re: [R] Error in rowMeans function

2012-10-14 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Gunsalus, Catherine > Sent: Friday, October 12, 2012 8:52 PM > To: r-help@r-project.org > Subject: [R] Error in rowMeans function > > Hello, > I am trying to create parcels

Re: [R] party for prediction [REPOST]

2012-10-14 Thread Achim Zeileis
On Sun, 14 Oct 2012, Ed wrote: 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! No prob. Just for the record,

Re: [R] Date Math

2012-10-14 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Noah Silverman > Sent: Sunday, October 14, 2012 7:14 PM > To: R-help@r-project.org > Subject: [R] Date Math > > Hello, > > > I have a time series object (xts) that I iterat

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have two within-subject factors A and B, and covariate CV, and wanna run an ANCOVA on the dependent variable DV. my code is: ancova=aov(DV~factor(A)*factor(B)+CV+Error(factor(subject)/(factor(A)*factor(B))),data=data) Is that correct? -- View this message in context: http://r.78969

[R] performance analytics

2012-10-14 Thread sheenmaria
hi Michael, am sorry for the incomplete reply . csv file data havinmg like this , >getSymbols("IBM") >weekly_data = to.weekly(week_name) >dataframe=data.frame(weekly_data) >outputfile_name="F:\\R-programs\\Outputfile.csv" >write.table(dataframe, file =outputfile_name,sep = ",",col

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have 2 factors A and B, and the covariate CV, and wanna run an within-subject ANCOVA on the dependent variable DV. Previously my ANOVA was anova=aov(DV~factor(A)*factor(B)+Error(factor(subject)/(factor(A)*factor(B))),data=data) how do I modify this code to included a covariate CV to run

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

2012-10-14 Thread Achim Zeileis
On Sun, 14 Oct 2012, Eiko Fried wrote: 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

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

2012-10-14 Thread siddu479
Hi Jeff Newmiller, The script given by you is perfect for my requirement. The rest of the scripts given by other authors are failing to format the file header which are giving like eachdatacolumn.1 or eachdatacolumn.2 etc, whereas I need them as eachdatacolumn_firstactualstepnumber, eachdata

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have two within-subject factors A and B, and covariate CV, and wanna run an ANCOVA on the dependent variable DV. my code is: ancova=aov(DV~factor(A)*factor(B)+CV+Error(factor(subject)/(factor(A)*factor(B))),data=data) Is that correct? -- View this message in context: http://r.789695

Re: [R] How to handle Chinese character in R plot?

2012-10-14 Thread Manish Gupta
I just noticed chinese characters are not printed by using this. Some other characters gets printed on axis as shown below for the sugested solution. x <- read.csv(textConnection("名称,类,学生 木材,2,2 表,3,4 笔,4,2 垃圾桶,5,6 杯,6,3"), header = TRUE) rownames(x) <- x[,1] x <- x[,-1] barplot(t(x),

[R] problem in installing RMySQL

2012-10-14 Thread sagarnikam123
i m installing pkg but get error like this > install.packages("RMySQL") Installing package(s) into ‘/home/trendwise/R/x86_64-pc-linux-gnu-library/2.13’ (as ‘lib’ is unspecified) trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/RMySQL_0.9-3.tar.gz' Content type 'application/x-gzip' length 165363

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

2012-10-14 Thread David L Carlson
You can also get the Tool column repeated by tricking reshape() into letting you use Tool in the v.name and idvar arguments: > 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 + ") # Repeat the first column. R will append .1 to the

Re: [R] Function hatTrace in package lme4

2012-10-14 Thread Ben Bolker
ingaschwabe gmail.com> writes: > > Dear all, > > For a project I need to calculate the conditional AIC of a mixed effects > model. > Luckily, I found a reference in the R help forum for a function to be used: > > CAIC <- function(model) { > > sigma <- attr(VarCorr(model), 'sc') >

Re: [R] decomposing an irregularly spaced time series

2012-10-14 Thread andreas29
I have spent quite some time building a general framework for unevenly-spaced time series. The methods do not rely on a transformation to equally-spaced data, but allow to analyze unevenly-spaced time series in their unaltered form. Please see http://www.eckner.com/research.html for my notes. In a

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

2012-10-14 Thread arun
HI, Just a modification of the column names.  I noticed that the "Data." column starts with "2".  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,ag

Re: [R] nls NAs

2012-10-14 Thread Elizabeth Webb
Hello all- I got some help on this. While it did not fix the problem with nls, one can get around the problem by creating a data frame with the NAs excluded. As follows: goodidx<-which(! is.na(warming$T10cm)) warming2<-warming[goodidx,] warm.10<-nls(umoles60~alpha*exp(beta*T10cm),start = start,

Re: [R] Problem with a submission to jss

2012-10-14 Thread Christophe Genolini
Le 14/10/2012 00:00, Duncan Murdoch a écrit : On 12-10-13 3:20 PM, Christophe Genolini wrote: Hi the list, I am about to submit an article describing an R package to the Journal of Statistical Software but I encounter a strange behavior of LaTeX: the numbering of the figure is correct (1. 2.

Re: [R] average duplicated rows?

2012-10-14 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Pieter Schoonees > Sent: Friday, October 12, 2012 6:19 PM > To: Vining, Kelly; r-help@r-project.org > Subject: Re: [R] average duplicated rows? > > You will have to split() t

[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: e

[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: geos-config:

[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 po

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 [-which(d

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 wrote: > On Sun, 14

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 wrote: > I would like to test in R what regression fits my data

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 dif

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

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 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] 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', 'smoteboos

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)) d

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 <- r

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] 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 va

Re: [R] Date Math

2012-10-14 Thread Jeff Newmiller
?embed --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer

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: r-help-boun...@r-proje

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 statemen

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] 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 wrote: > > > > Hello, > > > > I have installed R version 2.15.1 and I am trying to work with > rattle package. I have got an error

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] 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] 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 > 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, th

[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))   To

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 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

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] 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] 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 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 y1. I kn

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 informa

[R] How to transform the paths of MST {ape} in SpatialLines objects {sp} ?

2012-10-14 Thread Cleber N.Borges
Hello all, I would like to transform the paths of MST {ape} in SpatialLines objects. But I don't understand the mechanical procedure in SpatialLines-class of 'sp' package. Please, somebody can help me? Thanks in advanced. Cleber N.Borges ### my (half) trial library(sp); library(ape) # for

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 ma

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 fail

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 fo

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 Statisti

[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 fi

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 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 are > categorical (m

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

2012-10-14 Thread siddu479
Hello all, I have a .csv file like below. Tool,Step_Number,Data1,Data2... etc up to 100 columns. A,1,0,1 A,2,3,1 A,3,2,1 . . B,1,3,2 B,2,1,2 B,3,3,2 . . .. so on upto 50 rows where the column "*Tool*" has distinct steps in second column "*Step_Number*",but both have same entries in Step_Numbe

Re: [R] dotchart ordering problem

2012-10-14 Thread Zenonn87
1000x Thanks for all of your helps! All of it workd perfectly! :) -- View this message in context: http://r.789695.n4.nabble.com/dotchart-ordering-problem-tp4646038p4646138.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pr

[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 # hea

[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 c

[R] error: unable to load installed packages

2012-10-14 Thread Alex Luya
When I tried to run r console in eclipse,got this error: -- Please make sure that R package 'rj' (1.1 or compatible) is installed... So I tried to intall it in R console like this: ---

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

2012-10-14 Thread Shant Ch
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 y1. I know the following is correct, but for large vectors, this won't work effi

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

2012-10-14 Thread siddu479
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 -- View this message in context: http://r.789695.n4.nabble.com/listing-the-files-in-a-directory-using-regular-expressions-tp464

[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 impor

[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. U

[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 appreciated

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] 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 R

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

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 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 > interpolations for e

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

[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 t

[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

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 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 ? > I tried like this list

[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] 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: Hel

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 "l

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

2012-10-14 Thread Jeff Newmiller
options(error = recover) --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing

[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,

[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))