Re: [R] Tapply.

2010-04-27 Thread Petr PIKAL
Hi steven mosher napsal dne 27.04.2010 17:04:04: > Thanks, > > I had been wondering what Drop did. That makes it more clear. > > While I have code that loops and does the problem correctly, I wanted to > do things the R way and be fast and terse. hehe. > > So: > ID d

Re: [R] R GUI

2010-04-27 Thread Amitoj S. Chopra
Hey do you know a good guide for traitr to learn from? Is this okay? Ive been trying it but it is difficult for me to learn. Thanks. Amitoj http://cran.r-project.org/web/packages/traitr/vignettes/traitr.pdf -- View this message in context: http://r.789695.n4.nabble.com/R-GUI-tp1837662p2068626.

[R] Traitr

2010-04-27 Thread Amitoj S. Chopra
Does anyone know how to use Traitr, or a guide to learn Traitr package for R? I am trying to learn right now, and trying to get a graphical interface (GUI) for my script that I developed. Thanks, I am pretty new at R, so more basic, the better. Thank you! Amitoj -- View this message in context:

Re: [R] How to create R package

2010-04-27 Thread Sharpie
Dinh Diep wrote: > > Hi, > > Can you tell me how to create R package in Windows, and give me an > example that works ? Thanks. > Hi Dinh, Check out the help page for the package.skeleton() function- it will create the outline of a package for you. The "Writing R Extensions" manual will

[R] Robust ANOVA functions in R?

2010-04-27 Thread jinyan fan
Hello,   Anyone familiar with robust ANOVA in R? Please help.   I am conducting a between-between-within (2 X 2 X 2) ANOVA, with the focus on the significance of the three-way interaction. Because of very uneven sample sizes, and the violation of covariance homogeneity, I need to use some sort o

[R] -network- package in R: removing nodes

2010-04-27 Thread Rick L
Dear all, If you have experience with the -network- package, can you show me how to remove nodes based on their degrees? For instance, removing all nodes with an out-degree or in-degree of 1? Thank you very much for your help! Rick __ R-help@r-pro

[R] How to create R package

2010-04-27 Thread Dinh Diep
Hi, Can you tell me how to create R package in Windows, and give me an example that works ? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Finding the max correlation coefficient value using CCF function

2010-04-27 Thread vikrant
Hi All, Suppose I have 2 time series a = 1:20 b = 5:15 and I am finding the cross correlation between these two time series using CCF function. c = ccf(a,b) print(c) Autocorrelations of series ‘X’, by lag -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4

Re: [R] some QCA questions

2010-04-27 Thread Wincent
I didn't see any response, so I pick it up. I don't think there is exact method to calculate the RAM use. Given that you have a data set, QCA and R, you can just try to run the model and see if it can hanlde it. My hunch is that if you don't use remainders in the boolean minimization process, it m

Re: [R] suggestion on method dispatch

2010-04-27 Thread Gabor Grothendieck
You can pass it: NextMethod("fn", x = uniqueFoo2, common = common) On Tue, Apr 27, 2010 at 10:42 PM, Wincent wrote: > Thanks Gabor. > > Still, there is one problem. If the common argument is > common=c("opt1","opt2") and I want to use match.arg(common) in side > fn.foo1, then an error is encount

Re: [R] suggestion on method dispatch

