[R] Using R in combination with GRASS for image classification

2010-08-09 Thread Chethan S
Hello everybody! For my academic project work I intend to use only open-source software. My objective is to carry out classification of satellite digital images using Geostatistics. I found out GRASS is a good software for image processing. Also a good geostatistics software is R. It is also known

[R] Replacing characters

2010-08-09 Thread Orvalho Augusto
Hello guys! May be I am lazy but I need to replace a character like \ or ' or to escape them in a character vector to write a SQL statement. How can I do that? Caveman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Why use numFold in evaluate_Weka_classifier of RWeka

2010-08-09 Thread s0300851
Hi everyone, I have a question about using RWeka package, we know that instruction make_Weka_classifier that can help us to build a model,and evaluate_Weka_classifier instruction can help us to evaluate the performance of the model using on new data. But I have a question about how to using

Re: [R] Multiple imputation, especially in rms/Hmisc packages

2010-08-09 Thread Mark Seeto
Thank you for your reply Frank. I am not familiar with the contrast test, but I'll see what I can find out about it. Mark Frank Harrell wrote: On Mon, 9 Aug 2010, Mark Seeto wrote: Hello, I have a general question about combining imputations as well as a question specific to the rms and Hm

Re: [R] Function to Define a Function

2010-08-09 Thread Gabor Grothendieck
On Mon, Aug 9, 2010 at 9:31 PM, Derek Ogle wrote: > I am trying to define a general R function that has a function as the output > that depends on the user's input arguments (this may make more sense by > looking at the toy example below).  My real use for this type of code is to > allow a user

Re: [R] ggplot2 histograms... a subtle error found

2010-08-09 Thread hadley wickham
> When ggplot2 verifies the widths before stacking (the default position for > histograms), it computes the widths from the minimum and maximum values for > each bin.  However, because the width of the bins (0.28) is much smaller > than the scale of the edges (6.8e+09), there is some underflow and

Re: [R] Identification of Outliners and Extraction of Samples

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 6:27 PM, Alexander Eggel wrote: Hello everybody, I need to know which samples (S1-S6) contain a value that is bigger than the median + five standard deviations of the column he is in. This is just an example. Command should be applied to a data frame wich is a lot bigg

Re: [R] package for measurement error models

2010-08-09 Thread Carrie Li
Thanks. I found the code in the link you gave me very helpful. But, I just have few questions regarding the code. It seems to me that in (from wikipdeia)Deming regression, it assumes that the ratios of the variances of two measurement errors are constant for all pairs of (x_i, y_i). However, if the

Re: [R] Multiple imputation, especially in rms/Hmisc packages

2010-08-09 Thread Frank Harrell
On Mon, 9 Aug 2010, Mark Seeto wrote: Hello, I have a general question about combining imputations as well as a question specific to the rms and Hmisc packages. The situation is multiple regression on a data set where multiple imputation has been used to give M imputed data sets. I know how to

[R] Function to Define a Function

2010-08-09 Thread Derek Ogle
I am trying to define a general R function that has a function as the output that depends on the user's input arguments (this may make more sense by looking at the toy example below). My real use for this type of code is to allow a user to choose from many parameterizations of the same general

[R] Multiple imputation, especially in rms/Hmisc packages

2010-08-09 Thread Mark Seeto
Hello, I have a general question about combining imputations as well as a question specific to the rms and Hmisc packages. The situation is multiple regression on a data set where multiple imputation has been used to give M imputed data sets. I know how to get the combined estimate of the covarian

Re: [R] Importing arguments for use by functions in a script

2010-08-09 Thread Joshua Wiley
Hi, Since no one has answered this, I will take a shot. I doubt it would really take more work to just put the functions in a script. Sure you would have to 'customize' each one, but since you are entering their names, name of the desired output object, and arguments, simply directly entering th

