Re: [R] glm with binomial errors - problem with overdispersion

2011-06-14 Thread Prof Brian Ripley
I presume you intended 'type' and 'fragment' to be factors (see below). Such a model would fit exactly. The additive model model - glm(y ~ fragment+type, binomial) is only modestly over-dispersed, and shows that 'fragment' has zero effect. Not 'a negligible effect', but no effect. So

Re: [R] Change Data Point Label in biplot()

2011-06-14 Thread Prof Brian Ripley
On Mon, 13 Jun 2011, Bao, Yongjian (GE Healthcare) wrote: I'm a new user of R, and trying to display the result of a PCA data set with biplot(). Biplot() draws the projections of data points to the first two principal axis with a text level (I guess it is the name of the data points). This

Re: [R] glm with binomial errors - problem with overdispersion

2011-06-14 Thread Anna Mill
thanks for the answer! yes, indeed, type and fragment should be factors but it was no artificial data! 2011/6/14 Prof Brian Ripley rip...@stats.ox.ac.uk I presume you intended 'type' and 'fragment' to be factors (see below). Such a model would fit exactly. The additive model model -

[R] Multiply list objects

2011-06-14 Thread mdvaan
Hi, I am trying to use the objects from the list below to create more objects. For each year in h I am trying to create as many objects as there are B's keeping only the values of B. Example for 1999: $`1999`$`8025` B B 8025 8026 8027 8028 8029 802511100 8026

Re: [R] Count objects and print it into a new variable

2011-06-14 Thread Majid Einian
Also this one: AnnualFireCount2 - as.data.frame(table(yukon$Fire_Year)) names(AnnualFireCount2) c(Year,Fires) On Tue, Jun 14, 2011 at 9:01 AM, Majid Einian einia...@gmail.com wrote: Hi, If I understood your question, maybe sth like this:

Re: [R] Count objects and print it into a new variable

2011-06-14 Thread Majid Einian
Hi, If I understood your question, maybe sth like this: AnnualFireCount-aggregate(ANY.OF.YOUR.VARIABLES~Fire_Year, length, data=yukon) you can put any variable name in your dataframe (eg Fire_Year) in the place of ANY.OF.YOUR.VARIABLES as the function only counts them. On Tue, Jun 14, 2011 at

Re: [R] glm with binomial errors - problem with overdispersion

2011-06-14 Thread peter dalgaard
On Jun 14, 2011, at 08:13 , Prof Brian Ripley wrote: I presume you intended 'type' and 'fragment' to be factors (see below). Such a model would fit exactly. The additive model model - glm(y ~ fragment+type, binomial) is only modestly over-dispersed, and shows that 'fragment' has zero

Re: [R] glm with binomial errors - problem with overdispersion

2011-06-14 Thread Anna Mill
Also note that success+failure is exactly 102 in fragment 1 and 105 in fragment 2, as is the sum of the successes for each fragment (of course it has to to make exactly 1/4). It is rather easy to suspect that it is actually a 0/1 coding of the type (as in tick exactly one box), and not

Re: [R] Convert SAS code to R code about survival analysis

2011-06-14 Thread Paul Hiemstra
Dear Karena, Your title in the SAS analysis suggests this is homework related to some course. If this is true, please refer to your tutor for these kinds of questions, this mailing is list is not meant for these kinds of questions [1]. For survival analysis in R, the CRAN task view for that

Re: [R] Logistic regression with 2 factors and 3 covariates

2011-06-14 Thread Uwe Ligges
On 13.06.2011 19:37, Alal wrote: Hello I'm trying to write a model for my data, but Im not sure it's statistically correct. I have one variable (2 levels: A or B). To explain it, I've got 2 factors and 3 continuous variables. I need to do a logistic regression, but... First: can I actually

[R] How to run zero inflated mixed model and hurdle mixed model in R

2011-06-14 Thread Xiongqing Zhang
Dear Mr. or Ms.,   I would like to use the R-software to run the zero inflated mixed model and hurdle mixed model. But I do not know how to do? Would you please tell me the code and data format?   I will be very appreciated if you can help me. Thank you very much.   Best regards,   Sincerely,

Re: [R] How to calculate the product of every two elements in two lists?

2011-06-14 Thread carla moreira
Thank you very much, in fact this is different of what I want, because when I use lapply(seq(ncol(o1)), function(s) o1[, s] * o2) I will obtain products of the columns of o1 by columns of o2, and I want by rows. Anyway thank you very much for your help. Carla 2011/6/14 djmuseR [via R]