2010-04-27 Thread Wincent
Thanks Gabor. Still, there is one problem. If the common argument is common=c("opt1","opt2") and I want to use match.arg(common) in side fn.foo1, then an error is encountered. fn <- function(x,...) UseMethod("fn") fn.default <- fn.foo1 <- function(x, common=c("opt1","opt2"), ...) { match

Re: [R] Selecting rows based on contents of string

2010-04-27 Thread Peter Alspach
Tena koe Alexis ?regexpr yourDataFrame[regexpr('G', yourDataFrame$Flags)>0,] HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Alexis Champsaur > Sent: Wednesday, 28 April 2010 11:49 a.m. > To: r-h...@s

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Gabor Grothendieck
The environment of your function, as written, is the global environment which means that free variables in it are looked up there but you want it so that those free variables are looked up in the nlme namespace first so set its environment as shown: library(nlme) nlme <- asNamespace("nlme") unlock

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Michael Steven Rooney
Thanks for your help. I am making great progress, but there are still some things that are puzzling me. In the code below, I add a cat() statement to `coef<-.corExp`. Sure enough, when I run lme(), it prints. (awesome!) However, the function does not seem to be able to find the C script "spatial_f

Re: [R] How to work out 3-way probabilities

2010-04-27 Thread Jeff Brown
If you're willing to assume independence, multiplication is the way to go: Pr( a beats b & a beats c) = Pr( a beats b ) * Pr( a beats c ) If you're not willing to assume independence, things can get very weird: http://en.wikipedia.org/wiki/Arrow's_impossibility_theorem -- View this message in c

[R] ASYMMETRIC DCC MGARCH

2010-04-27 Thread 莊忠柱
Dear James, Hello, Where can I get any existiong code on R of an Asymmetric (in volatility) DCC MGARCH? Thanks Best Regards C C Chuang [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] ASYMMETRIC DCC MGARCH

2010-04-27 Thread 莊忠柱
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, r

Re: [R] R with command line

2010-04-27 Thread Duncan Murdoch
On 27/04/2010 6:15 PM, Duke wrote: Hi all, I am testing R by trying R on command line (ie without opening R console) on a Mac Pro with 10.6. So I created a file plot.R: x11(width=5,height=3.5) plot(1:10,1:10) So I have two questions below (please forgive me if the questions have been asked

[R] Selecting rows based on contents of string

2010-04-27 Thread Alexis Champsaur
Hi there, I have a data frame with a column named "Flags", whose contents are strings containing any of the following characters, multiple characters allowed: A,B,C,D,E,F,G. Here is the head: GeocodeID PlaceID CountyCode CBSACode StateProvCode PropertyTypeGroupID Flags 1 0 0

[R] classification tree

2010-04-27 Thread Sabariah Saharan
Hi, I've a problem with growing a classification tree. I have 26427 observations and divided into 4 groups. A=17866 B=6873 C=1556 D=132 The problems is when I want to plot the tree, the result appear there is no splitnodes for the tree. What should I do now? Is there any ideas how to build a

Re: [R] write.csv size limit in R 2.11.0 -- crashes

2010-04-27 Thread N Klepeis
The latest patched build 51822 fixed the write.csv problem: http://cran.r-project.org/bin/windows/base/rpatched.html On 4/26/2010 2:10 PM, Duncan Murdoch wrote: On 26/04/2010 4:25 PM, N Klepeis wrote: Hi, I just installed R 2.11.0 Win32 and tried to use write.csv (or write.table) to write

Re: [R] ShortRead with BWA

2010-04-27 Thread mtmorgan
Hi Duke -- Quoting Duke : Dear folks, Please welcome a newbie both to R and the mailing list :). I am currently working on a sequencing project, and heard about R as well as some of its packages for next gen sequencing, and decided to give it a try. Starting with ShortRead, I found a document

Re: [R] ShortRead with BWA

2010-04-27 Thread Abhishek Pratap
Hi Duke While your mails are most welcome to this mailing list. You may find the following mailing list more useful as it caters to the Bioconductor and Next Generation Sequencing stuff. Bioc-sig-sequencing mailing list > bioc-sig-sequenc...@r-project.org > https://stat.ethz.ch/mailman/listinfo/b

Re: [R] TikzDevice and texi2dvi

2010-04-27 Thread Sharpie
Lorenzo Isella wrote: > > I think I solved my problems by resorting to the Ubuntu packages at > > http://bit.ly/c8izKy > > Cheers > > Lorenzo > > > Dear All, > I am starting to use the tikzDevice package, but I am experiencing some > (minor problems). > If I try to run the script at the end

[R] R with command line

2010-04-27 Thread Duke
Hi all, I am testing R by trying R on command line (ie without opening R console) on a Mac Pro with 10.6. So I created a file plot.R: x11(width=5,height=3.5) plot(1:10,1:10) So I have two questions below (please forgive me if the questions have been asked already) 1. What is the different

Re: [R] Maps: Country coding

2010-04-27 Thread Kjetil Halvorsen
have a look at the cran pacvkage countrycode! Kjetil On Tue, Apr 27, 2010 at 5:30 PM, Ray Brownrigg wrote: > On Wed, 28 Apr 2010, Berthold Stegemann wrote: >> Hello, >> >> I am using the maps library for plotting maps. >> >> To build new geograhical sets such as Europe I use >> >> europe = c('Ge

[R] ShortRead with BWA

2010-04-27 Thread Duke
Dear folks, Please welcome a newbie both to R and the mailing list :). I am currently working on a sequencing project, and heard about R as well as some of its packages for next gen sequencing, and decided to give it a try. Starting with ShortRead, I found a document (http://www.bioconductor.

Re: [R] Matrix package + mfcol/mfrow

2010-04-27 Thread Sharpie
Gildas Mazo wrote: > > Hi, > > When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) > to work, that is, I cannot get to display several images at a time. How > can I fix this problem ? > > Thanks in advance, > > Gildas Mazo > Hmm, the following: require(Matrix) par(mf

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread David Freedman
thanks very much for the help - all of these suggestions were much better than what I was doing -- View this message in context: http://r.789695.n4.nabble.com/get-means-of-elements-of-5-matrices-in-a-list-tp2067722p2068329.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Merging files

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 4:23 PM, Alex Jameson wrote: David, merg12 displays the files with this message at the bottom [reached getOption("max.print") -- omitted 321526 rows]] str(merg12) displays the following message 'data.frame' : 329218 obs. of 13 variables $ patientid: $ Name: $ Age: but

Re: [R] Merging files

2010-04-27 Thread Sharpie
Alex Jameson wrote: > > David, > > merg12 > > displays the files > with this message at the bottom > > [reached getOption("max.print") -- omitted 321526 rows]] > > str(merg12) displays the following message > > 'data.frame' : 329218 obs. of 13 variables > > $ patientid: > $ Name: > $ Age:

