Re: [R] Tobit Fixed Effects

2011-09-15 Thread Joshua Wiley
On Wed, Sep 14, 2011 at 11:56 PM, Daniel Malter wrote: > Not satisfactory in which sense? > > The survreg(Surv(Value,Censoring)~indvars+strata(id)) should/may work. For a or cluster(year) if you have a new sample of people in each year > discussion of Tobit fixed effects, see also Greene's websi

[R] Creating a map with central Asian countries

2011-09-15 Thread Salaam Batur
Dear all, I am trying to create a map for central asian countries(Kazakhstan, Uzbekstan, Kyrgyzstan, Turkmenstan, and Tajikstan). I tried google for shapefiles and Rdata files of central asia, but I can't seem to find them. There is only a world map and individual maps for each countries. If I use

[R] Can't get installing a package source (.tar.gz) from a web page to work...

2011-09-15 Thread Søren Højsgaard
I have created an R-package with datasets which I want my students to install (the package is not on CRAN). 1) I've put the package on the web in a directory called 'data' and I thought I could do: > install.packages("http://gbi.agrsci.dk/statistics/courses/2011-ISMLS-course/data/LiSciData_0.0

Re: [R] Can't get installing a package source (.tar.gz) from a web page to work...

2011-09-15 Thread Uwe Ligges
On 15.09.2011 10:34, Søren Højsgaard wrote: I have created an R-package with datasets which I want my students to install (the package is not on CRAN). 1) I've put the package on the web in a directory called 'data' and I thought I could do: install.packages("http://gbi.agrsci.dk/statistic

Re: [R] Creating a map with central Asian countries

2011-09-15 Thread Barry Rowlingson
On Thu, Sep 15, 2011 at 8:41 AM, Salaam Batur wrote: > Dear all, > > I am trying to create a map for central asian countries(Kazakhstan, > Uzbekstan, Kyrgyzstan, Turkmenstan, and Tajikstan). I tried google for > shapefiles and Rdata files of central asia, but I can't seem to find them. > There is

Re: [R] Creating a map with central Asian countries

2011-09-15 Thread Gesmann, Markus
Salaam, If you would like to display the chart online than the googleVis package might be helpful. The package provides you with an interface to the Google Visualisation API. Here is an example with a map of the population on the central Asian countries: library(googleVis) ## googleVis comes wit

Re: [R] Weibull point process

2011-09-15 Thread Torbjørn Ergon
On Thu, 15 Sep 2011 09:47:35 +1200, Rolf Turner wrote: On 15/09/11 07:21, Torbjørn Ergon wrote: Dear list, I'm looking for a function to generate (simulate) a random Weibull point process. Can anyone help? Cheers, Torbjørn Ergon, University of Oslo Do you mean a renewal process with the

Re: [R] Force regression line to a 1:1 relationship

2011-09-15 Thread RCulloch
Many thanks to all of you! AV plots are what I am trying to plot. Perhaps to reduce confusion I can give you an example of what I am doing: I am looking at behaviour of re-sighted individuals over two time points. I use lm() on these data and obtain the residuals. Then I am interested to know wh

Re: [R] Weibull point process

2011-09-15 Thread Torbjørn Ergon
Thanks Ken! This was not exactly what I was after - see my reply to Rolf Turner. Sorry for not explaining this well enough. Cheers, Torbjørn On Wed, 14 Sep 2011 16:37:48 -0400, Ken Hutchison wrote: I don't know if this settles the matter, but if you are modeling Weibull as the Log-Inten

[R] Move the x-axis labels to the top of the dotplot

