[R] reference category in binomal glm

2014-05-27 Thread Xebar Saram
Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm. that is my outcome/DV is 0,1 and i run a regression and get coefficients. do the coefficients refer to the probability to get 0 or 1? thanks so much in advance Z

Re: [R] snpStats reference allele used in genetic associations?

2014-05-27 Thread francesca casalino
Dear David, Thank you very much for you help, I really appreciate it. I am not using the read.snps.long() or any other import function, as the data is already in snpMatrix, so I cannot specify it at the input step… I am reading the data as a snpMatrix, so using load() after having called the

[R] How to unstack three columns into rows?

2014-05-27 Thread Kristi Glover
Dear R User, I was wondering how I can unstack my data. For example I have following data set data-structure(list(siteS = structure(c(3L, 3L, 3L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 1L, 1L, 1L, 2L), .Label = c(11a, 12d, 1a, 2v, 6a), class = factor), species = structure(c(1L, 2L, 3L, 1L, 4L, 1L, 4L,

[R] How to add break in axis for grouped barplot?

2014-05-27 Thread Wei Qin
Dear Sir/Madam, It is possible to make grouped bar plots via barplot. But I want to add a break in y axis for data that largely differs. However, this seems complicated. Although gap.barplot may add a break in y asis, but the bars are not grouped as I wanted. Could you help me with this

Re: [R] subsetting to exclude different values for each subject in study

2014-05-27 Thread Monaly Mistry
Hi Arun, Thank you for your help, I have a few questions though if you don't mind. I'm a bit confused about the following 2 lines of code: col.tri.nb - tri2nb(coords, row.names=ind) lapply(col.tri.nb,function(x) ind[x])[1:5] ## from what I understand in the first line determines the

Re: [R] reference category in binomal glm

2014-05-27 Thread Marc Schwartz
On May 27, 2014, at 3:51 AM, Xebar Saram zelt...@gmail.com wrote: Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm. that is my outcome/DV is 0,1 and i run a regression and get coefficients. do the coefficients

Re: [R] reference category in binomal glm

2014-05-27 Thread Prof Brian Ripley
On 27/05/2014 09:51, Xebar Saram wrote: Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm. that is my outcome/DV is 0,1 and i run a regression and get coefficients. do the coefficients refer to the probability to get 0

Re: [R] How to unstack three columns into rows?

2014-05-27 Thread Frede Aakmann Tøgersen
Hi Kristi It doesn't seem that unstack can do it for you. Here is one way: library(reshape) data.molten - melt(data, id = c(siteS, species)) cast(data.molten, siteS ~ species) siteS sa sb sc sd se sg 1 11a 11 NA 37 NA NA 51 2 12d 15 NA NA NA NA NA 31a 31 55 62 NA NA NA 42v 42 NA

Re: [R] Function Align produces an error, Package wavelets

2014-05-27 Thread arun
Hi Barnaby, No problem. If the function got masked by loading another package, you could do:  wt.aligned - wavelets::align(wt) A.K. Thank you I spend more time looking into it since I placed the question and it seems that there is a conflict between two or more packages when open jointly

Re: [R] How to add break in axis for grouped barplot?

2014-05-27 Thread Jim Lemon
On Tue, 27 May 2014 11:36:21 AM Wei Qin wrote: ... #Then my questions is how to make a broken y axis in grouped barplot figures? # In another words, how to combine the function of barplot and gap.barplot? Hi Wei, The gap.barplot function doesn't do grouped bars (yet). You can probably

Re: [R] Problem Creating Partial Dependence Plot

2014-05-27 Thread Adams, Jean
Jane, Page 9 of the reference manual, http://cran.r-project.org/web/packages/plotmo/plotmo.pdf, discusses this error. 'The work-around is to simplify or standardize the way the model function is called. Use a formula and a data frame, or at least explicitly name the variables rather than passing

Re: [R] seeking latex peace

2014-05-27 Thread Jim Lemon
Hi all, I thought it was all over, but when I started my R help (help.start()) to check something, none of the help files in plotrix were available, each displaying an error message that some 2-3 Gb of memory could not be allocated. The same message appeared when I tried to get text help in

Re: [R] Size of win.metafile

2014-05-27 Thread Adams, Jean
Jinsong, When I use your code to create the abcd.emf file, and then copy and paste it into Word, I end up with a 4 x 4 plot with 12 pt font, just as you intended. I'm using R version 3.1.0, and Word 2010 version 14.0.7116.5000. Not sure why it works differently for you. Jean On Mon, May 26,

Re: [R] Assigning value Range for values

2014-05-27 Thread arun
Hi Praveen, Try this: dat - read.table(text=INCOME  20100  26800  5  18,sep=,header=TRUE) transform(dat, INCOME_RANGE=as.character(cut(INCOME,breaks=c(0,25,50,100,150,180,Inf)*1e3,right=FALSE,labels=c(below 25,000, 25,000-49,999.99, 50,000-99,999.99, 1,00,000-1,49,999.99,

Re: [R] seeking latex peace

2014-05-27 Thread Ranjan Maitra
On Tue, 27 May 2014 14:01:56 +1000 Jim Lemon j...@bitwrit.com.au wrote: On Mon, 26 May 2014 09:43:45 AM Ranjan Maitra wrote: ... Though, I have to say I don't quite see how you managed to install R without the above package (it is a required dependency on Fedora). ... Hope the above

Re: [R] reference category in binomal glm

2014-05-27 Thread Xebar Saram
Thank you both for your kinds help best z. On Tue, May 27, 2014 at 2:25 PM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: On 27/05/2014 09:51, Xebar Saram wrote: Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm.

Re: [R] how to add a table under a plot?

2014-05-27 Thread Helen Gao
Dear Kehl and Greg, Many thanks for your advice. I got it. Best wishes, Helen On 23 May 2014 22:45, Kehl Dániel ke...@ktk.pte.hu wrote: Hi, the function is in the plotrix package, so you have to install and call that package first. After installing see example(addtable2plot). HTH,

[R] Install Windows/R/.zip package under Linux/R

2014-05-27 Thread will . eagle
Dear all, how can I install the Windows/R package http://www.ssg.uab.edu/bhglm/files/BhGLM_1.0.zip under Linux/R? There is no CRAN package. Simply, applying gunzip, tar -czvf, R CMD INSTALL *.tar.gz did not work. Thanks in advance, Will

Re: [R] subsetting to exclude different values for each subject in study

2014-05-27 Thread arun
Hi Monaly, According to the description of ?tri2nb The function uses the ‘deldir’ package to convert a matrix of two-dimensional coordinates into a neighbours list of class ‘nb’ with a list of integer vectors containing neighbour region number ids. So, col.tri.nb is a list of

Re: [R] Install Windows/R/.zip package under Linux/R

2014-05-27 Thread Jeff Newmiller
It may not be possible. Contact the maintainer described at http://www.ssg.uab.edu/bhglm/ to ask for a source package. --- Jeff NewmillerThe . . Go Live...

Re: [R] How to unstack three columns into rows?

2014-05-27 Thread arun
Hi, I guess ?cast should work on the original dataset as it is in the long format  cast(data, siteS ~ species,value=abundance)   siteS sa sb sc sd se sg 1   11a 11 NA 37 NA NA 51 2   12d 15 NA NA NA NA NA 3    1a 31 55 62 NA NA NA 4    2v 42 NA NA 40 NA NA 5    6a 30 23 74 84 10 NA #if you are

Re: [R] Scoring a test set after clustering a training set

2014-05-27 Thread Aaditya Nanduri
Hi Barry, I don't think pam has a way to predict for test observations. However, this questions was asked and answered earlier. The approach is to take the medoids generated in pam and use them in a K-nn algorithm as the training data with K = 1. This way, you can classify your testing data by

[R] Login

2014-05-27 Thread Andy Siddaway
Dear R help, I cannot login to my account. I am keen to remove the posting I made to R help from google web searches - see http://r.789695.n4.nabble.com/R-software-installation-problem-td4659556.html Thanks, Andy Dr Andy Siddaway Registered Clinical Psychologist/ MRC Clinical Research

[R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-27 Thread Bastian Pöschl
Hallo, i try to draw a plot (plot.zoo) with a secondary y-axis. Further I want to draw reference lines. Unfortunately I do not manage to get control on the ticks, so that the reference lines match both- primary and secondary y-axis. Maybe someone already solved this problem?? It would be great.

Re: [R] How to unstack three columns into rows?

2014-05-27 Thread PIKAL Petr
Hi cast(data, siteS~species) gives you quite close result, only row ordering is different Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Kristi Glover Sent: Tuesday, May 27, 2014 12:54 PM To: R-help Subject:

[R] Random Block

2014-05-27 Thread suganth...@aol.com
Dear R-listers, I am using R 3.1, I amtrying to generate 40 patients in each treatment group with 12 block, Equal number of treatment in each block ,using stratification Variable age65(yes, no),surgery(yes ,no) and smoke (yes, no) How can i creat like thislist in R. block identifier

Re: [R] How to add break in axis for grouped barplot?

2014-05-27 Thread Wei Qin
Dear Jim, Thank you very much indeed for your quick reply and kind help. The code you provided works perfectly, which is exactly what I want. Kind regards, Wei On 27 May 2014 14:11, Jim Lemon j...@bitwrit.com.au wrote: On Tue, 27 May 2014 11:36:21 AM Wei Qin wrote: ... #Then my questions

Re: [R] Size of win.metafile

2014-05-27 Thread Jinsong Zhao
Jean, Thank you for checking the problem. I have the same software with you. If I created plot with windows(width = 4, height = 4, pointsize = 10) plot(1:10) Then I copy as metafile and paste it into Word. I can get the correct size. However, if I select save as metafile and save it as

[R] Plot regression results with various predictors.

2014-05-27 Thread phil
Dear all, I would like to know how to plot the results of a regression where various predictors resulted significant. Further, I would like how to add the regression line. Is that possible? For instance, I have run POLS=plm() where 6 coefficients resulted significant; then I would like to use

Re: [R] Login

2014-05-27 Thread Marc Schwartz
On May 27, 2014, at 4:46 AM, Andy Siddaway andysidda...@googlemail.com wrote: Dear R help, I cannot login to my account. I am keen to remove the posting I made to R help from google web searches - see http://r.789695.n4.nabble.com/R-software-installation-problem-td4659556.html Thanks,

Re: [R] Zoo: How to match secondary Y-axis ticks to primary ones

2014-05-27 Thread Gabor Grothendieck
On Tue, May 27, 2014 at 8:02 AM, Bastian Pöschl bstan0...@gmail.com wrote: Hallo, i try to draw a plot (plot.zoo) with a secondary y-axis. Further I want to draw reference lines. Unfortunately I do not manage to get control on the ticks, so that the reference lines match both- primary and

Re: [R] Second axis on bottom of graph

2014-05-27 Thread Hurr
Thanks David, I try and I wish I could benefit. Sorry I'm too stupid to learn much the documentation. There is so much of it and its interrelations not easily determined and I can't figure out where to look. It's hard to understand, but I try. Hard for my friends too. Now I have a quite nice

Re: [R] Size of win.metafile

2014-05-27 Thread Boris Steipe
What does Word think the object's size is? Is it 4x4 scaled at 133% ? Or is it 5.33 x 5.33 scaled at 100%? B. On May 27, 2014, at 12:28, Jinsong Zhao jsz...@yeah.net wrote: Jean, Thank you for checking the problem. I have the same software with you. If I created plot with

Re: [R] Size of win.metafile

2014-05-27 Thread Jinsong Zhao
On 2014/5/27 10:32, Boris Steipe wrote: What does Word think the object's size is? Is it 4x4 scaled at 133% ? Or is it 5.33 x 5.33 scaled at 100%? B. Thanks for pointing me the scaling factor. I checked them. For the plot pasted into Word, i.e., 4x4, the plot is scaled at 75%. The original

Re: [R] Second axis on bottom of graph

2014-05-27 Thread Jeff Newmiller
Well, the short answer is don't do that (resize after the fact). Resize your graphic window first and then re-tune your annotations for that size. The longer answer is that the lattice and ggplot2 packages were developed in part in response to the limitations of base graphics. They don't

Re: [R] Size of win.metafile

2014-05-27 Thread Boris Steipe
I thought so. The behaviour differs when inserting and pasting. See: http://support.microsoft.com/kb/926317 Googling for how to turn this autoscaling nonsense off did not yield an obvious result. This probably means that you'll need to adjust your workflow instead, e.g. by increasing the

Re: [R] Size of win.metafile

2014-05-27 Thread Jinsong Zhao
On 2014/5/27 11:06, Boris Steipe wrote: I thought so. The behaviour differs when inserting and pasting. See: http://support.microsoft.com/kb/926317 Googling for how to turn this autoscaling nonsense off did not yield an obvious result. This probably means that you'll need to adjust your

Re: [R] Random Block

2014-05-27 Thread arun
Hi, Please post in plain text and show the example using ?dput. Assuming that you wanted a data.frame and not a list May be this helps: set.seed(428) dat1 - data.frame(`block identifier`=rep(1:40,each=12),`block size`=12,`sequence within block`=rep(1:12,40), treatment=sample(paste(Group,

[R] Dataframe: Average cells of two rows and replace them with one row

2014-05-27 Thread Verena Weinbir
Hello, I have a big dataframe, and want to average two specific cells of two specific rows and then replace those two rows with one row which contains the averaged cells. Example (row 3 and 4: Cells2 and Cells3 averaged and replaced) NameC1 C2 C3 1 A 3 3 5 2 B 2 7 4 3 C 4 3

Re: [R] Dataframe: Average cells of two rows and replace them with one row

2014-05-27 Thread Greg Snow
Look at the aggregate function. As long as you have a column like Name that indicates which rows should be averaged together it will work (technically it will average the other rows as well, but since the average of 1 number is that number you will not see a difference). On Tue, May 27, 2014 at

Re: [R] Dataframe: Average cells of two rows and replace them with one row

2014-05-27 Thread Rui Barradas
Hello, Try the following. dat - read.table(text = Name C1 C2 C3 1 A 3 3 5 2 B 2 7 4 3 C 4 3 3 4 C 4 4 6 5 D 5 5 3 , header = TRUE) str(dat) aggregate(dat[, -1], list(dat$Name), mean) Hope this helps, Rui Barradas Em 27-05-2014 21:06, Verena Weinbir escreveu:

[R] ICL for betamix()

2014-05-27 Thread ChrisR
Hi, I am running beta mixture regressions using the betamix() command from the package 'betareg' (3.0-4). I In order to inform the choice about the number of latent classes I took a look at the various information criteria (AIC, BIC, ICL) and learnt that the integrated completed likelihood (ICL)

Re: [R] Install Windows/R/.zip package under Linux/R

2014-05-27 Thread Rolf Turner
On 28/05/14 01:28, will.ea...@gmx.net wrote: Dear all, how can I install the Windows/R package http://www.ssg.uab.edu/bhglm/files/BhGLM_1.0.zip under Linux/R? There is no CRAN package. Simply, applying gunzip, tar -czvf, R CMD INSTALL *.tar.gz did not work. Don't

Re: [R] seeking latex peace

2014-05-27 Thread Rolf Turner
On 28/05/14 00:48, Jim Lemon wrote: Hi all, I thought it was all over, but when I started my R help (help.start()) to check something, none of the help files in plotrix were available, each displaying an error message that some 2-3 Gb of memory could not be allocated. The same message appeared

[R] row mean

2014-05-27 Thread eliza botto
Dear R family, I have this matrix say AAA-matrix(sample(1:240),ncol=2) I first want to combine every 13th row in both columns. precisely, starting from row-1 1,13,25,37,49, then starting from row-2 2,14,26,38,50 also 3,15,27,39,51 and similarly starting from row 4, row number 5, row 6...

Re: [R] reference category in binomal glm

2014-05-27 Thread David Winsemius
On May 27, 2014, at 1:51 AM, Xebar Saram wrote: Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm. that is my outcome/DV is 0,1 and i run a regression and get coefficients. do the coefficients refer to the

Re: [R] How to unstack three columns into rows?

2014-05-27 Thread David Winsemius
On May 27, 2014, at 3:54 AM, Kristi Glover wrote: data-structure(list(siteS = structure(c(3L, 3L, 3L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 1L, 1L, 1L, 2L), .Label = c(11a, 12d, 1a, 2v, 6a), class = factor), species = structure(c(1L, 2L, 3L, 1L, 4L, 1L, 4L, 5L, 2L, 3L, 1L, 6L, 3L, 1L), .Label =

Re: [R] row mean

2014-05-27 Thread arun
Hi Eliza, May be this helps: lapply(split(seq_len(nrow(AAA)),((seq_len(nrow(AAA))-1)%%12)+1),function(i) AAA[i,]) A.K. On Tuesday, May 27, 2014 6:48 PM, eliza botto eliza_bo...@hotmail.com wrote: Dear R family, I have this matrix say AAA-matrix(sample(1:240),ncol=2) I first want to combine

Re: [R] row mean

2014-05-27 Thread arun
Forgot, about the mean: lapply(split(seq_len(nrow(AAA)),((seq_len(nrow(AAA))-1)%%12)+1),function(i) colMeans(AAA[i,])) A.K. On , arun smartpink...@yahoo.com wrote: Hi Eliza, May be this helps: lapply(split(seq_len(nrow(AAA)),((seq_len(nrow(AAA))-1)%%12)+1),function(i) AAA[i,]) A.K. On

Re: [R] Dataframe: Average cells of two rows and replace them with one row

2014-05-27 Thread arun
Hi, You can also try: dat - read.table(text=Name C1 C2 C3   1  A  3  3  5   2  B  2  7  4   3  C  4  3  3   4  C  4  4  6   5  D  5  5  3,sep=,header=TRUE,stringsAsFactors=FALSE)  library(plyr)  ddply(dat,.(Name),numcolwise(mean,na.rm=TRUE)) A.K. On Tuesday, May 27, 2014 4:08 PM, Verena

Re: [R-es] Archivo extenso

2014-05-27 Thread Carlos Ortega
Hola, Si al final vas a usar rattle, realmente RStudio te va a aportar poco, casi te diría que tendrás más problemas a la hora de visualizar resultados. Algunos aparecerán en la propia consola gráfica de rattle y otros en la de RStudio... Prueba directamente a arrancar rattle desde la