[R] Spatial Logit Model

2010-05-28 Thread Francisco Silva
Hello everybody, I am trying to do a spatial logit model with the spatially autoregressive error structure - SAE. Right now, I did an implementation and i would like to check the results. Somebody knows with there is a package in R that estimates parameters to spatial logit model with SAE structur

Re: [R] latex.rms and models fit with Gls

2010-05-28 Thread Frank E Harrell Jr
On 05/28/2010 05:31 PM, Dylan Beaudette wrote: On Friday 28 May 2010, Frank E Harrell Jr wrote: On 05/28/2010 03:49 PM, Dylan Beaudette wrote: Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what y

Re: [R] How to get the definition of a function if it is masked by a variable?

2010-05-28 Thread Greg Snow
?'::' -- 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-boun...@r- > project.org] On Behalf Of thmsfuller...@gmail.com > Sent: Friday, May 28, 2010 12

Re: [R] zipped files as a data type

2010-05-28 Thread David Scott
Ron Burns wrote: Hi all- I have a lot of small (xml) data files that are saved by classification in directories named in accordance with the classification. I would like to zip up these directories and include the zipped file as part of the data in a package (which I know how to do.) Are th

Re: [R] Installed directory of a package

2010-05-28 Thread David Scott
Ron Burns wrote: Hi all- Is there an R function that returns the directory in which a package has been installed? Thanks Ron ?system.file For example: > system.file(package="DistributionUtils") [1] "C:/Users/dsco036/R/win-library/2.10/DistributionUtils" David Scott -- _

Re: [R] splitting a factor in an analysis of deviance table (negative binomial model)

2010-05-28 Thread Walmes Zeviani
Sorry by the delay. You could do: > my.data <- expand.grid(A=factor(1:4), B=factor(1:4), rep=1:4) > my.data$y <- rbinom(my.data$A, 10, 0.5) > > model <- glm(cbind(y, 10-y)~A*B, family=binomial, data=my.data) > anova(model, test="Chisq" ) Analysis of Deviance Table Model: binomial, link: logit

Re: [R] clustering in R

2010-05-28 Thread Joris Meys
Ah OK, I didn't get your question then. a dist-object is actually a vector of numbers with a couple of attributes. You can't just cut out values like that. The hclust function needs a perfect distance matrix to use the calculations. shortcut is easy : just do f <- f/2*max(f), and all values are b

Re: [R] How to get the definition of a function if it is masked by a variable?