Re: [R] How to calculate the product of every two elements in two lists?

2011-06-14 Thread carla moreira
Hi, I always find memory problems when usuing mapply, lapply for samples sizes 500 or more. Carla -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-the-product-of-every-two-elements-in-two-lists-tp3593832p3596088.html Sent from the R help mailing list archive at

Re: [R] predictive logistic model cell-biology, non-dichotomous data

2011-06-14 Thread Hugo Mildenberger
Andreas, the jpg files you linked below do not exist, but if all you need for the moment is a predictive model and graphical displays of the fitted model and the calibrated sample data, then the R - package calib will do it very well. Usage is very simple. Best, Hugo On Tuesday 14 June 2011

Re: [R] How to run zero inflated mixed model and hurdle mixed model in R

2011-06-14 Thread ONKELINX, Thierry
Have a look at the MCMCglmm package. http://www.freestatistics.org/cran/web/packages/MCMCglmm/vignettes/Overview.pdf Best regards, Thierry -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Xiongqing Zhang Verzonden: dinsdag 14

Re: [R] computer name

2011-06-14 Thread Martin Maechler
Erich Neuwirth erich.neuwi...@univie.ac.at on Mon, 13 Jun 2011 11:16:08 +0200 writes: This depends on your OS. on Windows, Sys.getenv('computername') should work. Sys.info()['nodename'] should work on all systems. yes, indeed! BTW: Learn something more by considering the

[R] Reset R's library to base packages only (remove all installed contributed packages)

2011-06-14 Thread Janko Thyson
Dear list, is there a way to comfortably reset R's library such that it only contains only the base packages again? In other words, how can I uninstall all contributed packages that I installed? Is there some sort of index that's keeping track of what has been installed? If so, a pointer

Re: [R] Can we prepare a questionaire in R

2011-06-14 Thread amrita gs
Hi all So we can retrieve data from mysql database and do the data analysis in R. Is it easy to do the data analysis with the values of the form elements stored in mysql db,which are of different patterns for eg:- for radio buttons there may be values yes or no,some may have textarea

Re: [R] glm with binomial errors - problem with overdispersion

2011-06-14 Thread peter dalgaard
On Jun 14, 2011, at 09:53 , Anna Mill wrote: Also note that success+failure is exactly 102 in fragment 1 and 105 in fragment 2, as is the sum of the successes for each fragment (of course it has to to make exactly 1/4). It is rather easy to suspect that it is actually a 0/1 coding of

[R] Setting up RODBC or RMySQL package.

2011-06-14 Thread amrita gs
Hi all, I have installed RODBC package. But am not able to connect it for using MySQL. For accessing MySQL Db a connector is required.For that can i use the mysql db which is a part of WAMP server or use separate mysql db. I know there is a package called RMySQL. But i find it very difficult

[R] txtProgressBar and parallelized foreach

2011-06-14 Thread Julian TszKin Chan
Hi all, I can create a text-progress bar in a foreach loop by the following code : n=10 foreach( i = 1:n ,.combine=c) %do%{ setTxtProgressBar(pb, i) Sys.sleep(0.1) } However, once i use the parallelized foreach, the text-progress bar disappear. Any solution to this problem?

Re: [R] About 'hazard ratio', urgent~~~

2011-06-14 Thread Mike Marchywka
Date: Mon, 13 Jun 2011 19:44:15 -0700 From: dr.jz...@gmail.com To: r-help@r-project.org Subject: [R] About 'hazard ratio', urgent~~~ Hi, I am new to R. My question is: how to get the 'hazard ratio' using the 'coxph' function in

[R] Calling R from Java

2011-06-14 Thread Mohed Alhammed
Up, Any helps in this would be really appreciated. I stuck with this. Regards --- On Mon, 6/13/11, saleh [via R] ml-node+3593743-1399725529-244...@n4.nabble.com wrote: From: saleh [via R] ml-node+3593743-1399725529-244...@n4.nabble.com Subject: Calling R from Java To: saleh s.alham...@yahoo.com

Re: [R] Setting up RODBC or RMySQL package.

2011-06-14 Thread Uwe Ligges
On 14.06.2011 12:22, amrita gs wrote: Hi all, I have installed RODBC package. But am not able to connect it for using MySQL. For accessing MySQL Db a connector is required.For that can i use the mysql db which is a part of WAMP server or use separate mysql db. Just install the myodbc