Re: [R] Maps: Country coding

2010-04-27 Thread Ray Brownrigg
On Wed, 28 Apr 2010, Berthold Stegemann wrote: > Hello, > > I am using the maps library for plotting maps. > > To build new geograhical sets such as Europe I use > > europe = c('Germany','Netherlands',...) > > Is there a list of county codes used by the map function. > > Thanks, > Berthold If you

Re: [R] Merging files

2010-04-27 Thread Abhishek Pratap
Hi Alex merge wont write a file automatically. You need to use something which can direct the output to a file. write.table(merge12, file = "output.data" ) should do the trick. Read more at ?write.table -Abhi On Tue, Apr 27, 2010 at 5:23 PM, Alex Jameson wrote: > David, > > merg12 > > displa

Re: [R] Merging files

2010-04-27 Thread Alex Jameson
David, merg12 displays the files with this message at the bottom [reached getOption("max.print") -- omitted 321526 rows]] str(merg12) displays the following message 'data.frame' : 329218 obs. of 13 variables $ patientid: $ Name: $ Age: but no file is created in the folder mydata i would exp

Re: [R] coda sweave

2010-04-27 Thread Brian Diggs
On 4/27/2010 1:42 PM, Randall Wrong wrote: Thank you so much Ista. I have problems with pictures too. \begin{figure} \centering <>= xyplot( mcmc(x) ) @ \end{figure} Why doesn't this work ? Sorry for posting all these questions :-( Best, Randall Check out FAQ 7.22. You need to use print(xy

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Gabor Grothendieck
You did change it. Try nlme:::corExp Also note that asNamespace("nlme") is a nicer way to refer to it. On Tue, Apr 27, 2010 at 4:32 PM, Michael Steven Rooney wrote: > Sorry, I am still not understanding this. I tried using the unlock binding > function, but the function remains unchanged after I

Re: [R] coda sweave

2010-04-27 Thread Randall Wrong
Thank you so much Ista. I have problems with pictures too. \begin{figure} \centering <>= xyplot( mcmc(x) ) @ \end{figure} Why doesn't this work ? Sorry for posting all these questions :-( Best, Randall 2010/4/27 Ista Zahn > Hi Randall, > > Sounds like you need to make friends with the str()

