Re: [R] X11 plot window doesn't show graphic immediately

2013-01-13 Thread Alexander Engelhardt
Hi Ista, thanks for your advice. I updated my .Rprofile file with the following two lines: require(grDevices) X11.options(type=nbcairo) Everything works fine now. Best wishes, Alex On 01/13/2013 02:26 AM, Ista Zahn wrote: Hi Alexander, Try changing your type, e.g.,

[R] extracting character values

2013-01-13 Thread Biau David
Dear all, I have a dataframe of names (netw), with each cell including last name and initials of an author; some cells have NA. I would like to extract only the last name from each cell; this new dataframe is calle 'res' Here is what I do: res - data.frame(matrix(NA, nrow=dim(netw)[1],

[R] Loading circular package from Rprofile.site

2013-01-13 Thread Ved P. Sharma
Hi, I installed circular package and I wanted to load it automatically when R starts up, so I added the following lines in file Rprofile.site, .First - function() library(circular) When R starts up, it gives me the following error: -- Loading required package: boot Loading required

Re: [R] Drawing a dotted circle.

2013-01-13 Thread Ved P. Sharma
Thanks everyone for suggesting the alternative draw.circle. Ved On Sat, Jan 12, 2013 at 12:50 PM, Jose Iparraguirre jose.iparragui...@ageuk.org.uk wrote: Don't know, but you can use the function draw.circle in the plotrix package. Hope this helps, Jose

Re: [R] Interpreting coefficients in linear models with interaction terms

2013-01-13 Thread theundergrad
Hi, I have very limited (one class and the rest self-taught) statistics background (I am a comparative biology major) working on an independent study. I think that I am beginning to understand: The coefficient SexM is the slope estimate for TestNumber1. If I add the coefficients for the other

Re: [R] count combined occurrences of categories

2013-01-13 Thread Biau David
OK thanks for the tips. I have abandonned the use of cbidn in dataframe. I've used the obth dcast() and melt() and they both work fine. Thanks again   David Biau De : David Winsemius dwinsem...@comcast.net À : arun smartpink...@yahoo.com Cc : R help

Re: [R] Loading circular package from Rprofile.site

2013-01-13 Thread Prof Brian Ripley
This is a known bug in the package. It should have used utils::packageDescription, or imported it in its NAMESPACE. If this was not condiitonal on interactive() it would have be shown up in the CRAN package checks. Rprofile.site is run early in the startup process: it is not really

Re: [R] X11 plot window doesn't show graphic immediately

2013-01-13 Thread Milan Bouchet-Valat
Le samedi 12 janvier 2013 à 19:04 +0100, Alexander Engelhardt a écrit : Hi r-help, I have a weird problem. When I plot anything, say plot(1:10), a plot window opens but it's empty. It looks just like this: http://i.imgur.com/9uqO6.png I have to resize the window, either by clicking the

[R] R error: system is computationally singular when building GMM model

2013-01-13 Thread zoe chan
Dear, I built the generalized method of moments model to estimate the sales rank in the bookstore using plm package in R. The equation is: data1.gmm - pgmm(dynformula(lnsales_rank ~ ln_price + avg_ham_rate + avg_spam_rate + num_of_ham+ num_of_spam + ship_code2 +ship_code3 +ship_code4+

Re: [R] R error: system is computationally singular when building GMM model

2013-01-13 Thread Uwe Ligges
On 13.01.2013 15:08, zoe chan wrote: Dear, I built the generalized method of moments model to estimate the sales rank in the bookstore using plm package in R. The equation is: data1.gmm - pgmm(dynformula(lnsales_rank ~ ln_price + avg_ham_rate + avg_spam_rate + num_of_ham+ num_of_spam +

Re: [R] extracting character values

2013-01-13 Thread Biau David
OK, here is a minimal working example: au1 - c('biau dj', 'jones kb', 'van den hoofs j', ' biau dj', 'biau dj', 'campagna r', 'biau dj', 'weiss kr', 'verdegaal sh', 'riad s') au2 - c('weiss kr', 'ferguson pc', ' greidanus nv', ' porcher r', 'ferguson pc', 'pessis e', 'leclerc p', 'biau dj',

Re: [R] extracting character values

2013-01-13 Thread Uwe Ligges
On 13.01.2013 09:53, Biau David wrote: Dear all, I have a dataframe of names (netw), with each cell including last name and initials of an author; some cells have NA. I would like to extract only the last name from each cell; this new dataframe is calle 'res' Here is what I do: res -

Re: [R] heatmap.2 problem

2013-01-13 Thread Uwe Ligges
On 12.01.2013 23:40, Peter Davidsen wrote: Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal

Re: [R] package gplots: (was:) heatmap.2 problem

2013-01-13 Thread Uwe Ligges
On 13.01.2013 18:06, Peter Davidsen wrote: Sorry, I should have added library(gplots) in the beginning of my code On Sun, Jan 13, 2013 at 5:04 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: mycol - colorpanel(n=3,green,grey,red) Ah, so these are questions re. the gplots

Re: [R] extracting character values

2013-01-13 Thread Uwe Ligges
On 13.01.2013 18:02, Biau David wrote: OK, here is a minimal working example: au1 - c('biau dj', 'jones kb', 'van den hoofs j', ' biau dj', 'biau dj', 'campagna r', 'biau dj', 'weiss kr', 'verdegaal sh', 'riad s') au2 - c('weiss kr', 'ferguson pc', ' greidanus nv', ' porcher r', 'ferguson

Re: [R] extracting character values

2013-01-13 Thread Biau David
works great thanks. And you cut off my code a lot and removed the loop.   David Biau De : Uwe Ligges lig...@statistik.tu-dortmund.de À : Biau David djmb...@yahoo.fr Cc : arun smartpink...@yahoo.com; r help list r-help@r-project.org Envoyé le : Dimanche 13

Re: [R] extracting character values

2013-01-13 Thread Biau David
thanks too. It works also perfect. Not sure I understand all the code though: will have to look into it!   David Biau De : arun smartpink...@yahoo.com À : Biau David djmb...@yahoo.fr Cc : R help r-help@r-project.org; Uwe Ligges

Re: [R] heatmap.2 problem

2013-01-13 Thread Peter Davidsen
Sorry, I should have added library(gplots) in the beginning of my code On Sun, Jan 13, 2013 at 5:04 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: mycol - colorpanel(n=3,green,grey,red) - - - Peter K Davidsen | MSc, PhD stud. | Centre for Systems Biology | Univ. of Liverpool |

Re: [R] random effects model

2013-01-13 Thread arun
Hi, For your first question, M1-as.table(rbind(c(825,2407),c(828,2200)))  dimnames(M1)- list(gender=c(Male,Female), MV=c(Study,NonStudy/missing)) M1 #    MV #gender   Study NonStudy/missing  # Male 825 2407  # Female   828 2200 Xsq-chisq.test(M1) Xsq #   

Re: [R] extracting character values

2013-01-13 Thread arun
HI, Not sure this helps: netw-read.table(text= lastname_initial, year Aaron H, 1900 Beecher HW, 1947 Cannon JP, 1985 Stone WC, 1982  van der hoops bf, 1948 NA, 1976 ,sep=,,header=TRUE,stringsAsFactors=FALSE) res1-sub(^[[:space:]]*(.*?)[[:space:]]*$,\\1,gsub(\\w+$,,netw[,1])) res1[!is.na(res1)]

Re: [R] extracting character values

2013-01-13 Thread arun
Hi, If you want the NA rows removed, you could, otherwise:  res-do.call(data.frame,lapply(netw,function(x) sub(^[[:space:]]*(.*?)[[:space:]]*$,\\1,gsub(\\w+$,,x  res # au1   au2   au3 #1   biau weiss   bhumbra #2  jones  ferguson   lam #3  van den

Re: [R] package gplots: (was:) heatmap.2 problem

2013-01-13 Thread Peter Davidsen
Ok, I'll repost my question here: Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal and

Re: [R] extracting character values

2013-01-13 Thread arun
Hi, This should also work: do.call(data.frame,lapply(netw,function(x) gsub(^ *(\\D+) \\w+$,\\1,x))) A.K. From: Biau David djmb...@yahoo.fr To: arun smartpink...@yahoo.com; r help list r-help@r-project.org Sent: Sunday, January 13, 2013 12:02 PM Subject: Re:

Re: [R] how to change font size of axis label (not axis title)

2013-01-13 Thread David Winsemius
On Jan 11, 2013, at 8:04 PM, Elaine Kuo wrote: Hello, I am using lattice to produce xyplot. I want to change the font size of axis-X label. Please kindly advise how to write the code. Thank you. For changing the font size of axis-X title it would be xlab=list(Diet of Breeding

Re: [R] panel failure in xyplot

2013-01-13 Thread David Winsemius
On Jan 11, 2013, at 8:12 PM, Elaine Kuo wrote: Hello I ran the code below but it said: no object 'panel.xyplot.intermediate.hh' That's because it comes from a different package. Learn to search. -- David. Please kindly advise how to modify the code. thank you. (It works with

[R] GLM Modelling help needed

2013-01-13 Thread bhatmb
Hi Everyone, I am new to R and am figuring my way around it. I am trying to determine the relationship between A B, for each week of the year. My dataset looks like: YearWeekA B 19821 11.3 198.53 19822 14.4309.00 19823 23.2

Re: [R] random effects model

2013-01-13 Thread arun
HI, I think I mentioned to you before that when you reshape the columns excluding the response variable, response variable gets repeated (in this case hibp14 or hibp21) and creates the error I run your code, there are obvious problems in the code so I didn't reach up to BP.gee

[R] partial and full model in R

2013-01-13 Thread Pooyan Rahimy
Dear Jim hello, I have the same question as the one you had :https://stat.ethz.ch/pipermail/r-help/2005-May/070681.html did you find any answer to that? thanks a lot sincerely, Pooyan Rahimy # PhD Student School of Environmental Sciences University of Guelph

Re: [R] partial and full model in R

2013-01-13 Thread David Winsemius
On Jan 13, 2013, at 3:23 PM, Pooyan Rahimy wrote: Dear Jim hello, I have the same question as the one you had :https://stat.ethz.ch/pipermail/r-help/2005-May/070681.html did you find any answer to that? There was a link on that page to an answer. -- David Winsemius Alameda, CA,

Re: [R] Interpreting coefficients in linear models with interaction terms

2013-01-13 Thread David Winsemius
On Jan 12, 2013, at 7:28 PM, theundergrad wrote: Hi, I have very limited (one class and the rest self-taught) statistics background (I am a comparative biology major) working on an independent study. The number of major issues of confusion in what follows suggest that this is a topic

[R] One sided confidence limits for the regression line

2013-01-13 Thread li li
Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits? Thank you very much in advance. Hannah

Re: [R] One sided confidence limits for the regression line

2013-01-13 Thread David Winsemius
On Jan 13, 2013, at 8:19 PM, li li wrote: Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits?

[R] Wrong bin count number with hist() ?

2013-01-13 Thread ken . mailinglist
Hi there, # Consider the following example: A = 19 B = 20 A B A==B hist(c(1:15,B,50),breaks=c(0,15,A,50),plot=F)$count hist(c(1:15,A,50),breaks=c(0,15,B,50),plot=F)$count # I was expecting the same results with the following values of A and B: A = 19.6019203953960 B = 19.6019204365543 A B

[R] hwo to subtract a child array from the big array?

2013-01-13 Thread Jie Tang
hi R users I have a data set with the name AA AA-1:100 Now I want to get a child array from AA every 10 numbers e.g. ab =c(10,20,30,40,50,60,70,80,100) How could I subtract aa from AA? thank you . -- TANG Jie Email: totang...@gmail.com Tel: 0086-2154896104 Shanghai Typhoon Institute,China

Re: [R] Wrong bin count number with hist() ?

2013-01-13 Thread Jeff Newmiller
Ken Mailinglist? Sounds like a modern version of the Abbott and Costello Who's On First routine. Anyway, this seems like an excellent opportunity to point out that you can get help on any base or loaded package function using the ? symbol. E.g. ?hist If you feel the help file is insufficient,

Re: [R] hwo to subtract a child array from the big array?

2013-01-13 Thread Jeff Newmiller
Although I think I understand every 10 numbers, I am not so sure how to interpret subtract aa from AA for a couple of reasons. First, to decimate your data: ab - AA[(1:10)*10] As for subtraction, you have not told us what variable aa is. If you meant variable ab, it has only 10 values while AA