Re: [R] txtProgressBar and parallelized foreach

2011-06-14 Thread Uwe Ligges
I think you do not understand how the parallelization works: Different iterations from your foreach() are run on different nodes, hence you change the progressbar on the node rather on the master in your loop. Uwe Ligges On 14.06.2011 12:23, Julian TszKin Chan wrote: Hi all, I can create a

Re: [R] persp and trans3d for type=h points

2011-06-14 Thread Uwe Ligges
You are drawing the line to the center of the plot (which is 0 be design). What you actually want is to plot segments to the min(z) value. Example: Z - matrix(1:9, 3) surf - persp(1:3, 1:3, Z) points(trans3d(x=2, y=2, z=5, surf), col=red, pch=19) from - trans3d(x=2, y=2, z=5, surf) to -

[R] Expand DF with all levels of a variable

2011-06-14 Thread Patrick Hausmann
Dear list, I would like to expand a DF with all the missing levels of a variable. a - c(2,2,3,4,5,6,7,8,9) a.cut - cut(a, breaks=c(0,2,6,9,12), right=FALSE ) (x - data.frame(a, a.cut)) # In 'x' the level [0,2) is missing. AddMissingLevel - function(xdf) { xfac - factor( c([0,2), [2,6),

Re: [R] Reset R's library to base packages only (remove all installed contributed packages)

2011-06-14 Thread Uwe Ligges
On 14.06.2011 12:04, Janko Thyson wrote: Dear list, is there a way to comfortably reset R's library such that it only contains only the base packages again? In other words, how can I uninstall all contributed packages that I installed? Is there some sort of index that's keeping track of what

Re: [R] Expand DF with all levels of a variable

2011-06-14 Thread Dimitris Rizopoulos
here is a solution with expand.grid(), a - c(2,2,3,4,5,6,7,8,9) a.cut - cut(a, breaks=c(0,2,6,9,12,13,15,16), right=FALSE ) x - data.frame(a, a.cut) out - expand.grid(a = 0, a.cut = setdiff(levels(a.cut), unique(a.cut))) rbind(out, x) I hope it helps. Best, Dimitris On 6/14/2011 1:32 PM,

Re: [R] Reset R's library to base packages only (remove all installed contributed packages)

2011-06-14 Thread Janko Thyson
On 14.06.2011 13:34, Uwe Ligges wrote: On 14.06.2011 12:04, Janko Thyson wrote: Dear list, is there a way to comfortably reset R's library such that it only contains only the base packages again? In other words, how can I uninstall all contributed packages that I installed? Is there some

Re: [R] How to run zero inflated mixed model and hurdle mixed model in R

2011-06-14 Thread Ben Bolker
ONKELINX, Thierry Thierry.ONKELINX at inbo.be writes: Have a look at the MCMCglmm package. Best regards, The glmmADMB package will also allow you to fit zero-inflated (but not hurdle) mixed models (the syntax is slightly easier). For further questions you may want to contact the

[R] Need script to create new waypoint

2011-06-14 Thread anneloes de raad
Dear help-list members, I am a student at Durham University (UK) conducting a PhD on spatial representation in baboons. Currently, I'm analysing the effect of sampling interval on home range calculations. I have followed the baboons for 234 days in the field, each day is represented by

[R] heatmap with values

2011-06-14 Thread Agustin Lobo
Hi! I'm displaying a contingency table with heatmap(): svm.predPix.tabla svm.predPix CC DD LL NN NN2 CC 22 0 3 8 3 DD 0 27 0 1 0 LL 1 1 90 3 7 NN 2 0 1 11 4 NN2 0 0 5 1 20 heatmap(svm.predPix.tabla[5:1,], Rowv=NA,

[R] Obtaining OLAP cubes using R

2011-06-14 Thread Saravanan
Hello All, I have a dataset and I wish to obtain all possible data cuboids from it using R . For eg if my data frame is : ABC 111 121 221 The output intended is : A=1 A=2 B=1 B=2 C=1 A=1,B=1 A=1,B=2 A=2,B=2 A=1,C=1 A=2,C=1 B=1,C=1 B=2,C=1 A=1,B=1,C=1

[R] Renaming variables

2011-06-14 Thread mosojn
Hi guys, I checked previous posts and I saw similar questions have been answered; they didn't help me solve my problem though. I am using R version 2.13.0 (2011-04-13), Platform: x86_64-pc-mingw32/x64 (64-bit) and I am having difficulties renaming variables. I tried with this command: names