Re: [R] Merging files

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 4:23 PM, Alex Jameson wrote: Hi David, I have executed data1 <- read.table("c:\\mydata\\file1.txt") data2 <- read.table("c:\\mydata\\file2.txt") merg12 <- merge(data1, data2) but am not sure, if it has merged them, ideally, i would want a new file name for the merged dat

Re: [R] Symbols in biplot

2010-04-27 Thread Tobias Verbeke
Hi Ara, Ara Kooser wrote: I just started in on R today. I am at the point where I am trying to distinguish different groups of data (hydrochemical data) in biplot. I search and found a post about converting the sample number in biplot to a symbol like x or + "> temp <- matrix(runif(50

Re: [R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Kyeong Soo (Joseph) Kim
Frankly speaking, I am not looking for such a framework. The system I'm studying is a communication network (like M/M/1 queue, but way too complicated to mathematically analyze it using classical queueing theory) and the conclusion I want to make is qualitative rather than quantatitive -- a high-l

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Michael Steven Rooney
Sorry, I am still not understanding this. I tried using the unlock binding function, but the function remains unchanged after I attempt an assignment: > library(nlme) > bindingIsLocked("corExp",environment(corExp)) [1] TRUE > unlockBinding("corExp",environment(corExp)) > bindingIsLocked("corExp",e

Re: [R] Merging files

2010-04-27 Thread Alex Jameson
Hi David, I have executed data1 <- read.table("c:\\mydata\\file1.txt") data2 <- read.table("c:\\mydata\\file2.txt") merg12 <- merge(data1, data2) but am not sure, if it has merged them, ideally, i would want a new file name for the merged data, based on the identical IDs, and i would need to el

Re: [R] R-help Digest, Vol 86, Issue 28

2010-04-27 Thread Marshall Feldman
On 4/26/10 21:45:55 R P Herrold wrote: Date: Mon, 26 Apr 2010 21:45:55 -0400 (EDT) From: R P Herrold To: Marshall Feldman Cc:r-help@r-project.org Subject: [R] Upgrading R using the "global library folder" strategy -, what do you think about it? Message-ID: Content-Type: TEXT/PLAIN; charse

Re: [R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Gabor Grothendieck
If you are looking for a framework for statistical inference you could look at additive models as in the mgcv package which has a book associated with it if you need more info. e.g. library(mgcv) fm <- gam(dist ~ s(speed), data = cars) summary(fm) plot(dist ~ speed, cars, pch = 20) fm.ci <- with(

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Makes sense. Thanks guys for your quick reverts! -Abhi On Tue, Apr 27, 2010 at 3:34 PM, Erik Iverson wrote: > > > Abhishek Pratap wrote: >> >> Hi Guys >> >> Thank you for clearing something I dint know. Just wondering the >> reason of putting the word function(x)  in the apply function when we >

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Erik Iverson
Abhishek Pratap wrote: Hi Guys Thank you for clearing something I dint know. Just wondering the reason of putting the word function(x) in the apply function when we have already declared stats function separately. I better understand how the arguments are passed. Thanks! -Abhi That's cre

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Hi Guys Thank you for clearing something I dint know. Just wondering the reason of putting the word function(x) in the apply function when we have already declared stats function separately. I better understand how the arguments are passed. Thanks! -Abhi On Tue, Apr 27, 2010 at 2:46 PM, Erik I

Re: [R] Merging files

2010-04-27 Thread Alex Jameson
This is a more detailed description of the problem, I have written the following lines of code to read the files data1=("c:\\mydata\\file1.txt") data2=("c:\\mydata\\file2.txt") file 1 has fields like patientID, Name which are common in file2, however not all fields are common i would like to cr

Re: [R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Kyeong Soo (Joseph) Kim
Hello Gabor, Many thanks for providing actual examples for the problem! In fact I know how to apply and generate plots using various R functions including loess, lowess, and smooth.spline procedures. My question, however, is whether applying those procedures directly on the data with multiple ob

[R] Symbols in biplot

2010-04-27 Thread Ara Kooser
Hello all, I just started in on R today. I am at the point where I am trying to distinguish different groups of data (hydrochemical data) in biplot. I search and found a post about converting the sample number in biplot to a symbol like x or + "> temp <- matrix(runif(50), nrow=10) > tem

Re: [R] Merging files

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 1:19 PM, Alex Jameson wrote: This is a more detailed description of the problem, I have written the following lines of code to read the files data1=("c:\\mydata\\file1.txt") data2=("c:\\mydata\\file2.txt") NONONO. Read the manual again. Perhaps: data1 <- read.table("c:\

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Erik Iverson
Henrique Dallazuanna wrote: try this: apply(veh_drg_animal1[ ,c("readCount","gene_length")] ,1, function(x)stats(x[1], x[2], total=5500)) I agree with this, that was my point in my original reply. Apply is *not* passing 2 arguments simply because you are selecting two columns of the

Re: [R] Merging files

2010-04-27 Thread Ista Zahn
On Tue, Apr 27, 2010 at 2:31 PM, Alex Jameson wrote: > Stephen, > > ?merge and ?intersect have been suggested, unfortunately, i have browsed > through the documentation, > and there is no live example to demonstrate how this can be used. Sure there is. Try example(intersect) and example(merge). O

Re: [R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Gabor Grothendieck
This will compute a loess curve and plot it: example(loess) plot(dist ~ speed, cars, pch = 20) lines(cars$speed, fitted(cars.lo)) Also this directly plots it but does not give you the values of the curve separately: library(lattice) xyplot(dist ~ speed, cars, type = c("p", "smooth")) On Tue,

Re: [R] coda sweave

2010-04-27 Thread Ista Zahn
Hi Randall, Sounds like you need to make friends with the str() function, and perhaps read the documentation about data types in R. For your particular problem: library(coda) m1 <- matrix(runif(100), nrow=10) m1.sum <- summary(mcmc(m1)) str(m1.sum) library(xtable) xtable(m1.sum$statistics) xtabl

Re: [R] Merging files

2010-04-27 Thread Alex Jameson
Stephen, ?merge and ?intersect have been suggested, unfortunately, i have browsed through the documentation, and there is no live example to demonstrate how this can be used. The documentation is not very descriptive. Am quite new to R, although i have used SPSS and SAS before. thanks Alex On

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Henrique Dallazuanna
try this: apply(veh_drg_animal1[ ,c("readCount","gene_length")] ,1, function(x)stats(x[1], x[2], total=5500)) On Tue, Apr 27, 2010 at 3:24 PM, Abhishek Pratap wrote: > Hi Henrique and Erik > > I still get a error. See below. > > apply(veh_drg_animal1[ ,c("readCount","gene_length")] ,1, sta

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Hi Henrique and Erik I still get a error. See below. apply(veh_drg_animal1[ ,c("readCount","gene_length")] ,1, stats, total=5500) Error in FUN(newX[, i], ...) : element 1 is empty; the part of the args list of '(' being evaluated was: (length_gene) stats<- function(count,length_ge

Re: [R] Merging files

2010-04-27 Thread stephen sefick
?merge On Tue, Apr 27, 2010 at 1:19 PM, Alex Jameson wrote: > This is a more detailed description of the problem, > > I have written the following lines of code to read the files > > data1=("c:\\mydata\\file1.txt") > data2=("c:\\mydata\\file2.txt") > > file 1 has fields like patientID, Name which

Re: [R] Merging files

2010-04-27 Thread Alex Jameson
This is a more detailed description of the problem, I have written the following lines of code to read the files data1=("c:\\mydata\\file1.txt") data2=("c:\\mydata\\file2.txt") file 1 has fields like patientID, Name which are common in file2, however not all fields are common i would like to cr

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Henrique Dallazuanna
Try this: apply( veh_drg_animal1[ , c("readCount","gene_length")] ,1, stats, agr3 = your_constant) On Tue, Apr 27, 2010 at 3:10 PM, Abhishek Pratap wrote: > Hi All > > Slightly lost on how should I pass values to a function I am calling > using apply. > > > apply( veh_drg_animal1[ , c("readCou

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Erik Iverson
This is not a reproducible example. You might simply want: apply(veh_drg_animal1[, c("readCount", "gene_length")], 1, stats, arg2, arg3) But your "two parameters" from the data.frame are really going to be passed as one vector, and then within the stats function you can access them individua

Re: [R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Bert Gunter
Joseph: I believe you need to stop inventing your own statistical methods and consult a professional statistician. I do not think this list is the proper place to look for a statistics tutorial when your statistical background appears to be so inadequate for the task. Sorry to be so direct -- per

[R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Hi All Slightly lost on how should I pass values to a function I am calling using apply. apply( veh_drg_animal1[ , c("readCount","gene_length")] ,1, stats() ) here stats is a custom function where I want to pass two parameters from data frame as shown and a third argument which is constant per

Re: [R] Changing Y Axis of Plot

2010-04-27 Thread Henrique Dallazuanna
Try this; axis(2, at=z, labels=sprintf('%d%%', z * 100), col.axis = "blue", cex.axis=0.7) On Tue, Apr 27, 2010 at 1:02 PM, Jeevan Duggempudi wrote: > Hello, > > > > I have used plot function to graph two variables and would like to change > the Y axis labels to % format. So a 0.2 on Y Axis need

Re: [R] Histogram not plotting correct breaks

2010-04-27 Thread Greg Snow
What do you expect to happen to values that fall exactly on the boundary? I have seen questions similar to yours that come about because the user expects different from what the computer does. Look at the 'right' argument to the hist function for a way to change this and see if that helps. --

Re: [R] Problem calculating multiple regressions on a data frame.

2010-04-27 Thread Luis Sisamon
Gabor Grothendieck gmail.com> writes: > > Replace lm(...) with try(lm(...)) > Thanks for all the replies. I managed to make it work with the try() trick, I actually padded the lm() on two levels of try() and is working now Sharpsteen approach. __ R

[R] Changing Y Axis of Plot

2010-04-27 Thread Jeevan Duggempudi
Hello, I have used plot function to graph two variables and would like to change the Y axis labels to % format. So a 0.2 on Y Axis needs to be represented as 20%. I tried to use the following but am getting a syntax error. could you point me to the mistake in this? axis(2, at=z, labels=format

[R] Curve Fitting/Regression with Multiple Observations

2010-04-27 Thread Kyeong Soo (Joseph) Kim
I recently came to realize the true power of R for statistical analysis -- mainly for post-processing of data from large-scale simulations -- and have been converting many of existing Python(SciPy) scripts to those based on R and/or Perl. In the middle of this conversion, I revisited the problem o

[R] Problem with time in coxph/survfit

2010-04-27 Thread Héloïse Gauvin
Hi! I am having a few problems with coxph function, I had the same problem with the use of survfit. Here it is: when calling 'M22<-coxphw(Surv(V1,V2,V4)~V5, data=XTDV, id=XTDV$V3, * prentice*= ~V5, robust=TRUE, censcorr=TRUE)' knowning that my data is: > XTDV[1:10,1:3] V1 V2 V3 V4

Re: [R] Identifying breakpoints/inflection points?

2010-04-27 Thread Bert Gunter
... but you should be warned that this is an inherently difficult issue. You are trying to estimate a second derivative from noisy data. The result is likely to be **very** dependent on the fitting methods and parameters chosen (e.g. "span" of a kernel smoother), even if the fit itself is fairly ro

Re: [R] R for Ubuntu 10.04?

2010-04-27 Thread Tengfei Yin
Hi Jeff, Thanks for elucidating and suggestions, I realized I should email the debian mailing list right after I posted here in 'help', sorry for that, then I did get quick response on that mailing list, they told me the distro for Ubuntu 10.04 will be released in couple days, right now, I could u

Re: [R] Identifying breakpoints/inflection points?

2010-04-27 Thread Clint Bowman
Charlotte, Try: library(msProcess) # you may have to install msProcess year[peaks(birds.pr$fit)] -- Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-681

Re: [R] coda sweave

2010-04-27 Thread Randall Wrong
This is the kind of output I get with summary(mcmc(x)). I would like it in LaTeX. There are two tables. Iterations = 1:10 Thinning interval = 1 Number of chains = 1 Sample size per chain = 10 1. Empirical mean and standard deviation for each variable, plus standard error of the mean: Me

Re: [R] R for Ubuntu 10.04?

2010-04-27 Thread Jeff Newmiller
Tengfei Yin wrote: Hi dear all I am currently using Ubuntu 9.10 (karmic) and R 2.10, I can find a R release that support "karmic" in cran under ubuntu directory, I plan to update my laptop to Ubuntu 10.04 after April 30, since I have to use some new features or new version in it, e.g. QT 4.6, I

[R] Matrix package + mfcol/mfrow

2010-04-27 Thread Gildas Mazo
Hi, When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) to work, that is, I cannot get to display several images at a time. How can I fix this problem ? Thanks in advance, Gildas Mazo __ R-help@r-project.org mailing list https://sta

Re: [R] what package/model should I use when response variable is binary and predictor variables are categorical?

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 12:07 PM, Xiaokuan Wei wrote: Dear List, what package/model should I use when response variable is binary and predictor variables are categorical? If there is any example for such analysis you can pointed it out, that would be very helpful. https://home.comcast.net/~l

Re: [R] Matrix package + mfcol/mfrow

2010-04-27 Thread Uwe Ligges
The fol,owing works for me, so what did you try? library("Matrix") par(mfrow=c(2,2)) replicate(4, plot(1)) Uwe Ligges On 27.04.2010 17:51, Gildas Mazo wrote: Hi, When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) to work, that is, I cannot get to display several images

[R] what package/model should I use when response variable is binary and predictor variables are categorical?

2010-04-27 Thread Xiaokuan Wei
Dear List, what package/model should I use when response variable is binary and predictor variables are categorical? If there is any example for such analysis you can pointed it out, that would be very helpful. Thanks. Xiaokuan [[alternative HTML version deleted]] ___

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread Peter Ehlers
On 2010-04-27 9:05, David Freedman wrote: I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a 5 x 6 matrix that contains the mean value of the 5 original matrices. I can do this by brute force, but there must be a better way than making each matrix into a vector and th

[R] Matrix package + mfcol/mfrow

2010-04-27 Thread Gildas Mazo
Hi, When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) to work, that is, I cannot get to display several images at a time. How can I fix this problem ? Thanks in advance, Gildas Mazo __ R-help@r-project.org mailing list https://sta

Re: [R] How to work out 3-way probabilities

2010-04-27 Thread Charles C. Berry
On Tue, 27 Apr 2010, Dimitrij Kudriavcev wrote: Hello. I have a quick question. I try to use logit regression, to work out probabilities in the sport event. I have work out probabilities for group of 2 players: p1 - probability, what player1 will beat player2 p2 - probability, what player2 wi

Re: [R] Merging files

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 11:34 AM, Alex Jameson wrote: Hi, any one with experience in merging files i have different files, some of the files, have the same fields, so i would like to merge them *File 1:* field a,b,c,d,e,f *File 2:* field a, c, e, m, n *merged file* field a, c, e (ie only

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread David Winsemius
On Apr 27, 2010, at 11:05 AM, David Freedman wrote: I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a 5 x 6 matrix that contains the mean value of the 5 original matrices. I can do this by brute force, but there must be a better way than making each matrix i

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread Marc Schwartz
On Apr 27, 2010, at 10:19 AM, Marc Schwartz wrote: > On Apr 27, 2010, at 10:05 AM, David Freedman wrote: > >> >> I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a >> 5 x 6 matrix that contains the mean value of the 5 original matrices. I can >> do this by brute force

[R] NULL variable read in from SPS

2010-04-27 Thread Simon Kiss
Hello all, I'm having difficulty getting one particular variable into R from SPSS v. 16.0 for mac. R version is 2.10.1. I saved the relevant variables from SPSS into a .csv file and then read them into R. All the variables worked fine, except for one (enviro_spending). In the SPSS file

Re: [R] R for Engineering (Mechanical, Industrial , Civil, etc.)

2010-04-27 Thread Rob Goedman
Harsh, Not in an educational setting, but I use R a lot in 1 branch of mechanical engineering: finite element method, as in Przemieniecki's recent book. R prepares the input for multiple runs of a fortran based FEM routine and searches for an optimal solution (position of a bottom hole assembly

Re: [R] ggplot2 - help with intervals in geom plot

2010-04-27 Thread hadley wickham
> The problem is that I want HCount and HProbCount to use custom > gradients. i.e. a colour for 0-10, next shade for 10-30, next for 30-70 > etc. Use cut to create factor with those levels, and then scale_fill_manual to match values to colours. > Due to some magic done on the data, one uses inter

Re: [R] Compilation error with maptools

2010-04-27 Thread Jean Eid
Uwe Dippel uniten.edu.my> writes: > > I had downloaded and installed a number of packages, successfully, when > I ran into some problem with maptools: It would eat up CPU and most of > all memory. > I rebooted, and tried again, only running the terminal after the reboot; > with the same res

[R] Question according on new package installation test in R 2.11

2010-04-27 Thread Jochen Knaus
Hi all, the package load test in R 2.11.0 is nice, but not disablable with function install.packages(). This is a problem for me, as I install many (>100) global packages with an R script as root in a multiuser environment for each new R version on the machines in our institute. As root is

[R] Merging files

2010-04-27 Thread Alex Jameson
Hi, any one with experience in merging files i have different files, some of the files, have the same fields, so i would like to merge them *File 1:* field a,b,c,d,e,f *File 2:* field a, c, e, m, n *merged file* field a, c, e (ie only the common fields) thanks Alex [[alternative

[R] ggplot2 - help with intervals in geom plot

2010-04-27 Thread Dennis Gascoigne
Hi; I have created a geom_tile plot which does roughly what I want but I have a small tweak I cannot sort out. I have a dataframe binL, binR, HCount, HProbCount where HCount and HProbCount have values ranging from 1-150. I plot binL and binR on the axes respectively and create two charts wi

Re: [R] Cairo package failure to load backend

2010-04-27 Thread Daniel Alcock
Sorry, It appears ,as usual, that I've been an idiot. Turns out you need to use the Cairo command from the package cairoDevice instead of the package Cairo, ie: > Cairo_pdf(filename, width = 7, height = 7, pointsize = 10) Which seems to work ok Sorry for any time I wasted Dan Daniel Alcoc

Re: [R] sprintf() and return() oddity

2010-04-27 Thread Albert-Jan Roskam
Hi Jeremy,   Ok, that makes sense, thank you! Slightly more typing then, but still way more readable code than print(paste( )) or cat() Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wi

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread Marc Schwartz
On Apr 27, 2010, at 10:05 AM, David Freedman wrote: > > I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a > 5 x 6 matrix that contains the mean value of the 5 original matrices. I can > do this by brute force, but there must be a better way than making each > matrix i

Re: [R] get means of elements of 5 matrices in a list

2010-04-27 Thread Jorge Ivan Velez
Hi David, Here is a suggestion: matrix(colMeans(do.call(rbind, lapply(ll, function(x) as.vector(x, nrow = length(ll)) HTH, Jorge On Tue, Apr 27, 2010 at 11:05 AM, David Freedman <3.14da...@gmail.com>wrote: > > I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with > a

Re: [R] suggestion on method dispatch

2010-04-27 Thread Gabor Grothendieck
Define fn.default as a synonym to fn.foo1 (or just rename fn.foo1 as fn.default) and then use NextMethod as shown: fn <- function(x,...) UseMethod("fn") fn.default <- fn.foo1 <- function(x, commonA=1, ...) { print("fn.foo1 is called.") } fn.foo2 <- function(x, uniqueFoo2, common=1, ...){

[R] R for Ubuntu 10.04?

2010-04-27 Thread Tengfei Yin
Hi dear all I am currently using Ubuntu 9.10 (karmic) and R 2.10, I can find a R release that support "karmic" in cran under ubuntu directory, I plan to update my laptop to Ubuntu 10.04 after April 30, since I have to use some new features or new version in it, e.g. QT 4.6, I don't know if there

[R] get means of elements of 5 matrices in a list

2010-04-27 Thread David Freedman
I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a 5 x 6 matrix that contains the mean value of the 5 original matrices. I can do this by brute force, but there must be a better way than making each matrix into a vector and then remaking a matrix thanks very much for a

Re: [R] Tapply.

2010-04-27 Thread steven mosher
Thanks, I had been wondering what Drop did. That makes it more clear. While I have code that loops and does the problem correctly, I wanted to do things the R way and be fast and terse. hehe. So: ID dy jan ... 11264402000 1 1987 NA NA NA NA NA 218 N

  1   2   >