2010-05-28 Thread John Fox
Dear Tom, You can use getAnywhere(); for example: > mean <- 1 > getAnywhere("mean") 2 differing objects matching 'mean' were found in the following places .GlobalEnv package:base namespace:base Use [] to view one of them > getAnywhere("mean")[1] [1] 1 > getAnywhere("mean")[2] function (x

Re: [R] ICD9 codes

2010-05-28 Thread Frank E Harrell Jr
Your notes are bordering on harassment. Do you expect that everyone who reads this list will reply "I do not have anything that will help you" if they don't? By my count this is your 4th note asking for this help. That being said I hope that you do find help somewhere or implement it yoursel

Re: [R] latex.rms and models fit with Gls

2010-05-28 Thread Dylan Beaudette
On Friday 28 May 2010, Frank E Harrell Jr wrote: > On 05/28/2010 03:49 PM, Dylan Beaudette wrote: > > Hi, > > > > I have fit a model using the rms package with the Gls() function. > > > > Is there a way to get the model estimates, std errors, and p-values (i.e. > > what you get with print(fit)) int

Re: [R] clustering in R

2010-05-28 Thread Joris Meys
I can't run your code. Please, just give me whatever comes on your screen when you run: dput(q) On Fri, May 28, 2010 at 10:57 PM, Ayesha Khan wrote: > I assume my matrix should look something like this?.. > > >round(distance, 4) >P00A P00B M02A M02B P04A P04B M06A M06B P0

Re: [R] clustering in R

2010-05-28 Thread Ayesha Khan
I assume my matrix should look something like this?.. >round(distance, 4) P00A P00B M02A M02B P04A P04B M06A M06B P08A P08B M10A P00B 0.9678 M02A 1.0054 1.0349 M02B 1.0258 1.0052 1.2106 P04A 1.0247 0.9928 1.0145 0.9260 P04B 0.9898 0.9769 0.9875 0.9855 0.6075 M06A 1.0159 0.

Re: [R] clustering in R

2010-05-28 Thread Ayesha Khan
v <- dput(x,"sampledata.txt") dim(v) q <- v[1:10,1:10] f =as.matrix(dist(t(q))) distB=NULL for(k in 1:(nrow(f)-1)) for( m in (k+1):ncol(f)) { if(f[k,m] <2) distB=rbind(distB,c(k,m,f[k,m])) } #now distB looks like this > distB [,1] [,2] [,3] [1,]12 1.6275568 [2,]13 0

Re: [R] clustering in R

2010-05-28 Thread Ayesha Khan
Yes Joris. I did try that and it does produce the results. I am now wondering why I wanted a matrix like structure in the first place. However, I do want 'f' to contain values less than 2 only. but when i try to get rid of values greater than 2 by doing N <- (f[f<2], f strcuture disrupts and hclust

[R] ICD9 codes

2010-05-28 Thread Vishwanath Sindagi
Hello: I am working on getting some statistics related to clinical trials and stuff. I have to work with ICD9 codes. Is anyone aware of any R method that deals with ICD9 codes verification and manipulation. Thanks Vishwanath __ R-help@r-project.org ma

[R] How to get the definition of a function if it is masked by a variable?

2010-05-28 Thread thmsfuller...@gmail.com
Hello, Normally, if I type a function name, it shows the function definition. When the function is masked by a variable with the same name, it doesn't show the function definition any more. Can anyone please tell me a way how to retrieve the function definition even if it is masked by a variable?

Re: [R] clustering in R

2010-05-28 Thread Joris Meys
errr, forget about the output of dput(q), but keep it in mind for next time. f = dist(t(q)) hclust(f,method="single") it's as simple as that. Cheers Joris On Fri, May 28, 2010 at 10:39 PM, Ayesha Khan wrote: > v <- dput(x,"sampledata.txt") > dim(v) > q <- v[1:10,1:10] > f =as.matrix(dist(t(q)))

Re: [R] Data frame manipulation

2010-05-28 Thread LCOG1
Tal, Wow, i cant believe how many different manipulations i went through trying to coerce it into the format i wanted. The below works nearly perfectly, i had to change the "mean" call to "sum". Im curious why you used mean? Other than that thank you very much, i feel a little foolish ab

Re: [R] Drop observations in unbalanced panel data set according to missing values

2010-05-28 Thread David Winsemius
On May 28, 2010, at 5:58 PM, Christian Schoder wrote: Dear R-users, I use firm-level data in panel structure. I would like to drop all firms that have less than x observations over the time scale in any of the variables considered. I would appreciate any help that (a) indicates relevant

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Ted Harding
Linux problem solved! (For me at any rate). Thanks to some hints from my Linux contacts it transpires that the problem with sort << EOT "ABCD" "A CD" EOT # "ABCD" # "A CD" sort << EOT "ADCD" "A CD" EOT # "A CD" # "ADCD" arises because, by default, the " " is ignored in sorting. Therefore in the

[R] Drop observations in unbalanced panel data set according to missing values

2010-05-28 Thread Christian Schoder
Dear R-users, I use firm-level data in panel structure. I would like to drop all firms that have less than x observations over the time scale in any of the variables considered. I would appreciate any help that (a) indicates relevant literature or websites or (b) indicates the code that could s

Re: [R] leave-one-out cross validation

2010-05-28 Thread Joris Meys
see ?cv.glm under the heading "Value". The help files tell you what comes out. On Fri, May 28, 2010 at 10:19 PM, azam jaafari wrote: > Hi > > > Finally, I did leave-one-out cross validation in R for prediction error of > logistic regression by cv.glm. But I don't know what are the produced > dat

[R] zipped files as a data type

2010-05-28 Thread Ron Burns
Hi all- I have a lot of small (xml) data files that are saved by classification in directories named in accordance with the classification. I would like to zip up these directories and include the zipped file as part of the data in a package (which I know how to do.) Are there R functions fo

Re: [R] latex.rms and models fit with GLS

2010-05-28 Thread Frank E Harrell Jr
On 05/28/2010 03:49 PM, Dylan Beaudette wrote: Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex format? I have tried: f<- Gls(...) latex(f, file='') ... but

[R] Installed directory of a package

2010-05-28 Thread Ron Burns
Hi all- Is there an R function that returns the directory in which a package has been installed? Thanks Ron -- R. R. Burns Physicist (Retired) Oceanside, CA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Ted Harding > Sent: Friday, May 28, 2010 1:15 PM > To: r-help@r-project.org > Cc: carslaw > Subject: Re: [R] difference in sort order linux/Windows (R.2.11.0) > > On 28-May-10 14:

[R] latex.rms and models fit with GLS

2010-05-28 Thread Dylan Beaudette
Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex format? I have tried: f <- Gls(...) latex(f, file='') ... but I get the following error Error in replace.su

[R] R: why biomaRt cannot extract 3UTR sequences for 1941 ENSGxxxxx ?

2010-05-28 Thread mauede
-Messaggio originale- Da: Steve Lianoglou [mailto:mailinglist.honey...@gmail.com] Inviato: ven 28/05/2010 17.06 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] why biomaRt cannot extract 3UTR sequences for 1941 ENSGx ? Hi, Two things: 1. You mistakenly posted this

[R] leave-one-out cross validation

2010-05-28 Thread azam jaafari
Hi Finally, I did leave-one-out cross validation in R for prediction error of logistic regression by cv.glm. But I don't know what are the produced data(almost 700)? does delta show me error estimation? cost<-function(a,b)mean(abs(a-b)) #SALIC=binary response salic.lr<-glm(profilesample$SALI

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Ted Harding
On 28-May-10 14:37:39, Duncan Murdoch wrote: > On 28/05/2010 9:24 AM, (Ted Harding) wrote: >> An experiment: >> >> sort(c("AACD","A CD")) >> # [1] "AACD" "A CD" >> >> sort(c("ABCD","A CD")) >> # [1] "ABCD" "A CD" >> >> sort(c("ACCD","A CD")) >> # [1] "ACCD" "A CD" >> >> sort(c("ADC

Re: [R] Does Sweave run in the global environment ?

2010-05-28 Thread Duncan Murdoch
On 28/05/2010 1:58 PM, Paul wrote: Hello It seems that sweave always runs in the global environment. By default it uses the RweaveEvalWithOpt function to evaluate expressions, and they are evaluated in the global environment. It's possible to change that. You need to make your own "drive

Re: [R] create new variable: percentile value of variable in data frame

2010-05-28 Thread Stephan Kolassa
Hi Jon, does the empirical cumulative distribution function do what you want? dat$q.score <- ecdf(dat$score)(dat$score) ?ecdf HTH Stephan Jonathan Beard schrieb: Hello all, Thanks in advance for you attention. I would like to generate a third value that represents the quantile value of a va

Re: [R] problem with a function

2010-05-28 Thread li li
Hi all, Sorry I have too many questions. I could not think of a way to fix problem. Can anyone give some suggestions on fixing this? Hannah 2010/5/28 li li > Hi Sarah, > Thanks for your kind help. I now know where the problem is. > Hannah > >

Re: [R] clustering in R

2010-05-28 Thread Tal Galili
Hi Ayesha, I wish to help you, but without a simple self contained example that shows your issue, I will not be able to help. Try using the ?dput command to create some simple data, and let us see what you are doing. Best, Tal Contact Details:---

Re: [R] problem with a function

2010-05-28 Thread li li
Hi Sarah, Thanks for your kind help. I now know where the problem is. Hannah 2010/5/28 Sarah Goslee > My initial guess appears to be right: you're working with something > exceedingly sensitive to floating point precision. You may have to > reconsider your methods. >

[R] create new variable: percentile value of variable in data frame

2010-05-28 Thread Jonathan Beard
Hello all, Thanks in advance for you attention. I would like to generate a third value that represents the quantile value of a variable in a data frame. # generating data x <- as.matrix(seq(1:30)) y <- as.matrix(rnorm(30, 20, 7)) tmp1 <- cbind(x,y) dat <- as.data.frame(tmp1) colnames(dat) <- c(

Re: [R] Matrix interesting question!

2010-05-28 Thread David Winsemius
On May 28, 2010, at 12:30 PM, UM wrote: hi, I have been trying to do this in R (have implemented it in Excel) but I have been using a very inefficent way (loops etc.). I have matrix A (columns are years and ages are rows) and matrix B (columns are birth yrs and rows are ages) I would

Re: [R] clustering in R

2010-05-28 Thread Ayesha Khan
Thanks Tal & Joris! I created my distance matrix distA by using the dist() function in R manipulating my output in order to get a matrix. distA =as.matrix(dist(t(x2))) # x2 being my original dataset as according to the documentaion on dist() For the default method, a "dist" object, or a matrix (of

Re: [R] problem with a function

2010-05-28 Thread Sarah Goslee
My initial guess appears to be right: you're working with something exceedingly sensitive to floating point precision. You may have to reconsider your methods. Your problem is: rho.f(rho = 0.3) gives a different answer than rho.f(seq(0, 1, by=.1)[4]) even though all.equal(0.3, seq(0, 1, by=.1)[

[R] Does Sweave run in the global environment ?

2010-05-28 Thread Paul
Hello It seems that sweave always runs in the global environment. I want to run sweave from within a function, and pass a variable into sweave, however when I do this, sweave doesn't see the variable. Here's my example test_sweave.Rnw file |% \documentclass[a4paper]{article} \usepackage[OT1]{

Re: [R] median test

2010-05-28 Thread Stefan Grosse
> **Disclaimer: I have no idea what your data represents or how (in)appropriate any of these tests may be** R can do the tests you mentioned (and many more). Wilcoxon test: wilcox.test(x=group1, y=group2, paired=FALSE) see ?wilcox.test I am not sure whether it is still valid but in case o

Re: [R] problem with a function

2010-05-28 Thread li li
I modified my codes. However it looks like it still has the same problem. Again, rho.f(0.3) gives the right answer. rho.f(corr[4]) gives wrong answer even though corr[4]==0.3. The codes are attached. Thank you very much!!! > rho.f(0.3) $est.1 [1] 0.000 0.000 0.000 0.000 0.8333

Re: [R] 2.11.0 on ubuntu (hardy) inadvertently installed

2010-05-28 Thread Stefan Grosse
Am 28.05.2010 17:25, schrieb Cedrick W. Johnson: I now have a bunch of pkgs that aren't loading due to the fact that they were built before 2.10.0 -- There's some *ancient* packages, like (sma) that I was able to figure out what we were using, and pull out the relevant functions and just tempor

Re: [R] Matrix interesting question!

2010-05-28 Thread Joshua Wiley
Hi, Can you provide sample data? It seems like in both matrices, you have ages in the rows. Do you just want to calculate birth years in matrix B from ages and years in matrix A? It may also help to give us some of the details of what you are doing once you have transformed it prior to transfor

Re: [R] Matrix interesting question!

2010-05-28 Thread Joris Meys
Provide a minimal example to start with. This sounds more like voodoo than anything else. Cheers Joris On Fri, May 28, 2010 at 6:30 PM, UM wrote: > > hi, > I have been trying to do this in R (have implemented it in Excel) but I > have > been using a very inefficent way (loops etc.). I have matri

Re: [R] Problem with plotting survival predictions from cph model

2010-05-28 Thread Michal Figurski
Josh, Good point. And it actually accidentally solved my problem. Previously I attached .Rdata files. After your email I exported this dataset into a csv file and then re-loaded it to see if the problem persists, and... the problem disappeared. Nevertheless, if I load the original .Rdata fil

Re: [R] median test

2010-05-28 Thread Frank E Harrell Jr
Linda, There are different views about whether someone doing statistical analysis should first take a certain number of statistics course. I think for your issue some background information would certainly help. You have not correctly interpreted the paper. The main point is that for most c

Re: [R] problem with a function

2010-05-28 Thread David Winsemius
On May 28, 2010, at 12:03 PM, Sarah Goslee wrote: From your code: mean <- c(rep(mu0, mzero), rep(mu1,m-mzero)) mean() is a function. If you overwrite it with data, you may mess other things up - any function you call that calls mean will now fail (at best). Actually, it's bad but not quite

[R] Matrix interesting question!

2010-05-28 Thread UM
hi, I have been trying to do this in R (have implemented it in Excel) but I have been using a very inefficent way (loops etc.). I have matrix A (columns are years and ages are rows) and matrix B (columns are birth yrs and rows are ages) I would like to first turn matrix A into matrix B And th

[R] lm.ridge in library(MASS) produces inconsistent parameter estimates as compared to matrix algebra

2010-05-28 Thread Georg D. Blind
Dear all, using the hkb estimator obtained from lm.ridge in the below equation (Formula 6 from this article: http://www3.interscience.wiley.com/cgi-bin/fulltext/122484280/PDFSTART beta^hat(k) = ((x'x + kI)^-1)x'y, where x matrix of independent variables y vector of dependent variables k hkb esti

Re: [R] if negative value, make zero

2010-05-28 Thread Joshua Wiley
Hi, It did not return the results you wanted because you tried to feed the entire data frame to ifelse(). Does something like this do what you want? apply(tempr, 2, function(x) {ifelse(x < 0, 0, x)}) Josh On Fri, May 28, 2010 at 8:37 AM, wrote: > I have a data frame with both positive and n

Re: [R] Wait for keystroke or timeout

2010-05-28 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Prof. John C Nash > Sent: Friday, May 28, 2010 7:46 AM > Cc: r-help@r-project.org > Subject: Re: [R] Wait for keystroke or timeout > > Matt's suggestion works in Linux (I use Ubu

Re: [R] 2.11.0 on ubuntu (hardy) inadvertently installed

2010-05-28 Thread Erik Iverson
You might want to ask on R-SIG-Debian https://stat.ethz.ch/mailman/listinfo/r-sig-debian Cedrick W. Johnson wrote: Hi- Looks like this morning, I did the ultimate in foobar to a main prod box. I was using apt-get upgrade on the box and totally missed the fact that my entire R installation we

Re: [R] if negative value, make zero

2010-05-28 Thread Peter Langfelder
temp2 = tempr temp2[temp2<0] = 0 HTH On Fri, May 28, 2010 at 8:37 AM, wrote: > I have a data frame with both positive and negative values, and I want to > make all the negative values equal zero, so i can eventually take an > average. > I've tried > temp2 <- ifelse(tempr<0, 0, tempr) > but it

Re: [R] Wait for keystroke or timeout

2010-05-28 Thread Greg Snow
This is really a user interface issue and the standard user interface is different between platforms. Would tcltk (or RGTK or ...) be a possible solution for you? tcltk is fairly consistent across platforms and does provide for this type of thing (you can have a button to press to continue and

Re: [R] Re : help to replace variable value

2010-05-28 Thread Wu Gong
Do you mean replace values of a column? > df <- data.frame("Jan" = 1:3,"Feb" = 11:13) > df Jan Feb 1 1 11 2 2 12 3 3 13 > df$Jan <- 21:23 > df Jan Feb 1 21 11 2 22 12 3 23 13 - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Re-help-to-replace-

[R] how to use GenABEL genetic information??

2010-05-28 Thread karena
Does anyone use the R library GenABEL? I am using it to calculate SNP interactions. I have a list of 100 SNPs, I need to look at the interaction between each of two SNPs among the list. my question is how to perform this in GenABEL. I want to use the "lm" function, but don't know how to use the SN

Re: [R] Survival analysis extrapolation

2010-05-28 Thread TReason
Dear Terry, Thanks so much for your help; I'm a bit of an R novice at the moment (as you can probably tell from my failure to use the data argument!) so any help is most welcome. I'm hoping to use this model to generate transition probabilities for a Markov model and, as such, I was wondering if

[R] if negative value, make zero

2010-05-28 Thread ecvetano
I have a data frame with both positive and negative values, and I want to make all the negative values equal zero, so i can eventually take an average. I've tried temp2 <- ifelse(tempr<0, 0, tempr) but it doesn't seem to work. Any suggestions? Thanks! ___

Re: [R] median test

2010-05-28 Thread linda Porz
Hello, I can't have different data these data came from mice that have lived under certain condition in the lab! I have just read the mentioned publication "Should the median test be retired from general use?" It says in the conclusion "If one felt that the data could not come from a Cauchy or sla

Re: [R] How to get values out of a string using regular expressions?

2010-05-28 Thread Joris Meys
Bingo! Thx Gabor. Thank you too Tal, I looked briefly at the package and it looks like a nice interface. I keep it in mind for later. Cheers Joris On Fri, May 28, 2010 at 2:25 PM, Gabor Grothendieck wrote: > Try this: > > as.numeric(gsub("\\D", "", X)) > > On Fri, May 28, 2010 at 8:21 AM, Jori

Re: [R] extracat , JGR, iWidgets install problems

2010-05-28 Thread Alex Pilh
I think you tried to start JGR from the console, which will usually not work. JGR has to be started using the launcher which is available at http://jgr.markushelbig.org/Download.html The irmb function will not only need the package installed, but also requires you to use the JGR console for yo

Re: [R] problem with a function

2010-05-28 Thread li li
You mean there is a function "mean" in R, so I should avoid to use it, right? so I do the following: mean1 <- c(rep(mu0, mzero), rep(mu1,m-mzero)) var.f <- function(rho, m, J) { (1-rho)*diag(m)+rho*J%*%t(J) } Thanks! 2010/5/28 Sarah Goslee > From your code: > > mean <- c(rep(mu0, mzero),

Re: [R] median test

2010-05-28 Thread Joshua Wiley
On Fri, May 28, 2010 at 6:58 AM, linda Porz wrote: > Hello, > > I can't have different data these data came from mice that have lived under > certain condition in the lab! I have just read the mentioned publication > "Should the median test be retired from general use?" It says in the > conclusion

Re: [R] problem with a function

2010-05-28 Thread Sarah Goslee
>From your code: mean <- c(rep(mu0, mzero), rep(mu1,m-mzero)) mean() is a function. If you overwrite it with data, you may mess other things up - any function you call that calls mean will now fail (at best). var.f <- function(rho) { (1-rho)*diag(m)+rho*J%*%t(J) } var.f() is a complete funct

Re: [R] problem with a function

2010-05-28 Thread li li
I am not sure about "overwrite mean() with data". My purpose was to generate random numbers that are from a multivariate normal distribution with the mean vector. For the var.f function, since I already specify m and J, so the only variable is really rho, so I wrote it as a function of rho only.

[R] 2.11.0 on ubuntu (hardy) inadvertently installed

2010-05-28 Thread Cedrick W. Johnson
Hi- Looks like this morning, I did the ultimate in foobar to a main prod box. I was using apt-get upgrade on the box and totally missed the fact that my entire R installation went from 2.10.0 to 2.11.0. I now have a bunch of pkgs that aren't loading due to the fact that they were built befor

Re: [R] why biomaRt cannot extract 3UTR sequences for 1941 ENSGxxxxx ?

2010-05-28 Thread Steve Lianoglou
Hi, Two things: 1. You mistakenly posted this to the R-help list, when you should have (and probably meant to) send to the bioconductor list. You might want to repost there if you can't figure out the problem. 2. I just tried your query with 4 transcript IDs (one of them was a duplicate) and it

[R] why biomaRt cannot extract 3UTR sequences for 1941 ENSGxxxxx ?

2010-05-28 Thread mauede
I executed the following lines several times from a script as well as pasting them in an R shell. Systematically biomaRt is failing. The problem is to extract the 3UTR sequences corresponding to a vector containing 1941 Ensembl Transcript numbers (some are duplicated ... is this s problem ?) Ple

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Duncan Murdoch
On 28/05/2010 10:14 AM, Christopher David Desjardins wrote: Perfect. Thanks. Also using R 2.11.0 on Fedora I didn't get any warnings with my command. That's a serious problem. Can you give more details (i.e. just plain R, R under ESS, etc.)? Duncan Murdoch Chris On 05/28/2010 09:09 AM

Re: [R] Wait for keystroke or timeout

2010-05-28 Thread Prof. John C Nash
Matt's suggestion works in Linux (I use Ubuntu and Debian variants), but I haven't yet been able to get it to work in Windows. In a DOS terminal, I can run Cygwin's blas.exe via blas -c "read -t 1 -n 1" and get the right functioning, but when embedded in R in various ways, I get several err

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Duncan Murdoch
On 28/05/2010 9:29 AM, Christopher David Desjardins wrote: Hi, I am trying to recreate the right graph on page 524 of Gelman's 2006 paper "Prior distributions for variance parameters in hierarchical models" in Bayesian Analysis, 3, 515-533. I am only interested, however, in recreating the port

Re: [R] problem with a function

2010-05-28 Thread Sarah Goslee
There are a bunch of problems in your code: you overwrite mean() with data, and that could screw things up. you have a function var.f that isn't passed all the arguments it needs. est.4 is defined several times, each overwriting the previous. First you need to clean up these sorts of problems sinc

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Duncan Murdoch
On 28/05/2010 9:24 AM, (Ted Harding) wrote: An experiment: sort(c("AACD","A CD")) # [1] "AACD" "A CD" sort(c("ABCD","A CD")) # [1] "ABCD" "A CD" sort(c("ACCD","A CD")) # [1] "ACCD" "A CD" sort(c("ADCD","A CD")) # [1] "A CD" "ADCD" sort(c("AECD","A CD")) # [1] "A CD"

Re: [R] anova post hoc tests

2010-05-28 Thread Iasonas Lamprianou
Thanks, this is a good solution Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fax: +357-22-590539 Honorary Research Fellow Depar

Re: [R] problem with a function

2010-05-28 Thread li li
Thanks very much for your reply. The function is a bit long. I attached it. rho.f () is in second text document. It uses rada1.mnorm() function which is contained in the first document. Thank you very very much!!! 2010/5/28 Dennis Murphy > Hi: > > The problem is that input arguments such as c

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Berwin A Turlach
G'day Chris, On Fri, 28 May 2010 08:29:30 -0500 Christopher David Desjardins wrote: > Hi, > I am trying to recreate the right graph on page 524 of Gelman's 2006 > paper "Prior distributions for variance parameters in hierarchical > models" in Bayesian Analysis, 3, 515-533. I am only interested

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Perfect. Thanks. Also using R 2.11.0 on Fedora I didn't get any warnings with my command. Chris On 05/28/2010 09:09 AM, Berwin A Turlach wrote: curve(2*dcauchy(x, location=0, scale=25), from=0, to=200) __ R-help@r-project.org mailing list https://st

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Thanks that works. I am presuming that the density on the Y-axis would be wrong in the case of a half-Cauchy distribution and in fact should be doubled if it's folded at 0? Chris On 05/28/2010 09:02 AM, Uwe Ligges wrote: Am 28.05.2010 15:29, schrieb Christopher David Desjardins: Hi, I am tr

Re: [R] problem with a function

2010-05-28 Thread Dennis Murphy
Hi: The problem is that input arguments such as corr[4] have to be evaluated within the body of your function, and apparently you haven't written it to do so. Unfortunately, I can't help further because my clairvoyance package is still in the concept development stage. In the meantime, it would be

Re: [R] problem with a function

2010-05-28 Thread Sarah Goslee
Hi Hannah, No, we can't help because we have no idea what rho.f does - you didn't provide the requested reproducible example. Without more information, the only thing I can think of is that your function might be ridiculously sensive to numeric precision (though that seems unlikely): > corr <- se

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Uwe Ligges
Am 28.05.2010 15:29, schrieb Christopher David Desjardins: Hi, I am trying to recreate the right graph on page 524 of Gelman's 2006 paper "Prior distributions for variance parameters in hierarchical models" in Bayesian Analysis, 3, 515-533. I am only interested, however, in recreating the porti

Re: [R] anova post hoc tests

2010-05-28 Thread RICHARD M. HEIBERGER
Download and install install.packages("RcmdrPlugin.HH") library(RcmdrPlugin.HH) Then there are two options. The Rcmdr menu item Statistics > Means > One-way ANOVA... has a checkbox for pairwise comparison of means" It uses glht in the multcomp package. The second option, which I prefer, is to

[R] problem with a function

2010-05-28 Thread li li
Hi all, I have a function rho.f which gives a list of estimators. I have the following problems. rho.f(0.3) gives me the right answer. However, if I use rho.f(corr[4]) give me a different answer, even though corr[4]==0.3. This prevents me from using a for loop. Can someone give me some help?

[R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Hi, I am trying to recreate the right graph on page 524 of Gelman's 2006 paper "Prior distributions for variance parameters in hierarchical models" in Bayesian Analysis, 3, 515-533. I am only interested, however, in recreating the portion of the graph for the overlain prior density for the hal

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Ted Harding
An experiment: sort(c("AACD","A CD")) # [1] "AACD" "A CD" sort(c("ABCD","A CD")) # [1] "ABCD" "A CD" sort(c("ACCD","A CD")) # [1] "ACCD" "A CD" sort(c("ADCD","A CD")) # [1] "A CD" "ADCD" sort(c("AECD","A CD")) # [1] "A CD" "AECD" ## (with results for "AFCD", ... "AZC

Re: [R] Linear Discriminant Analysis in R

2010-05-28 Thread Liaw, Andy
cobler_squad needs more basic help than doing lda. The data input just doesn't make sense. If vowel_feature is a data frame, than G <- vowel_feature[15] creates another data frame containing the 15th variable in vowel_feature, so "G" is the name of a data frame, not a variable in a data frame.

Re: [R] Linear Discriminant Analysis in R

2010-05-28 Thread Joris Meys
Could you provide us with data to test the code? use dput (and limit the size!) eg: dput(vowel_features) dput(mask_features) Without this information, it's impossible to say what's going wrong. It looks like you're doing something wrong in the selection. What should vowel_features[15] return?

Re: [R] how to create automatically names for vectors in a loop?

2010-05-28 Thread jim holtman
Before polluting your workspace with objects, look at how you might use a 'list' to collect them all together, especially if you are going to do processing on them later as a group, or if you want to easily save/load them. You could do the following: > myList <- list() > for (i in 1:10) myList[[p

Re: [R] Problems executing cor(dataset) function in R 2.11.0 for OSX ( It works fine in R 2.10.1)

2010-05-28 Thread Carlos Cano
Hi all, I was experiencing a similar problem with some code which uses the package maCorrPlot (BioConductor) http://www.bioconductor.org/packages/2.6/bioc/html/maCorrPlot.html to compute the correlation between different variables. This code was working apparently fine under R 2.9 (but it was rai

Re: [R] How to get values out of a string using regular expressions?

2010-05-28 Thread Gabor Grothendieck
Try this: as.numeric(gsub("\\D", "", X)) On Fri, May 28, 2010 at 8:21 AM, Joris Meys wrote: > Dear all, > > I have a vector of filenames which begins like this : > X <- c("OrthoP1_DNA_str.aln", "OrthoP10_DNA_str.aln", > "OrthoP100_DNA_str.aln", > "OrthoP101_DNA_str.aln", "OrthoP102_DNA_str.aln",

Re: [R] Problem loading RGtk2 (iconv.dll)

2010-05-28 Thread Tal Galili
Thanks Michael, I don't have matlab. How might I check this ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (

Re: [R] Using a loop to define new variables

2010-05-28 Thread Gabor Grothendieck
Although you asked for a loop this may be clearer if you just have to do it once and only have 10 x and 10 y columns. Here we use the built in anscombe data frame which has columns x1, x2, x3, x4, y1, y2, y3, y4: transform(anscombe, r1 = y1 / x1, r2 = y2 / x2, r3 = y3 / x3, r4 = y4 / x4) In th

Re: [R] anova post hoc tests

2010-05-28 Thread Joris Meys
See : http://www.statmethods.net/stats/anova.html ?TukeyHSD Cheers Joris On Fri, May 28, 2010 at 2:11 PM, Iasonas Lamprianou wrote: > Hi everybody > > does anyone know how I can run ANOVA post-hoc tests using R commander or R > in general? > > Thank you > > > Dr. Iasonas Lamprianou > > > > > ___

[R] How to get values out of a string using regular expressions?

2010-05-28 Thread Joris Meys
Dear all, I have a vector of filenames which begins like this : X <- c("OrthoP1_DNA_str.aln", "OrthoP10_DNA_str.aln", "OrthoP100_DNA_str.aln", "OrthoP101_DNA_str.aln", "OrthoP102_DNA_str.aln", "OrthoP103_DNA_str.aln", "OrthoP104_DNA_str.aln", "OrthoP105_DNA_str.aln", "OrthoP106_DNA_str.aln", "Orth

Re: [R] Using a loop to define new variables

2010-05-28 Thread Barry Rowlingson
On Fri, May 28, 2010 at 12:52 PM, Andre Easom wrote: > Hi, > > I'm a novice R user, much more used to SAS.  My problem is pretty simple - > basically, in a data frame, I have variables named > x1,,x10 and y1,...,y10; and I would like to create r1 = x1 / y1 etc > > Apologies if this is way too

[R] anova post hoc tests

2010-05-28 Thread Iasonas Lamprianou
Hi everybody does anyone know how I can run ANOVA post-hoc tests using R commander or R in general? Thank you Dr. Iasonas Lamprianou __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

Re: [R] Using a loop to define new variables

2010-05-28 Thread Ivan Calandra
Sorry, I should have written it an other way: test$z <- test[[2]]/test[[3]] Which is then really easy to fit into a for loop Ivan Le 5/28/2010 14:05, Ivan Calandra a écrit : Hi, Would this do: test <- data.frame(a=LETTERS[1:10], x=1:10, y=seq(0.1,1,0.1)) #create some data.frame test$z <- te

Re: [R] Using a loop to define new variables

2010-05-28 Thread Ivan Calandra
Hi, Would this do: test <- data.frame(a=LETTERS[1:10], x=1:10, y=seq(0.1,1,0.1)) #create some data.frame test$z <- test$x/test$y #add a column ? HTH, Ivan Le 5/28/2010 13:52, Andre Easom a écrit : Hi, I'm a novice R user, much more used to SAS. My problem is pretty simple - basically, in

Re: [R] Handing significance digits

2010-05-28 Thread Joris Meys
Hi Christofer, I don't know what .Net is doing, but for R these globals are dependent on your machine and platform. ?.Machine ?.Platform Don't know if you can actually hack R into believing otherwise. Did you consider the possibility that the underlying algorithms differ between .Net and R? Chee

  1   2   >