[R] rstatistics.com

2011-06-14 Thread Alex
Preferred Domain Availability Notice: rstatistics.com will be listed for auction in a few days. This domain might be useful for you, since you own a domain similar to rstatistics.com To express interest in owning this domain, just fill out the simple form here:

[R] 2d loess question

2011-06-14 Thread Saurav Pathak
Hi, We have been trying to use loess on 2D data (basically a matrix) in the following way: x - 1:256 y - 1:256 z - data # input from data z.loess = loess(z ~ x + y) We get a 256 x 1 vector of fitted values with a 256 x 256 array of residuals, but not a 256 x 256 array of fitted values.

Re: [R] Renaming variables

2011-06-14 Thread Dennis Murphy
Hi: names() typically has to do with the names associated with *components* of a data frame or list, which appears to be what you have, reading between the lines. Here's a toy example: mydf - data.frame(a = rnorm(5)) mydf a 1 1.291952883 2 -0.136706733 3 0.219528682 4

Re: [R] using Scheirer-Ray-Hare in R?

2011-06-14 Thread peter dalgaard
On Jun 13, 2011, at 20:28 , jcallaway wrote: Does anyone know if a module already exists to run the Scheirer-Ray-Hare extension to Kruskal-Wallis in R, in order to run a non-parametric equivalent to a two-way ANOVA? I had a look at the JSTOR copy of the original Biometrics paper, and tend to

[R] Lattice legend

2011-06-14 Thread Julio Rojas
Dear all, I have been working in a plot based on figure 5.6 of the Lattice book (http://lmdvr.r-forge.r-project.org/figures/figures.html). I have already modified it to include the size of the circles as another variable, but I would like to modify the legend to show it (like they do it in

[R] Factor analysis on ordinal nominal data

2011-06-14 Thread Jay
Hi, are there readily available R packages that are able to perform FA on ordinal and/or nominal data? If not, what other approaches and helpful packages would you suggest? BR, Jay __ R-help@r-project.org mailing list

Re: [R] Need script to create new waypoint

2011-06-14 Thread Mike Marchywka
Now I need to change this data set into one with waypoints at regular intervals: for example 2 I guess your question is about algorithm ideas for making up data due to unspecified percrived need. Anything you can specify completely should be easy to code in R, maybe a bash script, or

[R] Textmin

2011-06-14 Thread Philip Heinrich
Working my way through Feinerer, Hornik, Meyer's (2008) Text Mining Infrastructure in R but am having trouble duplicating some of the examples in 3.2 Algorithms. When I try to use functions such as appendMeta, tmupdate, and appendMeta I get a cannot find function... error. The R documentation

Re: [R] Factor analysis on ordinal nominal data

2011-06-14 Thread William Revelle
At 6:19 AM -0700 6/14/11, Jay wrote: Hi, are there readily available R packages that are able to perform FA on ordinal and/or nominal data? If not, what other approaches and helpful packages would you suggest? If by ordinal and nominal you mean just a few categories (e.g., a mood scale or

[R] [Resolved] combine the data frames into comma separated list.

2011-06-14 Thread Mary Kindall
Hi Thanks Gabor for your suggestion. I am posting the code that worked for me. dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 = c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 = c('','','','','')));

[R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Arnaud Mosnier
Dear R users, Since a long time now, I have the following error when I want to load the tcltk library in R 64 bit. Loading Tcl/Tk interface ...Error : .onLoad failed in loadNamespace() for 'tcltk', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared

Re: [R] [Resolved] combine the data frames into comma separated list.

2011-06-14 Thread Gabor Grothendieck
On Tue, Jun 14, 2011 at 11:40 AM, Mary Kindall mary.kind...@gmail.com wrote: Hi Thanks Gabor for your suggestion. I am posting the code that worked for me. dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 = c('aaa','bbb','ccc','aaa','ddd')));  #must be data frame dataframe2 =

[R] Read in from multiple Excel wksheets

2011-06-14 Thread dM/
I’ve got an Excel workbook with about 30 worksheets. Each worksheet has 1 rows of data over 30 columns. I’d like to read the data from each worksheet into a dataframe or matrix in R for processing. Normally, I use read.csv when interacting with Excel but I’d rather manipulate a multisheet

[R] Procesamiento paralelo

