[R] Extract values from data frame in R

2010-08-09 Thread Alexander Eggel
Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill the following criteria:contain minimally one value (x, y or z) bigger than 4. Any ideas? Thanks, Alex. data Sample xy z 1S1 -0.35.32.5 2S20.40.2 -1.2 3S3

Re: [R] Extract values from data frame in R

2010-08-09 Thread Erik Iverson
On 08/09/2010 01:16 AM, Alexander Eggel wrote: Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill the following criteria:contain minimally one value (x, y or z) bigger than 4. Any ideas? Thanks, Alex. data Sample xy z 1S1 -0.35.3

Re: [R] Extract values from data frame in R

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 2:16 AM, Alexander Eggel wrote: Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill the following criteria:contain minimally one value (x, y or z) bigger than 4. Any ideas? Thanks, Alex. data Sample xy z 1S1 -0.3

Re: [R] Problem with installing a package in R!

2010-08-09 Thread Peter Dalgaard
gagea wrote: Dear friends, I am having problem with installing some packages in R in Ubuntu like ISwR. Bellow is the outcome. Anybody can help me to solve this problem. Thanks a lot and sorry if it is very simple question. install.packages(ISwr) ...ISwR..., I presume. Loading Tcl/Tk

Re: [R] Good Book To Work Through This Summer

2010-08-09 Thread Ondrej Vozar
Hello, I think that good introduction for application oriented people is book of Peter Dalgaard, Introductory Statistics with R http://www.springer.com/statistics/computanional+statistics/book/978-0-387-79053-4 This book is good for mastering basics of R. Book I like the one of John Fox, An R and

Re: [R] Odp: Pausing script to allow user input from keyboard.

2010-08-09 Thread Petr PIKAL
Hi you are right. From ?scan default value for imput value is double, so you need to specify that it shall be character. I just showed possible solution not a solution which can be used in all imaginable cases. Regards Petr r-help-boun...@r-project.org napsal dne 07.08.2010 05:20:56: I'm

Re: [R] metafor and meta-analysis at arm-level

2010-08-09 Thread Viechtbauer Wolfgang (STAT)
Dear Angelo, This is (currently) not possible. Best, -- Wolfgang Viechtbauerhttp://www.wvbauer.com/ Department of Methodology and StatisticsTel: +31 (0)43 388-2277 School for Public Health and Primary Care Office Location: Maastricht University, P.O. Box 616

[R] recurrent events

2010-08-09 Thread אבי
Hello, I have a cohort with approx 1,200 patients at the ages of 30-65 that had their first myocardial infarction during 1992: · They were in a follow up until 2005. · About 400 of them died during this period of time (right censored) · Each one of them had up to 4 mi

[R] recurrent events

2010-08-09 Thread avsha38
Hello, I have a cohort with approx 1,200 patients at the ages of 30-65 that had their first myocardial infarction during 1992: • They were in a follow up until 2005. • About 400 of them died during this period of time (right censored) • Each one of them had up to 4 mi recurrent

[R] Smart Indexing

2010-08-09 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Hi all, Suppose that I've two data frames, a and b say, both containing a column 'id'. While data frame 'a' contains multiple rows sharing the same id, data frame 'b' contains just one entry per id (i.e. a 1 to n relationship). For the ease of modeling I now want to generate a new data frame c,

Re: [R] Smart Indexing

2010-08-09 Thread Dimitris Rizopoulos
I think you just need merge(), e.g. a - data.frame(id = rep(1:3, each=3), val = rnorm(9)) b - data.frame(id = 1:3, set1 = LETTERS[1:3], set2 = 5:7) merge(a, b, by = id) I hope it helps. Best, Dimitris On 8/9/2010 11:01 AM, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote: Hi all,

Re: [R] Smart Indexing

2010-08-09 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Thanks, that does the trick. Again a new command learned. Thanks. However, any hints regarding the rownames issue? BR Thorn -Original Message- From: Dimitris Rizopoulos [mailto:d.rizopou...@erasmusmc.nl] Sent: lundi 9 août 2010 11:07 To: Thaler,Thorn,LAUSANNE,Applied Mathematics

[R] (no subject)