2011-09-15 Thread markm0705
Dear R helpers I would like to move the x-axis labels, which plot automatically at the base of a dot plot to the top of the plot. Is there a way to do this? Code snippet below with(Cal_dat, dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt, fill_var = Commodity,

Re: [R] How to understand the plotting of the cox.zph function

2011-09-15 Thread Jim Trabas
Any insight maybe (sorry for the bump, need this info), JT. -- View this message in context: http://r.789695.n4.nabble.com/How-to-understand-the-plotting-of-the-cox-zph-function-tp376p3814881.html Sent from the R help mailing list archive at Nabble.com. __

[R] Courses in R

2011-09-15 Thread Marion Wenty
Hello, I have a question concerning courses in R in *Vienna, Austria*. Does anyone know where courses in R are offered, that you can do after having attended a course for the basics? Thanks in advance for your help. Marion [[alternative HTML version deleted]] _

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Felipe Nunes
Let me explain my problem: I have a data set of municipalities from 2002 to 2010. For each municipality I have the amount of money per capita invested in infra-structure for each year. This variable is truncated at zero, as there is no negative values for investment and there are many cases in whic

[R] Move the main titel to the left of the plot

2011-09-15 Thread markm0705
Dear R helpers I wish to move the main title, which appears on a dotplot to be right aligned with the left axis. Is there are parameter associated with dotplot 'main' that allows the title to be placed where I want it? Code snippet relating to dotplot is below. with(Cal_dat, dotplot(reorder

Re: [R] Loops

2011-09-15 Thread Fred
Thank you so much! foreL<-8 b0f<-matrix(nrow=9, ncol=foreL) ct<-1 ### use this as the index of b0f for(ar.ord in 1:3){ for(ma.ord in 1:3){ b0f[ct,]<-c(predict(arima(para_qtr[1:(n-8),1],order=c(ar.ord,1,ma.ord)), n.ahead=foreL)$pred) ct<-ct+1 ### increment the counter } } this one works! Best rega

[R] qplot(model)

2011-09-15 Thread behave
hi R Community Is it possible to plot a model using the ggplot2 package. Something like: x<-rnorm(100) y<-rnorm(100) fit<-lm(y~x) plot(fit) but with ggplot2 qplot(fit)? thanks michael -- View this message in context: http://r.789695.n4.nabble.com/qplot-model-tp3815060p3815060.html Sent from t

[R] Colour code y-axis labels on a dot plot

2011-09-15 Thread markm0705
Dear R helpers I would like to be able to colour code the y-axis labels on a complex dot plot by a variable known as company (of which there are only two). The code is below and data attached. Thanks MarkM library("lattice") library(latticeExtra) # for mergedTrellisLegendGrob() # set size of

Re: [R] qplot(model)

2011-09-15 Thread behave
problem solved ?fortify -> examples thanks Michael -- View this message in context: http://r.789695.n4.nabble.com/qplot-model-tp3815060p3815113.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https:/

[R] R toolbar turned grey (Tinn R 2.3.7.1)

2011-09-15 Thread comtei
Hello I have just installed Tinn R 2.3.7.1. on my new computer. But the R toolbar has turned grey, which never happened with my previous computer. I don't know why it turned grey. Any help? Thank you. __ R-help@r-project.org mailing list https://st

Re: [R] Weibull point process

2011-09-15 Thread Rolf Turner
On 15/09/11 19:24, Torbjørn Ergon wrote: On Thu, 15 Sep 2011 09:47:35 +1200, Rolf Turner wrote: On 15/09/11 07:21, Torbjørn Ergon wrote: Dear list, I'm looking for a function to generate (simulate) a random Weibull point process. Can anyone help? Cheers, Torbjørn Ergon, University of Oslo

[R] garchFit

2011-09-15 Thread user84
Hi, i am a student of tecnical mathematics in austria, and my english is not sooo good, German would be easier, but an answer in english is perfect too. I would need any help to understand the exact output of the function "garchFit". Maybe it would help me just to know what the coefficients are

Re: [R] Optimization package

2011-09-15 Thread Paul Hiemstra
On 09/14/2011 10:37 PM, Diviya Smith wrote: > Hi there, > > I have a complex math equation which does not have a closed form solution. > It is - > > y <- (p*exp(-a*d)*(1-exp((d-p)*(a-x[1]/((p-d)*(1-exp(-p*(a-x[1] > > For this equation, I have all the values except for x[1]. So I need to so

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Arne Henningsen
Dear Felipe On 15 September 2011 09:58, Felipe Nunes wrote: > My technical problems were: > > (1) tob3 <- censReg(transfers.cap ~ factor(mayor) + vot.weight + vot.per + > transfers.cap.lag + pib.cap + cluster(factor(year)), left=0, data = pool) > > Using 'censReg' my results never converge. Std.

[R] MCMCglmm heteroscedasticity dependent on predictor

2011-09-15 Thread Atle Torvik Kristiansen
Hi, I have a dataset where the residual variance decreases with on one of the predictors (population size). Currently, the full model looks like this: prior<-list(R=list(V=1e-16, nu=-2),G1=list(V=diag(2), nu=2)) m<-MCMCglmm(response~poly(population size,2)*poly(other predictor,2)+time, random=~

Re: [R] Hints for Data Mining

2011-09-15 Thread Abhijit Dasgupta
Please see the R Machine Learning Task View (http://cran.r-project.org/web/views/MachineLearning.html) for a starting point on decision trees. On 9/14/2011 7:11 PM, Lorenzo Isella wrote: > Dear All, > I am recycling a previous email of mine where I asked some questions > about clustering mixed

Re: [R] Questons about 'igraph' package

2011-09-15 Thread Gábor Csárdi
The 'name' attribute is not used for vertex labels by default. If you want to use it, you need to set it as the 'label' attribute as well, or supply them in the function call: tkplot(graph, vertex.label=V(graph)$name) Best, Gabor On Wed, Sep 14, 2011 at 7:11 PM, karena wrote: > Hi, > > I am usi

Re: [R] linear probability model

2011-09-15 Thread Adam Copella
Many thanks! Adam 2011/9/14 Achim Zeileis > On Wed, 14 Sep 2011, Adam Copella wrote: > > Dear All, >> >> Is there any function in R for fitting linear probability model, as my >> response variable is a uniformly distributed. >> > > If it is really uniformly distributed, I think there is not muc

[R] Strange pdf() in Fedora 15

2011-09-15 Thread Petar Milin
Hello useRs! Recently, I migrated from Debian i386 to Fedora 15 64-bit, after a long and happy experiences with Debian distributions (first Ubuntu, later Debian itself). I installed R with yum install R, and then necessary packages. Everything seems to work fine, for now, except that exporting plot

Re: [R] Strange pdf() in Fedora 15

2011-09-15 Thread Marc Schwartz
On Sep 15, 2011, at 7:06 AM, Petar Milin wrote: > Hello useRs! > Recently, I migrated from Debian i386 to Fedora 15 64-bit, after a long > and happy experiences with Debian distributions (first Ubuntu, later > Debian itself). I installed R with yum install R, and then necessary > packages. Everyth

[R] odfWeave: Combining multiple output statements in a function

2011-09-15 Thread Jan van der Laan
What is the correct way to combine multiple calls to odfCat, odfItemize, odfTable etc. inside a function? As an example lets say I have a function that needs to write two paragraphs of text and a list to the resulting odf-document (the real function has much more complex logic, but I don'

Re: [R] Nonlinear Regression

2011-09-15 Thread John C Nash
optim() optimx package minpackLM package and several others JN On 09/15/2011 06:00 AM, r-help-requ...@r-project.org wrote: > Message: 77 > Date: Wed, 14 Sep 2011 20:44:16 +0100 > From: Liam Brown > To: r-help@r-project.org > Subject: [R] Nonlinear Regression > Message-ID: > > Content-Typ

Re: [R] MCMCglmm heteroscedasticity dependent on predictor

2011-09-15 Thread Ben Bolker
Atle Torvik Kristiansen gmail.com> writes: > I have a dataset where the residual variance decreases with on one of > the predictors (population size). > > Currently, the full model looks like this: > > prior<-list(R=list(V=1e-16, nu=-2),G1=list(V=diag(2), nu=2)) > > m<-MCMCglmm(response~poly(p

[R] Allocation of data points to groups based on membership probabilities

2011-09-15 Thread Michael Haenlein
Dear all, I have a matrix that provides, for a series of data points, the probability that each of these points belongs to a certain group. Take the following example, which represents 20 data points and their group membership probability to five groups (A-E): set.seed(1) probs <- matrix(runif(10

Re: [R] Can 'mosaic' be used with a continuous variable?

2011-09-15 Thread Michael Friendly
Hi Mauricio On 9/14/2011 2:10 PM, Mauricio Cornejo wrote: Thanks Z. Let me clarify my problem a bit further ... as I don't think I could use cut() or spine() to solve it. I have a data frame with three columns (A, B, Value). 'A' and 'B' are categorical and 'Value' is continuous and non-nega

Re: [R] help with hclust

2011-09-15 Thread Marcelino de la Cruz
>From: Madeleine Seeland in.tum.de> >Subject: help with hclust >Date: 2011-09-14 08:14:48 GMT >Hello, > >I have two questions regarding hclust: > >1) First I would like to cut a hclust tree at a specific height and receive the cluster (di) similarity at this >height. With an example:

[R] difftime on vector

2011-09-15 Thread bradford
How can I apply difftime to a vector of sorted dates? I can do this just fine with diff, but difftime doesn't seem to take in a vector. > diff(r$BOOKING_DATE) Works. Great! > difftime(r$MY_DATE, units="days") Error in as.POSIXct(time2) : argument "time2" is missing, with no default Thanks, Bra

[R] Nonlinear regression question

2011-09-15 Thread Tatiana Donnay
Hello, If I understand good, I can't have p-value for the nls model. I have 2 vectors. And I'am doing model <- nls(crf ~a*(1-exp(-x/b)) + c, data= d, start = list(a=1, b=3, c=0)) and I want to know If my result is significat, if I can't have p-value, how can I know it? Thank y

[R] p-value for non linear model

2011-09-15 Thread Tatiana Donnay
Hello, I want to understand how to tell if a model is significant. For example I have vectX1 and vectY1. I seek first what model is best suited for my vectors and then I want to know if my result is significant. I'am doing like this: model1 <- lm(vectY1 ~ vectX1, data= d), model2 <- nls(vectY1

Re: [R] Force regression line to a 1:1 relationship

2011-09-15 Thread Bert Gunter
This sounds like you need a mixed effects model (e.g. lme or lmer instead of lm) instead of the possibly spurious adhocery that you describe. I suggest you post your message on the SIG-mixed-effects list and/or get help from a local statistician Cheers, Bert On Thu, Sep 15, 2011 at 1:49 AM, RCull

Re: [R] p-value for non linear model

2011-09-15 Thread Bert Gunter
Tatiana: It sounds like you are in way over your head statistically. This is not a statistics tutorial site (though sometimes good folks do help witjh this). I suggest you try http://stats.stackexchange.com/ . Better yet, work with your local statistician. Cheers, Bert On Thu, Sep 15, 2011 at 6

[R] How to compute the power of a wilcoxon test?

2011-09-15 Thread tn85
Hello All, I posted a similar question before, but the direction was driven to whether my case is suitable for a wilcoxon test. After research about the appropriateness, I am pretty sure that a wilcoxon test is the right tool for my case. But how to compute the power of the test is still an unansw

Re: [R] S4 vs Reference Classes

2011-09-15 Thread Steve Lianoglou
Hi Joseph (and Martin), Don't mean to beat a dead horse, but I wanted to add one last comment to this thread in case someone stumbles upon this via google/gmane (or you) and gives it a shot. I neglected to mention a very important step that you'd have to do to in order to avoid shooting yourself

Re: [R] difftime on vector

2011-09-15 Thread jim holtman
You need to supply two vectors: > x <- seq(Sys.time(), by = '10 min', length = 10) > x [1] "2011-09-15 09:58:30 EDT" "2011-09-15 10:08:30 EDT" "2011-09-15 10:18:30 EDT" [4] "2011-09-15 10:28:30 EDT" "2011-09-15 10:38:30 EDT" "2011-09-15 10:48:30 EDT" [7] "2011-09-15 10:58:30 EDT" "2011-09-15 11

Re: [R] problem with predict.gam in package gam

2011-09-15 Thread Gavin Simpson
On Wed, 2011-09-14 at 18:06 -0500, Drew Tyre wrote: > I am trying to reproduce plots in Chapter 3 of Zuur et al Mixed > Effects models and extensions in Ecology. For pedagogical reasons, > they make a series of plots with gam(...) in package gam. I encounter > errors that trace back to the predict.

Re: [R] odfWeave: Combining multiple output statements in a function

2011-09-15 Thread Max Kuhn
There are examples in the package directory that explain this. On Thu, Sep 15, 2011 at 8:16 AM, Jan van der Laan wrote: > > What is the correct way to combine multiple calls to odfCat, odfItemize, > odfTable etc. inside a function? > > As an example lets say I have a function that needs to write

[R] Where to put tryCatch or similar in a very big for loop

2011-09-15 Thread Bonnett, Laura
Dear all, I am running a simulation study to test variable imputation methods for Cox models using R 2.9.0 and Windows XP. The code I have written (which is rather long) works (if I set nsim = 9) with the following starting values. >bootrs(nsim=9,lendevdat=1500,lenvaldat=855,ac1=-0.19122,bc1=-

Re: [R] How to compute the power of a wilcoxon test?

2011-09-15 Thread peter dalgaard
On Sep 15, 2011, at 15:47 , tn85 wrote: > Hello All, > > I posted a similar question before, but the direction was driven to whether > my case is suitable for a wilcoxon test. After research about the > appropriateness, I am pretty sure that a wilcoxon test is the right tool for > my case. But h

Re: [R] How to compute the power of a wilcoxon test?

2011-09-15 Thread tn85
Thank you, Peter. They are empirical quantities, that's why I felt confused as being requested to give the power of my test. Could you please clarify the reason why power calculations are not fit for empirical quantities? So that I can defend my test for such request. BTW, the correlation of th

Re: [R] Where to put tryCatch or similar in a very big for loop

2011-09-15 Thread Steve Lianoglou
Hi Laura, On Thu, Sep 15, 2011 at 10:53 AM, Bonnett, Laura wrote: > Dear all, > > I am running a simulation study to test variable imputation methods for Cox > models using R 2.9.0 and Windows XP.  The code I have written (which is > rather long) works (if I set nsim = 9) with the following sta

Re: [R] x %>% y as an alternative to which( x > y)

2011-09-15 Thread Greg Snow
One additional thing to note is that %>% will have different precedence than > (something that was pointed out to me based on %<% that is in the TeachingDemos package). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Or

Re: [R] Colour code y-axis labels on a dot plot

2011-09-15 Thread Carlos Ortega
Hi, You can use scales() and parametrize it with a list where you can define colors, fonts, etc. I could not test it on your code because variable "Commodity" is not present in the dataset you provided. Regards, Carlos Ortega www.qualityexcellence.es On Thu, Sep 15, 2011 at 11:03 AM, markm0705

[R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
Hello useRs, I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile. All plain R code no compilations. Using win XP with a full cygwin install and R2.12 I first did package.skeleton("mypack",list="getdfv", namespace=T) # just a single func w

Re: [R] Where to put tryCatch or similar in a very big for loop

2011-09-15 Thread Bonnett, Laura
Hi Steve, Thanks for your response. The slight issue is that I need to use a different starting seed for each simulation. If I use 'lapply' then I end up using the same seed each time. (By contrast, I need to be able to specify which starting seed I am using). Thanks, Laura -Original M

Re: [R] how to install a locally built package

2011-09-15 Thread Uwe Ligges
On 15.09.2011 17:32, Bond, Stephen wrote: Hello useRs, I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile. All plain R code no compilations. Using win XP with a full cygwin install and R2.12 I first did package.skeleton("mypack",list=

Re: [R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
Uwe, That gave me the same error like CMD install > install.packages("C:/Temp/mypack_1.0.tar.gz", repos=NULL, type="source") install.packages("C:/Temp/mypack_1.0.tar.gz", repos=NULL, type="source") Loading required package: stats Loading required package: utils Loading required package: graphics

[R] Unexpected behavior from which.max (or possibly max)

2011-09-15 Thread Jason Curole
Hi all, I was recently writing a script to identify the value and id of the maximum observation in a sliding window when I ran into some unexpected behavior. I have included an example. > test <- c() > test$elev <- c(1:200) > test$i <- 1 > test$window <- 10 The following works for me: > check.

[R] changing "label" in ggplot

2011-09-15 Thread Thomthom
Hi everyone, I'm trying to create a scatterplot (with ggplot2) with different groups and a faceting (see code below... much clearer I think) But when I want to change the color label to something else using the scale_colour_manual function (based on http://had.co.nz/ggplot2/scale_manual.html), it

Re: [R] Unexpected behavior from which.max (or possibly max)

2011-09-15 Thread Mario Valle
If I enclose x$i+x$window in parentheses it works: check.max<- function(x){obs.max<- which.max(x$elev[x$i:(x$i+x$window)]); obs.max} x$elev[x$i:x$i+x$window] means: x$elev[(x$i:x$i)+x$window] Simple. mario check.max(test) [1] 11 What am I missing? Here is sessionInfo (I

Re: [R] Model Selection with Phylogenetic Independent Contrasts

2011-09-15 Thread Ben Bolker
rjswift gmail.com> writes: > > I'm trying to select a model under PCA using independent contrasts. Since > PICs need to be forced through the origin I've been using lmorigin for the > original regression, but it doesn't appear that stepAIC recognizes it. I > keep receiving an error message - "Er

Re: [R] how to install a locally built package

2011-09-15 Thread Uwe Ligges
On 15.09.2011 17:47, Bond, Stephen wrote: Uwe, That gave me the same error like CMD install install.packages("C:/Temp/mypack_1.0.tar.gz", repos=NULL, type="source") install.packages("C:/Temp/mypack_1.0.tar.gz", repos=NULL, type="source") Loading required package: stats Loading required pack

Re: [R] import csv file into R, strange problem

2011-09-15 Thread bby2103
Thanks for all the input. You were right. It was not csv file in the correct format. As it turned out, it's not a R problem, more a MAC problem. For some reason, my MAC doesn't correctly download csv file from internet, which caused all the subsequent problems. I will have to take it to a m

Re: [R] how to install a locally built package

2011-09-15 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Bond, Stephen > Sent: Thursday, September 15, 2011 8:48 AM > To: Uwe Ligges > Cc: r-help@r-project.org > Subject: Re: [R] how to install a locally built package > > Uwe, > > Tha

[R] how to find unique pairs of variables?

2011-09-15 Thread bby2103
I have two variables, both numerical. I would like to find the unique values of the pairs, in other words, unique coordinates if I were to plot them. I also need to know how many pairs there are, but I guess I can use length() if I can somehow isolate the unique pairs first? Thanks a lot!

Re: [R] how to find unique pairs of variables?

2011-09-15 Thread Sarah Goslee
Hi Bonnie, ?unique probably would have done the trick for you. But here's an example: > z <- data.frame(x = rep(1:5, each=2), y = rep(1:2, each=5)) > z x y 1 1 1 2 1 1 3 2 1 4 2 1 5 3 1 6 3 2 7 4 2 8 4 2 9 5 2 10 5 2 > unique(z) x y 1 1 1 3 2 1 5 3 1 6 3 2 7 4 2 9 5 2 > nrow(unique(z

Re: [R] how to find unique pairs of variables?

2011-09-15 Thread Bert Gunter
Bonnie: 1. As usual, see FAQ 7.31. unique() may not mean what you think it means for finite precision numbers: > unique(c(1/3, sqrt(2)*1/3/sqrt(2))) [1] 0.333 0.333 But modulo that: unique(paste(v1,v2)) will give you what you're looking for I think. -- Bert On Thu, Sep 15, 2011 at 9:27

Re: [R] how to find unique pairs of variables?

2011-09-15 Thread David Winsemius
On Sep 15, 2011, at 12:27 PM, bby2...@columbia.edu wrote: I have two variables, both numerical. I would like to find the unique values of the pairs, in other words, unique coordinates if I were to plot them. I also need to know how many pairs there are, but I guess I can use length() if

Re: [R] how to find unique pairs of variables?

2011-09-15 Thread Bert Gunter
I should try reading the Help page! Please ignore my prior "advice" -- except for the party about FAQ 7.31, which may still apply, of course. -- Bert On Thu, Sep 15, 2011 at 9:34 AM, Sarah Goslee wrote: > Hi Bonnie, > > ?unique probably would have done the trick for you. But here's an > exampl

Re: [R] Color barplots with a conditional?

2011-09-15 Thread Carlos Ortega
Hello, There are some specific examples included in the help of barplot() that answer your question. Regards, Carlos Ortega www.qualityexcellence.es On Wed, Sep 14, 2011 at 10:14 PM, Allie818 wrote: > I've made a barplot that has several bars. I'd like the bars to be colored > according to the

Re: [R] how to find unique pairs of variables?

2011-09-15 Thread bonnie yuan
David and Sarah, Both suggestions work beautifully. Thanks! Bonnie > CC: r-help@r-project.org > From: dwinsem...@comcast.net > To: bby2...@columbia.edu > Subject: Re: [R] how to find unique pairs of variables? > Date: Thu, 15 Sep 2011 12:41:03 -0400 > > > On Sep 15, 2011, at 12:27 PM, bby2...@c

Re: [R] Nonlinear regression question

2011-09-15 Thread Greg Snow
What null hypothesis are you trying to test? There is a standard null for linear models that makes sense in a large number of cases, but what the null is for non-linear regression is not obvious (and the coefficient = 0 may not even be possibly, let alone interesting). If you can state what yo

Re: [R] Unexpected behavior from which.max (or possibly max)

2011-09-15 Thread Duncan Murdoch
On 15/09/2011 10:40 AM, Jason Curole wrote: Hi all, I was recently writing a script to identify the value and id of the maximum observation in a sliding window when I ran into some unexpected behavior. I have included an example. > test<- c() > test$elev<- c(1:200) > test$i<- 1 > test$wind

Re: [R] Questons about 'igraph' package

2011-09-15 Thread karena
Thank you so much, Gabor. It works well! -- View this message in context: http://r.789695.n4.nabble.com/Questons-about-igraph-package-tp3814338p3816219.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

[R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread Mike Treglia
Dear List Members, I have created a function to run a simulation based on a given set of values within a vector, such that I run the function like this: new.data<-sapply(vector, function) In which I run 'function' on every value within a vector that I created. The result is a matrix of 1000

[R] (no subject)

2011-09-15 Thread tarq khhh
I have Q   how can I do integrate to BS where BS=1/m sum{(s(t|x)^2/g(t))+(1-s(t|x)^2)/g(t)}   lower=1, upper = 5 Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] (no subject)

2011-09-15 Thread R. Michael Weylandt
What does any of this mean? You might try integrate() Michael Weylandt On Thu, Sep 15, 2011 at 1:46 PM, tarq khhh wrote: > I have Q > > how can I do integrate to BS > where BS=1/m sum{(s(t|x)^2/g(t))+(1-s(t|x)^2)/g(t)} > > lower=1, upper = 5 > Thanks >[[alternative HTML version deleted

Re: [R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread jim holtman
It would seem you want something like this: new.data <- sapply(seq(10, 100, 10), function(i) sapply(vector, yourFunc, i)) On Thu, Sep 15, 2011 at 1:50 PM, Mike Treglia wrote: > Dear List Members, > > I have created a function to run a simulation based on a given set of values > within a vector,

Re: [R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
I got it working by typing a string in getdfv.Rd after \title{ \title{ getdf %% ~~function to do ... ~~ } Strange why the skeleton would not do that given it did \name{getdfv} \alias{getdfv} Anyway, I'm happy now. Stephen Bond -Original Message- From: Uwe Ligges [mailto:lig...@stati

Re: [R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread David Winsemius
On Sep 15, 2011, at 1:50 PM, Mike Treglia wrote: Dear List Members, I have created a function to run a simulation based on a given set of values within a vector, such that I run the function like this: new.data<-sapply(vector, function) In which I run 'function' on every value within a ve

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Arne Henningsen
On 15 September 2011 20:09, Felipe Nunes wrote: > I did both ways (pooled and pdata.frame), but in none I got a result. The > coefficients are estimated, but not the std. errors. I'm using BFGS method, > but I didn't increase the number of iterations yet. Let me try! ... and I highly recommend to

Re: [R] odfWeave: Combining multiple output statements in a function

2011-09-15 Thread Jan van der Laan
Max, Thank you for your answer. I have had another look at the examples (I already had before mailing the list), but could find the example you mention. Could you perhaps tell me which example I should have a look at? Regards, Jan On 09/15/2011 04:47 PM, Max Kuhn wrote: There are examples

[R] how to identify the value in a scatterplot?

2011-09-15 Thread bby2103
I'm plotting x and y and there are a couple of outliers. I want to show the value of z for these couple of outliers. Is there an easy way to do this? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] how to identify the value in a scatterplot?

2011-09-15 Thread Greg Snow
?identify -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of bby2...@columbia.edu > Sent: Thursday, September 15

Re: [R] How to compute the power of a wilcoxon test?

2011-09-15 Thread peter dalgaard
On Sep 15, 2011, at 17:15 , tn85 wrote: > Thank you, Peter. They are empirical quantities, that's why I felt confused > as being requested to give the power of my test. Could you please clarify the > reason why power calculations are not fit for empirical quantities? So that I > can defend my

Re: [R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread Michael L. Treglia
Thank you all- with your suggestions I was able to get this simulation to run- sorry, next time I'll post some reproduceable code- it had been a while since I posted, so I forgot about that. Best, Mike On 9/15/2011 1:40 PM, David Winsemius wrote: On Sep 15, 2011, at 1:50 PM, Mike Treglia wrot

[R] RGoogleMpas error

2011-09-15 Thread Gabriel Ibarra
I am trying to use RgoogleMaps but when I try to run the script example from "RgoogleMaps-intro.pdf -page 3" (see below) I get the following error "Error en plot.xy(xy.coords(x, y), type = type, ...) " I have tried to solve it but I am going crazy with this, because sometime in the past I made i

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Felipe Nunes
Hi Arne, I did both ways (pooled and pdata.frame), but in none I got a result. The coefficients are estimated, but not the std. errors. I'm using BFGS method, but I didn't increase the number of iterations yet. Let me try! Best, *Felipe Nunes* CAPES/Fulbright Fellow PhD Student Political Science

[R] legend with cofor-filled symbol

2011-09-15 Thread Duke
Hi folks, Please let me know what I am doing wrong. I want to have a legend with symbols that are filled with same color as the drawn line, but I failed to do that: plot(1:100, 1:100, pch=21, bg="red") legend("bottomright", "test", bty='n', pch=21, bg="red", col="red") It looks to me that th

Re: [R] Where to put tryCatch or similar in a very big for loop

2011-09-15 Thread Ken
What type of singularity exactly, if you're working with counts is it a special case? If using a Monte Carlo generation scheme, there are various workarounds such as while(sum(vec)!=0) {sample} for example. More info on the error circumstances would help. Good luck! Ken Hutchison On Sep

Re: [R] legend with cofor-filled symbol

2011-09-15 Thread Duke
On 9/15/11 4:40 PM, Duke wrote: Hi folks, Please let me know what I am doing wrong. I want to have a legend with symbols that are filled with same color as the drawn line, but I failed to do that: plot(1:100, 1:100, pch=21, bg="red") legend("bottomright", "test", bty='n', pch=21, bg="red", c

[R] Returning the name of an object passed directly or from a list by lapply

2011-09-15 Thread andrewH
Dear folks: Let’s suppose I want a function to print return the name of the object passed to it. > myname <- function(object) {out<-deparse(substitute(object)); out} This works fine on a single object: > O1 <-c(1:4) > myname(O1) [1] "O1" However it does not work if you use lapply to pass it th

Re: [R] installation of BiodiversityR package

2011-09-15 Thread B77S
My guess is that anyone willing to help will want more information. What version of R do you have(?), for example. BiodiversityR Depends on R version ≥ 2.13.1, and vegan ≥ 1.17-12 SG wrote: > > I have installed R on windows 7 machine. > In the install packages I can't find BiodiversityR pac

[R] Lattice xyplot log scale labels help!

2011-09-15 Thread Cram Rigby
I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the labels. A similar thread with Deepayan' recommendation is here: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/9865.html. For example, this code using xyplot

[R] R functions

2011-09-15 Thread sujitha
Hi group, I am trying to right a code to do the following This is how the test file looks like: Chr start end sample1 sample2 chr2 9896633 9896683 0 0 chr2 9896639 9896690 0 0 chr2 14314039 14314098 0 -0.35 chr2 14404467 14404502 0 -0.35 chr2 14421718 14421777 -0.43 -0.35 chr2 16031710 16031769 -0.

[R] question about glm vs. loglin()

2011-09-15 Thread Yana Kane-Esrig
Dear R gurus, I am looking for a way to fit a predictive model for a contingency table which has counts. I found that glm( family=poisson) is very good for figuring out which of several alternative models I should select. But once I select a model it is hard to present and interpret it, especia

[R] Problems with aggregate() function in stats package

2011-09-15 Thread Jon Zadra
Hi, I'm having some problems with the aggregate() function in the {stats} package, and the documentation doesn't address them. 1) Why would the first line work, but the second not? According to the help file, it accepts a "data=" argument. with(tsrc, aggregate(x=DistRatio, by=list(Conditi

[R] installation of BiodiversityR package

2011-09-15 Thread SG
I have installed R on windows 7 machine. In the install packages I can't find BiodiversityR package. I was wondering if I can get some help with the installation process. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/installation-of-BiodiversityR-package-tp3816807p381680

Re: [R] R functions

2011-09-15 Thread B77S
You'll never figure it out if you don't "play around" with your data. Assuming you have been able to import the data, a good place to start is to look at what tools you have available.Check out this: http://cran.r-project.org/doc/contrib/Short-refcard.pdf check out things like ?which ?max ?

Re: [R] Problems with aggregate() function in stats package

2011-09-15 Thread Marc Schwartz
On Sep 15, 2011, at 4:07 PM, Jon Zadra wrote: > Hi, > > I'm having some problems with the aggregate() function in the {stats} > package, and the documentation doesn't address them. > > 1) Why would the first line work, but the second not? According to the help > file, it accepts a "data=" argu

Re: [R] Returning the name of an object passed directly or from a list by lapply

2011-09-15 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of andrewH > Sent: Thursday, September 15, 2011 2:11 PM > To: r-help@r-project.org > Subject: [R] Returning the name of an object passed directly or from a list > by lapply > > Dea

[R] Questions on 'lme' function, urgent!

2011-09-15 Thread karena
Hi Dear all, I have some gene expression data samples from different tissue types --- - 120 samples from blood (B) - 20 samples from Liver (L) - 15 samples from Kidney (K) - 6 samples from heart (H) --- All the

  1   2   >