2011-06-14 Thread Javier Alfonso Valdés
Hola, soy nuevo en la lista y en R, disculpen esta pregunta, pero no he encontrado información actualizada. Mi pregunta, es R capaz de realizar procesamiento paralelo? -- Atentamente Ing. Javier Alfonso Valdés Universidad de las Ciencias Informáticas.

[R] How to generate bivariate exponential distribution?

2011-06-14 Thread xuyongdeng
Any one know is there any package or function to generate bivariate exponential distribution? I gusee there should be three parameters, two rate parameters and one correlation parameter. I just did not find any function available on R. Any suggestion is appreciated. -- View this message in

Re: [R] Procesamiento paralelo

2011-06-14 Thread Carlos Ortega
Hola Javier, Sí, mira este detalle: http://cran.at.r-project.org/web/views/HighPerformanceComputing.html Saludos, Carlos Ortega www.qualityexcellence.es 2011/6/14 Javier Alfonso Valdés jalfo...@uci.cu Hola, soy nuevo en la lista y en R, disculpen esta pregunta, pero no he encontrado

Re: [R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Adrienne Wootten
Arnaud, I've had a similar problem with several packages in R 2.13.0 recently, which was more caused because the package installation failed in the new version. Judging from the error messages you have up here, I'd guess that it's a similar problem surrounding the package installation,

Re: [R] Read in from multiple Excel wksheets

2011-06-14 Thread Jonathan Daily
Java uses heap space when creating new objects. My guess is that since the default size is 128 Mb iirc, you are reading in an object larger than this. I don't know the guts of the xlsx package or if there is a way to increase the heap, but you may get by if you can divide up your data import.

Re: [R] Read in from multiple Excel wksheets

2011-06-14 Thread Ben Bolker
dM/ david.n.menezes at gmail.com writes: I’ve got an Excel workbook with about 30 worksheets. Each worksheet has 1 rows of data over 30 columns. I’d like to read the data from each worksheet into a dataframe or matrix in R for processing. Normally, I use read.csv when interacting

Re: [R] Read in from multiple Excel wksheets

2011-06-14 Thread Gabor Grothendieck
On Tue, Jun 14, 2011 at 12:06 PM, dM/ david.n.mene...@gmail.com wrote: I’ve got an Excel workbook with about 30 worksheets.  Each worksheet has 1 rows of data over 30 columns. I’d like to read the data from each worksheet into a dataframe or matrix in R for processing.  Normally, I use

Re: [R] About 'hazard ratio', urgent~~~

2011-06-14 Thread karena
Thanks a lot for the great help~ -- View this message in context: http://r.789695.n4.nabble.com/About-hazard-ratio-urgent-tp3595527p3597025.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] problems with plots in loop

2011-06-14 Thread Andreas Betz
Dear helpers, In an attempt to use a loop to generate graphs in a for loop in run into a problem. The plan is to fill each page with eight graphs (mfrow = c(4,2)) in to two columns. Only the buttom graphs ( meaning every fourth graph) have tick labels on the x axis to preserve space. I used

[R] problems with plots in loop (corrected Email)

2011-06-14 Thread Andreas Betz
Dear helpers, In an attempt to use a loop to generate graphs in a for loop in run into a problem. The plan is to fill each page with eight graphs (mfrow = c(4,2)) in to two columns. Only the buttom graphs ( meaning every fourth graph) have tick labels on the x axis to preserve space. I used

[R] Putting commas in between character strings

2011-06-14 Thread Abraham Mathew
I have a number of strings in a vector, and want the output to be seperated by commas. t [1] 35004 35005 35006 35007 35010 35014 35016 So I want want it to look like: 35004, 35005, 35006, 35007,... Can anyone help? I initially thought strsplit would be the correct function for this job, but

[R] Using MLE Method to Estimate Regression Coefficients

2011-06-14 Thread boylangc
Good Afternoon, I am relatively new to R and have been trying to figure out how to estimate regression coefficients using the MLE method. Some background: I am trying to examine scenarios in which certain estimators might be preferred to others, starting with MLE. I understand that MLE

Re: [R] Heatmap in R and/or ggplot2

2011-06-14 Thread idris
Thanks for your help! Follow up question: My data contains x, y, height, and day. I want to create the heatmap for each day, keeping the color coding consistent. I've created an example with 2 days, and you can see the charts below. Notice that the legend changes from day 1 to day 2. How can I

Re: [R] panel.loess confidence interval

2011-06-14 Thread Mark Ebbert
I finally got back around to working on this again. panel.smoother worked perfectly. Thank you both for the tips. On Jun 5, 2011, at 5:40 PM, Felix Andrews wrote: On 6 June 2011 06:45, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Sun, Jun 5, 2011 at 3:18 PM, Mark Ebbert

[R] Standard deviation and Mean

2011-06-14 Thread Won Cheol Yim
Dear R-help, Hi I've got data table with variation and freqeuncy. I don't know how to get mean and sd. Please help me. Cheers. == variation frequency 0.503 79930 0.174 291140 -0.444 95916 -0.731 11451 0.453 102899 0.596 46133 -0.295 204859 0.013 390121 0.311 187552 -0.085 378902

[R] sqlFetch and factor conversion

2011-06-14 Thread Hosack, Michael
R users, Hello, I used sqlFetch to import a data table from MS Access 2007 and I set as.is = TRUE to prevent character vectors from becoming factors. However, I can't figure out how to prevent the $ operator from being added by sqlFetch to the end of each character vector(e.g. TD$ and SITE$).

Re: [R] Putting commas in between character strings

2011-06-14 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Abraham Mathew Sent: Tuesday, June 14, 2011 9:36 AM To: r-help@r-project.org Subject: [R] Putting commas in between character strings I have a number of strings in a vector,

Re: [R] About 'hazard ratio', urgent~~~

2011-06-14 Thread Mike Marchywka
Date: Tue, 14 Jun 2011 09:11:25 -0700 From: dr.jz...@gmail.com To: r-help@r-project.org Subject: Re: [R] About 'hazard ratio', urgent~~~ Thanks a lot for the great help~ well, if you are referring to my post, as I indicated I made a lot of

[R] how to convert careers to social network description

2011-06-14 Thread Philipp Chapkovski
There is a dataframe in R that looks that Person --- Organization --- Year In --- Year Out P1X 20012005 P2X 20022006 What is the most quick way to convert it to the table of the connections between two people with a

Re: [R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Adrienne Wootten
Taking a quick look for it, it seems that they have replaced it with tcltk2. I just did the installation with the same version in windows and it auto loaded the tcltk package and I never installed that package to begin with. I would try it with tcltk2 and see if you get the package to install

Re: [R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Peter Langfelder
On Tue, Jun 14, 2011 at 12:47 PM, Adrienne Wootten amwoo...@ncsu.edu wrote: Taking a quick look for it, it seems that they have replaced it with tcltk2.  I just did the installation with the same version in windows and it auto loaded the tcltk package and I never installed that package to

Re: [R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Arnaud Mosnier
I achieve to make tcltk work on R 64 installing Active tcltk8.5 64bit version then setting windows environment variables as in http://www.sciviews.org/_rgui/tcltk/InstallRTclTk.html. But now, it uses only this 64 bit version and thus do not work anymore in R 32 bit ! In my case, it solves my

Re: [R] Standard deviation and Mean

2011-06-14 Thread jdanielnd
Well, it depends on what mean and sd do you want to calculate. If it's the mean of the variation or frequency mean and sd from the showed variables, you should do: mean(variation) sd(variation) mean(frequency) sd(frequency) However, if you want to calculate the mean of variation, taking into

Re: [R] In rpart, how is improve calculated? (in the class case)

2011-06-14 Thread Ed Merkle
Tal, For the Gini criterion, the improve value can be calculated as a weighted sum of the improvement in impurity. Continuing with your original code: # for gini impurity_root- gini(prop.table(table(y))) impurity_l- gini(prop.table(table(obs_0))) impurity_R-gini(prop.table(table(obs_1))) #

Re: [R] In rpart, how is improve calculated? (in the class case)

2011-06-14 Thread Tal Galili
Hi Ed, Thank you for the reply! Professor Atkinson already gave me that answer by pointing me to the technical report of rpart that describes this: *http://mayoresearch.mayo.edu/mayo/research/biostat/upload/61.pdf*http://mayoresearch.mayo.edu/mayo/research/biostat/upload/61.pdf However, I was

[R] color specific(!) lines in different color with in parcoord plots

2011-06-14 Thread Patrick Großmann
Dear Madame or Sir, in my current project, I have so far used a lot of very different plots. I am now trying to gain informatin with the help of parallel coordinate plots. Therefore, I use the function parcoord of the MASS package. What I would like to do, is to color let's say the points

[R] error message trying to plot survival curves from hypothetical covariate profiles

2011-06-14 Thread Simon Kiss
Dear colleagues, following John Fox' advice in this article (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf), I'm trying to create a new data frame to examine the differential survival curves from a combination of covariates. These are derived from a Cox

Re: [R] Still have problems with tcltk in R 64 bit

2011-06-14 Thread Uwe Ligges
On 14.06.2011 22:01, Arnaud Mosnier wrote: I achieve to make tcltk work on R 64 installing Active tcltk8.5 64bit version then setting windows environment variables as in http://www.sciviews.org/_rgui/tcltk/InstallRTclTk.html. Don't read outdated sources but the manuals. The R binary

Re: [R] Standard deviation and Mean

2011-06-14 Thread Daniel Malter
Hi, pick up any introductory manual of which there are many online. It so happens that the functions for mean and sd are called mean() and sd(). If you want to know how to use them type ?mean or ?sd in the R-prompt and hit enter. Daniel -- View this message in context:

Re: [R] color specific(!) lines in different color with in parcoord plots

2011-06-14 Thread Daniel Malter
Hi, Why does the second example on ?parcoord help page not help you with that? ?parcoord ir - rbind(iris3[,,1], iris3[,,2], iris3[,,3]) parcoord(log(ir)[, c(3, 4, 2, 1)], col = 1 + (0:149)%/%50) If that does not do, feel free to get back. Daniel -- View this message in context:

[R] gridExtra with cairodevie and ggplots

2011-06-14 Thread Justin Haynes
I apologise in advance for not providing code, but this seems like a straight forward question... I am making a few full page plots some of which are portrait and some of which are landscape I would like to open my cairo device once and put all the plots in the same .pdf. But since some need to

[R] Contrasts

2011-06-14 Thread klausflemloese
Thank you for your reply. I am working on how to understand the contrast(). I am a newcomer to R-programming. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] gridExtra with cairodevie and ggplots

2011-06-14 Thread baptiste auguie
Hi, You can draw arrangeGrob in a rotated viewport, library(gridExtra) library(ggplot2) ps = replicate(4, qplot(rnorm(10), rnorm(10)), simplify=F) g = gTree(children=gList(do.call(arrangeGrob, ps)), vp=viewport(angle=90)) grid.draw(g) though you get some warnings about clipping for some reason.

[R] BIZARRE results from wilcox.test()

2011-06-14 Thread genecleaner
I get these BIZARRE results from wilcox.test() When INCREASING the number of samples i get INCREASED p-values. When increasing the number of samples further, the p-values goes down again. This seems really bizarre! Can anyone explain why this is so?! Example: w -

Re: [R] BIZARRE results from wilcox.test()

2011-06-14 Thread Sarah Goslee
The difference is so small as to be meaningless, and probably has to do with rounding error at the limits of machine precision. Really, why would you think this is either bizarre or important? Sarah On Tue, Jun 14, 2011 at 4:57 PM, genecleaner geneclea...@gmail.com wrote: I get these BIZARRE

Re: [R] automatically generate the output name of my for loops

2011-06-14 Thread Greg Snow
This is actually FAQ 7.21. As others have mentioned, the most important part of the Answer is that it is better to use a list instead. What searching did you do before posting? Is there some way that the FAQ could be changed that would have made your searching turn up the FAQ answer? --

Re: [R] use variable value to create new variable name

2011-06-14 Thread Greg Snow
This is actually FAQ 7.21 (though the FAQ does not specify how to create the name in a loop). As others have mentioned, the most important part of the Answer is that it is better to use a list instead. What searching did you do before posting? Is there some way that the FAQ could be changed

Re: [R] BIZARRE results from wilcox.test()

2011-06-14 Thread Daniel Malter
I would argue that your Wilcoxon test is meaningless. For all four datasets, the first data column has no overlap whatsoever with the second data column. All Wilcoxon Ws are 0. The BIZARRE behavior may be that the test tries to interpolate what the p value for W of 0 would be given your sample

Re: [R] remove commas in a number when reading a text file

2011-06-14 Thread Greg Snow
The following link may be of interest. It shows a way to use gsub, but have it automatically applied while reading the data in rather than converting after: http://finzi.psych.upenn.edu/Rhelp10/2010-February/229550.html -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] plotting on an image

2011-06-14 Thread Greg Snow
If you are willing to prepend a step then you could: 1. Create an empty plot using your data and type='n' (or just plot the data, the points will be overwritten), you may want to set the asp argument, or explicitly do the xlim and ylim arguments. 2. Add the graphic using the rasterImage

Re: [R] automatically generate the output name of my for loops

2011-06-14 Thread jiliguala
hi, im a new in R and this forum, so if there is something disturbing u, im gonna do it better. by the way, where can i see the FAQ 7.21?? thanks.. -- View this message in context: http://r.789695.n4.nabble.com/automatically-generate-the-output-name-of-my-for-loops-tp3592160p3597987.html Sent

Re: [R] Off-topic: (Simple?) Random Sampling when n is a random variable

2011-06-14 Thread Greg Snow
This sounds like what is called domains in survey sampling (possibly other names, but that is what I learned it as). The idea is that you take a random sample (or the population) then ask a question to determine which domain the subject is in, then ask the question of interest in the domain of

Re: [R] plotting on an image

2011-06-14 Thread Gabor Grothendieck
On Mon, Jun 13, 2011 at 2:33 PM, Johann Kim u...@johannkim.de wrote: Hello all, has someone please a few hints about how to 1.st: draw an image (preferrably a jpg) and then 2nd: plot() on that image I am using a mac - and after searching and trying  different ways (I have installed

Re: [R] automatically generate the output name of my for loops

2011-06-14 Thread Greg Snow
In the windows GUI you can click on the Help menu and then click on 'FAQ on R' to see the entire FAQ. Typing help.start() on any OS should open a new browser window with a link to the FAQ. Going to the R homepage (http://www.r-project.org) and clicking on the FAQs link on the left will also

Re: [R] automatically generate the output name of my for loops

2011-06-14 Thread jiliguala
thanks, Greg Snow-2. here i hav a question, how can i save the value of a list to a vector or a matrix? say, i have a list (data1) and a vector or a matrix (data2). if i made like this, data2 - as.vector(data1) it does not change anything, the data2 is still a list. what i want to do is to

Re: [R] automatically generate the output name of my for loops

2011-06-14 Thread Greg Snow
If the list is simple enough, then you probably want the unlist function, otherwise you will probably need to use the sapply function to grab and/or process the important pieces in each list element. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] how to convert careers to social network description

2011-06-14 Thread Daniel Malter
Where are you stuck? A question without reproducible code or demonstrating own effort is much less likely to receive a response. Best, Daniel -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-careers-to-social-network-description-tp3597622p3598067.html Sent from the

Re: [R] Off-topic: (Simple?) Random Sampling when n is a random variable

2011-06-14 Thread Andrew Robinson
On Tue, Jun 14, 2011 at 11:02:52AM +1000, Andrew Robinson wrote: Hi everyone, I'm involved in a discussion with a colleague. He suggested a sample design for a finite-sized process that (to all intents and purposes) involves tossing a coin and examining the unit if the coin shows Heads.

Re: [R] Need script to create new waypoint

2011-06-14 Thread Michael Sumner
There is a function interpequal in the trip package that provides a way to generate new points equally spaced in time between irregular track points. Obviously this can only be approximate depending on the spacing you want. The function also maintains the input points without change. This was used

Re: [R] gridExtra with cairodevie and ggplots

2011-06-14 Thread Justin Haynes
Thats perfect, thank you! On Tue, Jun 14, 2011 at 2:10 PM, baptiste auguie baptiste.aug...@googlemail.com wrote: Hi, You can draw arrangeGrob in a rotated viewport, library(gridExtra) library(ggplot2) ps = replicate(4, qplot(rnorm(10), rnorm(10)), simplify=F) g =

Re: [R] Off-topic: (Simple?) Random Sampling when n is a random variable

2011-06-14 Thread Andrew Robinson
Thanks Greg! Andrew On Tue, Jun 14, 2011 at 04:13:52PM -0600, Greg Snow wrote: This sounds like what is called domains in survey sampling (possibly other names, but that is what I learned it as). The idea is that you take a random sample (or the population) then ask a question to determine

Re: [R] BIZARRE results from wilcox.test()

2011-06-14 Thread genecleaner
Dear Daniel and Sarah, Thanks you for your rude replies . The script that I provided was only an example and to illustrate the problem. It makes perfectly sense to use the Wilcoxon test on my datasets. However, you replies were nonsensical, since you could not solve the problem but rather just

  1   2   >