2010-08-09 Thread Holt, Hannah Rebecca
Hi there, I have been trying to use the pvclust package but have been having some difficulties. This is the first time I have used R so I am sure the mistake I am making is a basic one. The data I have is a distance matrix and I have been using the command; fit - pvclust(cluster, nboot=1000,

[R] Results with name of dataset

2010-08-09 Thread Evgenia
I generate and save a dataset For example exampledata-runif(10) library(R.utils); saveObject(exampledata, file=exampledata_9810.RData); exampledata_9810- loadObject(exampledata_9810.RData); I use ex function to make alot of calculations using sink to export results (in this simply example

Re: [R] (no subject)

2010-08-09 Thread Ivan Calandra
Hi Hannah, First, don't forget to add a subject to your email! Second, the best way to share data is to copy/paste the output from the dput() function into the email. I have never used pvclust, but the error tells you that your object cluster is not a matrix. What does str(cluster) return?

Re: [R] Results with name of dataset

2010-08-09 Thread Michael Bedward
On 9 August 2010 19:30, Evgenia ev...@aueb.gr wrote: Function ex works fine BUT I don't want the file of results to have the name data Example but exampledata_9810 Example How can I do this? Do you mean that you want the filename to be based on the name of the object passed to the function ?

[R] permanova on MICE object

2010-08-09 Thread FSM
Hi everyone! I have data consisting of several response variables and several explanatory variables. I wish to do a permanova on this using the vegan library and the adonis() function. However, my data had several missing values in it. In order to 'fix' this I used the mice() function from the

Re: [R] [OT] R on Atlas library

2010-08-09 Thread Allan Engelhardt
I don't know about the specific function (a simple, stand-alone reproducible example is always helpful, see the posting guide for details), but ATLAS certainly uses all my cores on a test like this: s - 7500 # Adjust for your hardware a - matrix(rnorm(s*s), ncol = s, nrow = s) b -

Re: [R] About R base

2010-08-09 Thread Allan Engelhardt
Yes, there are differences between R on Windows and R on Linux. You probably want this document: http://cran.r-project.org/bin/windows/base/rw-FAQ.html Hope this helps a little. Allan On 06/08/10 16:47, Stephen Liu wrote: Hi folks, I have R x64 2.11.1 installed on Win 7 64 bit which is

[R] Fwd: RE: pvclust function

2010-08-09 Thread Ivan Calandra
You should reply to the list, not just me, and even more because I cannot really help you!! My guess (but I don't know this package, and even less this function) is that pvclust() is expecting a matrix as the first argument. However, cluster is no data, it is a function. Why, I don't know.

Re: [R] Does anybody know how to control the appearance of the end of the line in lattice?

2010-08-09 Thread Duncan Mackay
Hi see http://finzi.psych.upenn.edu/Rhelp10/2010-April/234441.html The following I think works - its a bit rough - needs improving but saves closing the device. xyplot(y2+y1~x, data=Source, par.settings = list(grid.pars = list(lineend = butt)), #distribute.type=TRUE,

Re: [R] memory use without running gc()

2010-08-09 Thread Allan Engelhardt
How about asking the operating system, e.g. ### Method 1 ## Setup cmd - paste(ps -o vsz, Sys.getpid()) ## In your logging routine z - system(cmd, intern = TRUE) cat(Virtual size: , z[2], \n, sep = ) ### Method 2 ## Setup file - paste(/proc, Sys.getpid(), stat, sep = /) what - vector(list, 44);

[R] TM Package - installation

2010-08-09 Thread Sujatha Upadhyaya
Hi All, I have been trying to do some text analytics in R using tm package. I have installed and loaded the package, along with dependencies (slam, rWeka,rjava). When I try to run a tm_map command, it gives me Error in .jnew(name) : java.lang.NoClassDefFoundError:

[R] Logistic Regression in R (SAS -like output)

2010-08-09 Thread Harsh
Hello useRs, I have a problem at hand which I'd think is fairly common amongst groups were R is being adopted for Analytics in place of SAS. Users would like to obtain results for logistic regression in R that they have become accustomed to in SAS. Towards this end, I was able to propose the

[R] Different colour in each bar in lattice package

2010-08-09 Thread Ronaldo Reis Junior
Hi, I try to plot bars with different colours in a barchart graphic. My idea is make that all X-Levels from trat var with different colour (grey scale). I search for a solution but dont find any. Any help? Thanks dados - structure(list(Medias = c(0.994169096209855, 0.99416342412449,

Re: [R] image plot but data not on grid.

2010-08-09 Thread W Eryk Wolski
qplot does (?) what I was looking for! At least it plots what I want to plot in the interactive modus. However, it seems not to work with Sweave. Thanks On 7 August 2010 16:15, Michael Bedward michael.bedw...@gmail.com wrote: If it's regular, but incomplete, that method will work.  If it's

[R] RExcel: Sctools not available

2010-08-09 Thread Andreas Scherer
 I have a problem with RExcel which I have now installed on top of R 2.11.0. The problem had been posted in 2009 on the forum by someone else, but no (useful) response had been uploaded. The issue is that whenever I am trying to start R from excel, or by clicking the[ RExcel2007 with

Re: [R] Invalid plot type '1'

2010-08-09 Thread Ben Bolker
Stephen Liu satimis at yahoo.com writes: On R-Project The R Manuals http://www.r-project.org/ There are several manuals. Whether I should follow:- An Introduction to R http://www.r-project.org/ The Introduction to R is rather terse, but a reasonable starting point. The other

Re: [R] Different colour in each bar in lattice package

2010-08-09 Thread Henrique Dallazuanna
Try this: with(dados,barchart(Medias * 100 ~ trat | Yvar, col = grey(seq(0, 1, l = nlevels(trat) On Mon, Aug 9, 2010 at 8:18 AM, Ronaldo Reis Junior chrys...@gmail.comwrote: Hi, I try to plot bars with different colours in a barchart graphic. My idea is make that all X-Levels from

[R] error (code 12)

2010-08-09 Thread khazaei
Hi, I am runing R on my mac and I get this error: R(206,0xa01ad720) malloc: *** mmap(size=402048) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug R(206,0xa01ad720) malloc: *** mmap(size=402048) failed (error code=12) ***

[R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread W Eryk Wolski
Hi, ESS replaces _ by -. How can I switch off this feature? I need to be able to type the underscore Thanks Eryk -- Witold Eryk Wolski Heidmark str 5 D-28329 Bremen tel.: 04215261837 __ R-help@r-project.org mailing list

Re: [R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread Marc Schwartz
On Aug 9, 2010, at 7:26 AM, W Eryk Wolski wrote: Hi, ESS replaces _ by -. How can I switch off this feature? I need to be able to type the underscore Thanks Eryk Eryk, If you type the underscore key twice, you get an underscore character rather than the assignment operator. You

Re: [R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread Kevin E. Thorpe
W Eryk Wolski wrote: Hi, ESS replaces _ by -. How can I switch off this feature? I need to be able to type the underscore Thanks Eryk Pressing the underscore a second time gives you the underscore. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant

[R] Difference Between R: wilcox.test and STATA: signrank

2010-08-09 Thread Capasia
This is my first post to the mailing list and I guess it's a pretty stupid question but I can't figure it out. I hope this is the right forum for these kind of questions. Before I started using R I was using STATA to run a Wilcoxon signed-rank test on two variables. See data below:

Re: [R] 3d data plot

2010-08-09 Thread szisziszilvi
Hello! E.g. I have a file like sample.csv: condition1;condition2;myVar 0.902443929;0.879344831;0.963357725 0.91014254;0.717720763;0.953787867 0.899773581;0.871760835;1.031798755 0.892074969;0.863043345;1.080447426 0.847759139;0.894642857;1.080521187 0.847179086;0.89650009;1.111348011

[R] coef(summary) and plyr

2010-08-09 Thread moleps
Dear all, I´m having trouble getting a list of regression variables back into a dataframe. mydf - data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100)) mydf$fac-factor(sample((0:2),replace=T,100)) mydf$y- mydf$x1+0.01+mydf$x2*3-mydf$x3*19+rnorm(100) dlply(mydf,.(fac),function(df)

Re: [R] Logistic Regression in R (SAS -like output)

2010-08-09 Thread Frank Harrell
Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University On Mon, 9 Aug 2010, Harsh wrote: Hello useRs, I have a problem at hand which I'd think is fairly common amongst groups were R is being adopted for

Re: [R] error (code 12)

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 8:23 AM, khaz...@ceremade.dauphine.fr wrote: Hi, I am runing R on my mac and I get this error: R(206,0xa01ad720) malloc: *** mmap(size=402048) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug

Re: [R] Good Book To Work Through This Summer

2010-08-09 Thread Matt Shotwell
There are some book-length documents (downloadable for free) at the contributed documentation section of the R project website here: http://cran.r-project.org/other-docs.html In particular, the book “Practical Regression and Anova using R” by Julian Faraway looks to have the content you want,

Re: [R] Bootstrap

2010-08-09 Thread Shentu
You should bootstrap the two groups separately. The bootstrap sample you get do not follow the same order as the original sample, so the first 62 observations are coming from both groups. What you bootstrapped is essentially the difference between the pooled mean and itself, which would no doubt

Re: [R] Difference Between R: wilcox.test and STATA: signrank

2010-08-09 Thread Alain Guillet
Hi, Look at the output of the test made in R and you can see it is a Wilcoxon rank sum test and not a Wilcoxon signed rank test. If there are ties, I know I prefer wilcox.exact from the exactRankTests. Alain On 09-Aug-10 12:43, Capasia wrote: This is my first post to the mailing list and

Re: [R] coef(summary) and plyr

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 7:51 AM, moleps wrote: Dear all, I´m having trouble getting a list of regression variables back into a dataframe. mydf - data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100)) mydf$fac-factor(sample((0:2),replace=T,100)) mydf$y-

Re: [R] R Base Code

2010-08-09 Thread Ben Bolker
nancy_shackelford nancy.shackelford at gmail.com writes: Hello all, I need to imitate the 'q' function (qnorm, qweibull, etc) for Clark's 2Dt distribution model. I'm not skilled enough in R to code it myself, so I thought I could find the base code for one of the existing 'q' functions and

Re: [R] Difference Between R: wilcox.test and STATA: signrank

2010-08-09 Thread peter dalgaard
On Aug 9, 2010, at 3:03 PM, Alain Guillet wrote: Hi, Look at the output of the test made in R and you can see it is a Wilcoxon rank sum test and not a Wilcoxon signed rank test. It might be helpful to add that paired=TRUE is needed in the call to get the signed-rank test. If there are

[R] bind a data frame columns

2010-08-09 Thread Anna Lippel
Hello guys, I want to rbind the columns of a data frame but I don't know how to do it, let's say: A B C 1 2 3 1 2 3 I want to get 1 1 2 2 3 3 It seems very simple but I still didnt get a find of how to do it...Please help! -- View this message in context:

[R] Two questions on R and cairo/Cairo

2010-08-09 Thread r-help
On a headless Linux server running R 2.9.2 I would like to enable support for cairo, but capabilities(cairo) keeps on giving me FALSE. Is it possible what I am trying to do or can this only be achieved at R build time? I do not have administrative rights on this server. After compiling

Re: [R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread Abhijit Dasgupta
I bogged about 3 possible solutions recently (statbandit.wordpress.com). Possibly the 2nd most recent post. Abhijit On Aug 9, 2010 8:28 AM, W Eryk Wolski wewol...@gmail.com wrote: Hi, ESS replaces _ by -. How can I switch off this feature? I need to be able to type the underscore Thanks

Re: [R] bind a data frame columns

2010-08-09 Thread Ivan Calandra
Hi! Would unlist() work for you? HTH, Ivan Le 8/9/2010 16:00, Anna Lippel a écrit : Hello guys, I want to rbind the columns of a data frame but I don't know how to do it, let's say: A B C 1 2 3 1 2 3 I want to get 1 1 2 2 3 3 It seems very simple but I still didnt

Re: [R] coef(summary) and plyr

2010-08-09 Thread David Winsemius
If you look at the output (as I did) you should see that despite whatever expectations you have developed regarding plyr, that it did not produce a grouping variable: ldply(dl, function(x) coef(summary(x)) ) facEstimate Std. Error t value Pr(|t|) 10 -0.3563418

[R] package names in Latex

2010-08-09 Thread Erin Hodgess
Dear R People: When putting R package names in Latex, do we use \it or \em, please? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com

Re: [R] m-estimators

2010-08-09 Thread S Ellison
check the robustbase package and rlm or hubers in MASS You'll need to know which m-estimator you want, but both those packages include at least some m-estimators. Strictly, so does the base package; the mean is an m-estimator. Just not a very robust one! S Ellison Iasonas Lamprianou

Re: [R] Logistic Regression in R (SAS -like output)

2010-08-09 Thread Gabor Grothendieck
On Mon, Aug 9, 2010 at 6:43 AM, Harsh singhal...@gmail.com wrote: Hello useRs, I have a problem at hand which I'd think is fairly common amongst groups were R is being adopted for Analytics in place of SAS. Users would like to obtain results for logistic regression in R that they have become

Re: [R] package names in Latex

2010-08-09 Thread Uwe Ligges
On 09.08.2010 16:30, Erin Hodgess wrote: Dear R People: When putting R package names in Latex, do we use \it or \em, please? Thanks, Erin Depends. For example, the style guide of the Journal of Statistical Software asks you to use \pkg{} which is defined as

Re: [R] package names in Latex

2010-08-09 Thread Marc Schwartz
On Aug 9, 2010, at 9:30 AM, Erin Hodgess wrote: Dear R People: When putting R package names in Latex, do we use \it or \em, please? Thanks, Erin Erin, I may be missing something specific to your application, but for the R Journal, JSS and .Rd help files, package names would typically

[R] nested 'by'

2010-08-09 Thread steven mosher
Assuming a data frame or matrix with two columns representing variable that you want to aggregate over. you want to calculate column means, by year, for each Id example-data.frame(id=c(rep(12345,5),rep(54321,6),rep(45678,7)),Year=rep(seq(1900,1902,by=1),6), x=seq(1,18,by=1),y=seq(18,1,by=-1))

Re: [R] image plot but data not on grid.

2010-08-09 Thread Hadley Wickham
With sweave, you need to explicitly print() the output of ggplot2 and lattice plots. Hadley On Mon, Aug 9, 2010 at 6:32 AM, W Eryk Wolski wewol...@gmail.com wrote: qplot does (?) what I was looking for! At least it plots what I want to plot in the interactive modus. However, it seems not to

Re: [R] 3d data plot

2010-08-09 Thread Uwe Ligges
On 09.08.2010 13:17, szisziszilvi wrote: Hello! E.g. I have a file like sample.csv: condition1;condition2;myVar 0.902443929;0.879344831;0.963357725 0.91014254;0.717720763;0.953787867 0.899773581;0.871760835;1.031798755 0.892074969;0.863043345;1.080447426 0.847759139;0.894642857;1.080521187

Re: [R] coef(summary) and plyr

2010-08-09 Thread Hadley Wickham
On Mon, Aug 9, 2010 at 9:29 AM, David Winsemius dwinsem...@comcast.net wrote: If you look at the output (as I did)  you should see that despite whatever expectations you have developed regarding plyr, that it did not produce a grouping variable: ldply(dl, function(x) coef(summary(x)) )   fac

Re: [R] nested 'by'

2010-08-09 Thread Henrique Dallazuanna
Try this: aggregate(example[c('x', 'y')], example[c('id', 'Year')], 'mean') On Mon, Aug 9, 2010 at 11:46 AM, steven mosher mosherste...@gmail.comwrote: Assuming a data frame or matrix with two columns representing variable that you want to aggregate over. you want to calculate column means,

Re: [R] Invalid plot type '1'

2010-08-09 Thread Stephen Liu
The Introduction to R is rather terse, but a reasonable starting point. The other manuals listed on that page are special-purpose manuals for installation administration, development, etc.. You can try the manuals listed in the contributed documentation section too. Hi Ben, Thanks for

Re: [R] RExcel: Sctools not available

2010-08-09 Thread Erich Neuwirth
Please post any qeustions regarding RExcel to the rcom-l mailing list. You can subscribe at rcom.univie.ac.at On Aug 9, 2010, at 1:42 PM, Andreas Scherer wrote: I have a problem with RExcel which I have now installed on top of R 2.11.0. The problem had been posted in 2009 on the forum by

Re: [R] nested 'by'

2010-08-09 Thread steven mosher
That works. Thanks On Mon, Aug 9, 2010 at 7:55 AM, Henrique Dallazuanna www...@gmail.comwrote: Try this: aggregate(example[c('x', 'y')], example[c('id', 'Year')], 'mean') On Mon, Aug 9, 2010 at 11:46 AM, steven mosher mosherste...@gmail.comwrote: Assuming a data frame or matrix with two

Re: [R] Invalid plot type '1'

2010-08-09 Thread Erik Iverson
Stephen Liu wrote: The Introduction to R is rather terse, but a reasonable starting point. The other manuals listed on that page are special-purpose manuals for installation administration, development, etc.. You can try the manuals listed in the contributed documentation section too.

Re: [R] Extract values from data frame in R

2010-08-09 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Erik Iverson Sent: Sunday, August 08, 2010 11:27 PM To: Alexander Eggel Cc: r-help@r-project.org Subject: Re: [R] Extract values from data frame in R On 08/09/2010 01:16 AM,

Re: [R] TRUE/FALSE

2010-08-09 Thread Wu Gong
I can't understand why you doubled ( if((combos[e,f]==1) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/TRUE-FALSE-tp2318668p2318684.html Sent from the R help mailing list archive at Nabble.com. __

[R] if several expressions (basic question)

2010-08-09 Thread Dwayne Blind
Dear R users, I have a basic question. In an if statement, when several expressions have to be evaluated, they must be put inside curly braces, right ? For example : if (x2) { y=3 z=2 } Thank you very much, Dwayne [[alternative HTML version deleted]]

Re: [R] TRUE/FALSE

2010-08-09 Thread Uwe Ligges
On 09.08.2010 17:47, Wu Gong wrote: I can't understand why you doubled ( if((combos[e,f]==1) - A R learner. ? Can you please refer and quote the original messages you are replying to and can you please also include the one who asked the question? Not everybody is subscribed to this

Re: [R] coef(summary) and plyr

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 10:11 AM, moleps wrote: ldply doesnt need a grouping variable as far as I understand the command.. There is one further improvement to consider. When I tried using dlply to tackle a problem on which I had been bashing my head for the last three days and it gave just

Re: [R] if several expressions (basic question)

2010-08-09 Thread Joshua Wiley
On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind dwaynebl...@gmail.com wrote: Dear R users, I have a basic question. In an if statement, when several expressions have to be evaluated, they must be put inside curly braces, right ? Yes. if(1 2) {print(hello); print(world)} if(4 2) {print(hello);

Re: [R] if several expressions (basic question)

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind dwaynebl...@gmail.com wrote: Dear R users, I have a basic question. In an if statement, when several expressions have to be evaluated, they must be put inside curly braces, right ? Yes. if(1

Re: [R] if several expressions (basic question)

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 12:29 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 9:26 AM, David Winsemius dwinsem...@comcast.net wrote: On Aug 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind dwaynebl...@gmail.com wrote: Dear R users, I have a basic

Re: [R] if several expressions (basic question)

2010-08-09 Thread Dwayne Blind
Thanks to all of you. Dwayne 2010/8/9 David Winsemius dwinsem...@comcast.net On Aug 9, 2010, at 12:29 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 9:26 AM, David Winsemius dwinsem...@comcast.net wrote: On Aug 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 8:51 AM,

[R] regression line of 2 independent variables

2010-08-09 Thread array chip
Hi, I would like to a draw a scatterplot of x1 and x2 (plot (x1, x2)), and also want to draw a sort of regression line across the data points. But x1 and x2 are just 2 independent variables, so in this case a regression of x1 over x2, or vice versa, is not appropriate per se. What would be an

Re: [R] TRUE/FALSE

2010-08-09 Thread Wu Gong
Hi Uwe, I'm sorry for the inconvenience I caused. I read posts of R Help through nabble forum. When I reply a post through the forum, it is distinctly clear that my message is a reply to the original poster's post, just like a conversation. Those posts which quote the original message which

Re: [R] if several expressions (basic question)

2010-08-09 Thread jim holtman
The safe bit is to always use the curly brackets on the 'if' statements to avoid problems. I always do if (..) { statement } On Mon, Aug 9, 2010 at 12:29 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: On Mon, Aug 9, 2010 at 9:26 AM, David Winsemius dwinsem...@comcast.net wrote:

Re: [R] coef(summary) and plyr

2010-08-09 Thread Hadley Wickham
There is one further improvement to consider. When I tried using dlply to tackle a problem on which I had been bashing my head for the last three days and it gave just the results I had been looking for, I also noticed that the dlply function returns the grouping variable levels in an

[R] optimization subject to constraints

2010-08-09 Thread Gildas Mazo
Dear R users, I'm looking for tools to perform optimization subject to constraints, both linear and non-linear. I don't mind which algorithm may be used, my primary aim is to get something general and easy-to-use to study simples examples. Thanks for helping, Gildas

Re: [R] optimization subject to constraints

2010-08-09 Thread Dwayne Blind
Hi ! Why not constrOptim ? Dwayne 2010/8/9 Gildas Mazo gildas.m...@curie.fr Dear R users, I'm looking for tools to perform optimization subject to constraints, both linear and non-linear. I don't mind which algorithm may be used, my primary aim is to get something general and easy-to-use

[R] List of lists ?

2010-08-09 Thread Carlos Petti
Dear list, I have to use a list of lists containing vectors. For instance : [[1]] [[1]][[1]] [1] 1 2 3 [[1]][[2]] [1] 3 2 1 I want to attribute vectors to the main list without use of an intermediate list, but it does not work : x - list() x[[1]][[1]] - c(1, 2, 3) x[[1]][[2]] - c(3, 2, 1)

Re: [R] optimization subject to constraints

2010-08-09 Thread Ravi Varadhan
You may want to look at: http://cran.r-project.org/web/packages/alabama/index.html Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gildas Mazo Sent: Monday, August 09, 2010 12:49 PM To: r-help@r-project.org Subject: [R]

Re: [R] optimization subject to constraints

2010-08-09 Thread Matthias Gondan
try command solnp in package Rsolnp Am 09.08.2010 18:56, schrieb Dwayne Blind: Hi ! Why not constrOptim ? Dwayne 2010/8/9 Gildas Mazogildas.m...@curie.fr Dear R users, I'm looking for tools to perform optimization subject to constraints, both linear and non-linear. I don't mind which

Re: [R] optimization subject to constraints

2010-08-09 Thread Ravi Varadhan
constrOptim can only handle linear inequality constraints. It cannot handle equality (linear or nonlinear) as well as nonlinear inequality constraints. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dwayne Blind Sent:

[R] TRUE/FALSE

2010-08-09 Thread Turn Fall
Here is my code # determine the DDOA measurements for(e in 1:numSensors) { for(f in 1:numSensors) { if((combos[e,f]==1) {

Re: [R] coef(summary) and plyr

2010-08-09 Thread moleps
ldply doesnt need a grouping variable as far as I understand the command.. Description For each element of a list, apply function then combine results into a data frame Usage ldply(.data, .fun = NULL, ..., .progress = none) regards, M On 9. aug. 2010, at 15.33, David Winsemius wrote:

[R] Changing downloaded source code into a package

2010-08-09 Thread JH
I am wanting to change some lines of code in the R package named nlme http://cran.r-project.org/web/packages/nlme/index.html To do this I have downloaded the Package source named nlme_3.1-96.tar.gz, opened up the file and changed the text documents within the folder named R, specifically the

[R] Turning a source into a Package

2010-08-09 Thread JH
I want to edit a function in the nlme package. I download the package source nlme_3.1-96.tar.gz from the link below then edit it one of the scripts inside of it. From this stage how can I turn it into a package that I can use in R? http://cran.r-project.org/web/packages/nlme/index.html -- View

Re: [R] Difference Between R: wilcox.test and STATA: signrank

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 9:52 AM, peter dalgaard wrote: On Aug 9, 2010, at 3:03 PM, Alain Guillet wrote: Hi, Look at the output of the test made in R and you can see it is a Wilcoxon rank sum test and not a Wilcoxon signed rank test. It might be helpful to add that paired=TRUE is needed in

[R] Pie Chart in map

2010-08-09 Thread LCOG1
Hey R'rs, So im sick of dealing with ESRI products and am looking to stream line a process i now use GIS to do using R. I have made a lot of maps using R but have not yet seen a map that puts pie charts within the map to help represent data like the attachment.

Re: [R] TRUE/FALSE

2010-08-09 Thread jim holtman
most likely 'combos[e,f]' is NA; take a look at your data. Also put options(error=utils::recover) in your program so that when the error occurs you can learn to use the debugging mode to trace down the problem. On Mon, Aug 9, 2010 at 11:38 AM, Turn Fall turnandf...@live.co.uk wrote: Here is

Re: [R] List of lists ?

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 12:57 PM, Carlos Petti wrote: Dear list, I have to use a list of lists containing vectors. For instance : [[1]] [[1]][[1]] [1] 1 2 3 [[1]][[2]] [1] 3 2 1 I want to attribute vectors to the main list without use of an intermediate list, but it does not work : More

Re: [R] List of lists ?

2010-08-09 Thread jim holtman
Is this what you want: x - list() x[[1]] - list(1:3) x[[2]] - list(3:1) x [[1]] [[1]][[1]] [1] 1 2 3 [[2]] [[2]][[1]] [1] 3 2 1 On Mon, Aug 9, 2010 at 12:57 PM, Carlos Petti carlos.pe...@gmail.com wrote: Dear list, I have to use a list of lists containing vectors. For instance :

Re: [R] package names in Latex

2010-08-09 Thread Arnaud Le Rouzic
When putting R package names in Latex, do we use \it or \em, please? As far as I know, the only difference between \it and \em is that \em words are unitalicized in an italics portion of the text, which is desirable in most cases. However, I am not sure that italics is the most common

Re: [R] optimization subject to constraints

2010-08-09 Thread Spencer Graves
To find every help page containing the term constrained optimization, you can try the following: library(sos) co - findFn('constrained optimization') Printing this co object opens a table in a web browser with all matches sorted first by the package with the most matches and

Re: [R] Changing downloaded source code into a package

2010-08-09 Thread Gabor Grothendieck
On Mon, Aug 9, 2010 at 10:22 AM, JH dealing_with_do...@hotmail.com wrote: I am wanting to change some lines of code in the R package named nlme http://cran.r-project.org/web/packages/nlme/index.html To do this I have downloaded the Package source named nlme_3.1-96.tar.gz, opened up the file

Re: [R] Pie Chart in map

2010-08-09 Thread jim holtman
Check out the gallery of R chart; here is one to look at: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=143 On Mon, Aug 9, 2010 at 1:04 PM, LCOG1 jr...@lcog.org wrote: Hey R'rs,    So im sick of dealing with ESRI products and am looking to stream line a process i now use GIS

Re: [R] coef(summary) and plyr

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 12:47 PM, Hadley Wickham wrote: There is one further improvement to consider. When I tried using dlply to tackle a problem on which I had been bashing my head for the last three days and it gave just the results I had been looking for, I also noticed that the dlply

Re: [R] coef(summary) and plyr

2010-08-09 Thread Hadley Wickham
That's exactly what dlply does - so you should never have to do that yourself. I'm unclear what you are saying. Are you saying that the plyr function _should_ have examined the objects in that list and determined that there were 4 rows and properly labeled the rows to indicate which list

Re: [R] Changing downloaded source code into a package

2010-08-09 Thread Matt Shotwell
See comments below. On Mon, 2010-08-09 at 10:22 -0400, JH wrote: I am wanting to change some lines of code in the R package named nlme http://cran.r-project.org/web/packages/nlme/index.html To do this I have downloaded the Package source named nlme_3.1-96.tar.gz, opened up the file and

Re: [R] plot the dependent variable against one of the predictors with other predictors as constant

2010-08-09 Thread Greg Snow
Look at the TkPredict and Predict.Plot functions in the TeachingDemos package as a couple of options. -- 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

Re: [R] Logistic Regression in R (SAS -like output)

2010-08-09 Thread Frank Harrell
Note that stepwise variale selection based on AIC has all the problems of stepwise variable selection based on P-values. AIC is just a restatement of the P-Value. Frank Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics

  1   2   >