Re: [R] coxph

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 8:17 PM, Hongying Li wrote: Hello, when using coxph function from survival package, what do you do if you encounter such problem like: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 3,4 ; beta may

[R] coxph

2010-08-09 Thread Hongying Li
Hello, when using coxph function from survival package, what do you do if you encounter such problem like: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 3,4 ; beta may be infinite. Thanks!

[R] Tukey post hoc test and two way repeated measures ANOVA

2010-08-09 Thread Nicola Spotorno
Dear all, I have a serious problem in applying Tukey post hoc after a repeated measure ANOVA. I followed the suggestions that I found in this help -list especially this one: //[R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA You want to use lme() in package nlme,

Re: [R] Identification of Outliners and Extraction of Samples

2010-08-09 Thread Frank Harrell
On Mon, 9 Aug 2010, Alexander Eggel wrote: Hello everybody, I need to know which samples (S1-S6) contain a value that is bigger than the median + five standard deviations of the column he is in. This is just an Why not the 70th percentile plus 6 times the difference in the 85th and 75th p

[R] Identification of Outliners and Extraction of Samples

2010-08-09 Thread Alexander Eggel
Hello everybody, I need to know which samples (S1-S6) contain a value that is bigger than the median + five standard deviations of the column he is in. This is just an example. Command should be applied to a data frame wich is a lot bigger (over 100 columns). Any solutions? Thank you very much for

Re: [R] coef(summary) and plyr

2010-08-09 Thread Hadley Wickham
On Mon, Aug 9, 2010 at 4:30 PM, Matthew Dowle wrote: > > > Another option for consideration : > > library(data.table) > mydt = as.data.table(mydf) > > mydt[,as.list(coef(lm(y~x1+x2+x3))),by=fac] >     fac X.Intercept.       x1       x2        x3 > [1,]   0  -0.16247059 1.130220 2.988769 -19.14719

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

2010-08-09 Thread Frank Harrell
In the trivial case where all candidate predictors have one degree of freedom (which is unlikely as some things will be nonlinear or have > 2 categories), adding a variable if it increases AIC is the same as adding it if its chi-square exceeds 2. This corresponds to an alpha level of 0.157 f

Re: [R] coef(summary) and plyr

2010-08-09 Thread Matthew Dowle
Another option for consideration : library(data.table) mydt = as.data.table(mydf) mydt[,as.list(coef(lm(y~x1+x2+x3))),by=fac] fac X.Intercept. x1 x2x3 [1,] 0 -0.16247059 1.130220 2.988769 -19.14719 [2,] 1 0.08224509 1.216673 2.847960 -19.16105 [3,] 2 0.020523

[R] build.pl in building library with Rtools211

2010-08-09 Thread Hintzen, Niels
Dear all, As I couldn't find any thread on the internet I hope the help-list might help me out. I've tried to update Rtools from R210 used in combination with R2.9.1 to R211 in combination with R2.11.1. However, I do not succeed. I have R2.11.1 running, as well as Inno Setup 5, HTML help and M

Re: [R] Pie Chart in map

2010-08-09 Thread Greg Snow
Look at the my.symbols and subplot functions in the TeachingDemos package, one of those may work for you. Note however that the author of those functions is one of the advocates against the use of pie charts and if there were a free (as in speech) license that would allow for excluding any use

[R] creating pdf of wireframe

2010-08-09 Thread jculbertson
Dear R list, I have written some code to produce several wireframe plots in a panel. They look good, but when I try to create a pdf, many (but not all) of the details I have specified are not reproduced. For example, the line width I have specified is not reproduced, and neither are the font sizes

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

2010-08-09 Thread Gabor Grothendieck
On Mon, Aug 9, 2010 at 1:29 PM, Gabor Grothendieck wrote: > On Mon, Aug 9, 2010 at 10:22 AM, 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 n

Re: [R] x-axis annotation

2010-08-09 Thread array chip
Thank you David! - Original Message From: David Winsemius To: array chip Cc: r-help@r-project.org Sent: Mon, August 9, 2010 12:42:06 PM Subject: Re: [R] x-axis annotation On Aug 9, 2010, at 3:14 PM, array chip wrote: > Hi, I have a simple plot by plot(x,y, log='xy'). However, due t

Re: [R] x-axis annotation

2010-08-09 Thread David Winsemius
On Aug 9, 2010, at 3:14 PM, array chip wrote: Hi, I have a simple plot by plot(x,y, log='xy'). However, due to the large range of values of x, the x-axis annotation is printed as "2e+02 1e+03 5e +03 2e+04 1e+05" instead of "200 1000 5000 2 10". How can I make it printed as

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

2010-08-09 Thread Duncan Murdoch
On 09/08/2010 10:22 AM, 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 That is usually a bad idea. If you have found a bug in the package, let the maintainers know about it. If you want to add to it,

[R] x-axis annotation

2010-08-09 Thread array chip
Hi, I have a simple plot by plot(x,y, log='xy'). However, due to the large range of values of x, the x-axis annotation is printed as "2e+02 1e+03 5e+03 2e+04 1e+05" instead of "200 1000 5000 2 10". How can I make it printed as in the later one? Thanks John _

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 V

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 [mailto:r-he

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 c

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 l

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 func

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 wrote: > > 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 usin

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 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 changed the text docu

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

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 solu

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 wrote: > Dear list, > > I have to use a list of lists containing vectors. > > For instance : > > [[1]] > [[

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 spec

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 wrote: > > Here is my code > >        

[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. http://r.789695.n4.nabble.com

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 th

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

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

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

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

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

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

[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 Dwayne Blind
Hi ! Why not constrOptim ? Dwayne 2010/8/9 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

[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] 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 attri

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 wrote: > On Mon, Aug 9, 2010 at 9:26 AM, David Winsemius > wrote: >> >> On Aug 9, 2010, at 12:14 PM, Joshua Wil

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 i

[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] if several expressions (basic question)

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

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 > wrote: On Aug 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind wrote: Dear R users, I have a basic question. In an "if statement", when several expre

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

2010-08-09 Thread Joshua Wiley
On Mon, Aug 9, 2010 at 9:26 AM, David Winsemius wrote: > > On Aug 9, 2010, at 12:14 PM, Joshua Wiley wrote: > >> On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind >> wrote: >>> >>> Dear R users, >>> >>> I have a basic question. In an "if statement", when several expressions >>> have >>> to be evaluate

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

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

2010-08-09 Thread Joshua Wiley
On Mon, Aug 9, 2010 at 8:51 AM, Dwayne Blind 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"); print("

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 th

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 t

[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 (x>2) { y=3 z=2 } Thank you very much, Dwayne [[alternative HTML version deleted]]

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-help@r-pr

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

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 to

Re: [R] nested 'by'

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

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 so

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

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 wrote: > 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 I

Re: [R] coef(summary) and plyr

2010-08-09 Thread Hadley Wickham
On Mon, Aug 9, 2010 at 9:29 AM, David Winsemius 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    Estimate Std

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

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 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 work with Sweave.

[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] 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 typic

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 \newcommand{\pkg}[1]{{\font

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

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 06/08/

[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] 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 0.14383

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

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" wrote: Hi, ESS replaces "_" by "<-". How can I switch off this feature? I need to be able to type the underscore Thanks Eryk -- Witold

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

[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: http://r.789695.n4.nabble

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

Re: [R] R Base Code

2010-08-09 Thread Ben Bolker
nancy_shackelford 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 > just modify

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<- mydf$x1+0.01+mydf$x2*3-mydf$x3*19+rn

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 I

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

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 R(206,0xa01ad7

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 An

[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) lm(y~

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

[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: https://spread

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 P

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 opera

[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 https://stat.ethz.ch/m

[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) *** error:

  1   2   >