[R] trouble with accentuated characters in \title tag in Rd file

2013-01-12 Thread Laurent Rhelp
Hi, I have a weird issue when creating a package with latin1 encoding. All works fine except the fact that I can't put non-ASCII characters in the title tag. There is NA in the place of the title in the pdf file of the documentation. I can put non-ASCII characters in the other tags

Re: [R] add categorical labels in plot

2013-01-12 Thread Jim Lemon
On 01/12/2013 12:01 PM, Elaine Kuo wrote: Hello I want to draw a plot using the code below. Further, I want to add labels (White, Yellow, Red) to x-axis. Please kindly advise how to add the categorical labels, by modifying the code. ... Hi Elaine, Bit hard to tell exactly what you want, but

[R] nesting in CoxPH with survival package

2013-01-12 Thread Katie Anweiler
Hello all, I am trying to understand how to specify nested factors when using coxph(), and if it is appropriate to nest these factors in my situation. In the simplest form, I am testing two different temperatures, with each temperature being performed twice in different experimental periods (e.g.

[R] How to extract value for specific rows in an array?

2013-01-12 Thread fjaine
Hi everyone, I have a dataset that contains depths measurements every 30 sec for several days. The subset of data that I am working on looks like this: DateDay Depth 18442.0029 41.0 18442.0029 43.5 ... 18442.0429 40.3

Re: [R] random effects model

2013-01-12 Thread arun
HI, If you want to find out the percentage of missing values in the whole dataset in females and males:  set.seed(51)   dat1-data.frame(Gender=rep(c(M,F),each=10),V1=sample(c(1:3,NA),20,replace=TRUE),V2=sample(c(21:24,NA),20,replace=TRUE))  

[R] Question on broken-line regression: 'segmented' or alternative

2013-01-12 Thread Benedikt Drosse
Dear R-Users, I have a question concerning the determination of breakpoints and comparison of slopes from broken-line regression models. Although this is rather a standard problem in data analysis, all information I gathered so far, did not answer my questions. I added a subsetted example

[R] fGARCH: T-GARCH and the adj. R-squared

2013-01-12 Thread Ben Ammar
Hi everyone I'm running a T-GARCH model (i.e. a GJR-GARCH model) using the package fGARCH. A sample code for my model looks like this: Modell1=garchFit(formula=~1+aparch(1,1), data=T-Bill, delta=2, include.delta=F) summary(m1) Here's the issue. I need to indicate the adjusted R-squared values

Re: [R] the R session had a fatal problem.

2013-01-12 Thread Berend Hasselman
On 12-01-2013, at 07:59, Yung Chih Ou chihchi...@gmail.com wrote: Dear all: I can't open R-studio. (as attachment.) Do you know how to solve it? No. This doesn't belong on the R-help mailinglist. You should post this on the Rstudio problems discussion list. See

Re: [R] How to extract value for specific rows in an array?

2013-01-12 Thread Rui Barradas
Hello, If you want the maximum depth for each day, ?aggregate will do it. If you also want the date column, use ?merge after it. dat - read.table(text = DateDay Depth 18442.0029 41.0 18442.0029 43.5 18442.0429 40.3

Re: [R] Another X11 problem. (Psigh!)

2013-01-12 Thread Marc Schwartz
On Jan 11, 2013, at 10:35 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: Tried to do a plot just now and got an error: Error in text.default(2, 6, main, cex = cex) : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could not be loaded This is reproducible (in

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Ben Bolker
Ved P. Sharma vedsharma at gmail.com writes: I am trying to draw a dotted circle by using symbols command: symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2) But it gives me a solid line. I was just wondering whether am I making a mistake? Works for me (although it's a

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Jose Iparraguirre
Don't know, but you can use the function draw.circle in the plotrix package. Hope this helps, Jose From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Ved P. Sharma [vedsha...@gmail.com] Sent: 12 January 2013 07:43 To:

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

2013-01-12 Thread Alexander Engelhardt
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 fullscreen icon on the menu bar, or by dragging the borders. Then the plot

Re: [R] Using square brackets in a ploted expression

2013-01-12 Thread Uwe Ligges
On 11.01.2013 13:43, Monteiro, Jose wrote: Dear Users, I have the following text plotted inside a graphic: text(16200, 2.8*0.97, expression(NH[3]==0.33-1.1 %*% 10^-5 %*% day), adj=c(1,1)) I need to include square brackets in the expression around the ammonia to have it plotted like that:

Re: [R] random effects model

2013-01-12 Thread arun
Hello, Are you sure that you got the error message with# unlist(lapply(lapply(split(dat1,dat1$Gender),function(x) (nrow(x[!complete.cases(x[,-1]),])/nrow(x))*100),function(x) paste(x,%,sep=))) #or do.call(rbind,lapply(split(dat1,dat1$Gender),function(x)

Re: [R] random effects model

2013-01-12 Thread arun
HI, Regarding the script I sent to you earlier, it should be modified a bit according to your dataset.  For example, the variable Sex was in column 2.  Also, your data had some missing values for the Sex column, which I removed before running the code.  With respect to the Errors that you

Re: [R] Drawing a dotted circle.

2013-01-12 Thread arun
HI Ved, I was able to get the dotted circle using the same command.  I am using R 2.15 on Ubuntu 12.04. A.K.  - Original Message - From: Ved P. Sharma vedsha...@gmail.com To: r-help@r-project.org Cc: Sent: Saturday, January 12, 2013 2:43 AM Subject: [R] Drawing a dotted circle.

[R] Looking for Financial case study/scenario - Integration R with Highly powerful Database (SAP HANA)

2013-01-12 Thread Rahul Rajagopalan Nair
Hi, I am working on a highly powerful analytical database system - SAP HANA. it can crunch a million records in a matter of micro seconds and supply the data (in the form of a table/dataframe) for any R algorithm/function. I am looking for specific scenarios/use cases/KPIs in the

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Ved P. Sharma
Hi Arun, Thanks for your reply. I am running R 2.15.2 (32-bit) on Windows 7. Please take a look at the attached image of the circle, which does not look dotted to me. I also tried it on RStudio and it gives the same result, i.e. solid line. Ved On Sat, Jan 12, 2013 at 11:43 AM, arun

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Rui Barradas
Hello, Checks ok on Ubuntu 12.04 but not on Windows 7, where it plots a solid line circle. symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2) sessionInfo() R version 2.15.2 (2012-10-26) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Portuguese_Portugal.1252

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Ben Bolker
A wild guess which I can't check right now, but: is there something funny/different with the Windows graphics driver that draws the result of a dashed line based on many closely spaced points as a solid line? i.e., it draws a dash for the beginning of every segment within the line, even if they

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Rui Barradas
Hello, In Windows it's .Internal(symbols(x, y, type, data, inches, bg, fg, ...)) And this is what I've found: file r-2.15.2\src\main\graphics.c function GSymbol /* * Force line type LTY_SOLID * i.e., current par(lty) is ignored when drawing symbols */ gc.lty =

Re: [R] Drawing a dotted circle.

2013-01-12 Thread David L Carlson
You can get a dashed line if you plot to pdf() or svg(), but not any of the bitmap devices. The ellipse() function in the car package will work, but you have to set up the plot first: library(car) plot(c(-1.1, 1.1), c(-1.1, 1.1), type=n, asp=1) ellipse(c(0, 0), matrix(c(1,0,0,1), 2), 1, lty=2,

Re: [R] nesting in CoxPH with survival package

2013-01-12 Thread David Winsemius
On Jan 11, 2013, at 5:35 PM, Katie Anweiler wrote: Hello all, I am trying to understand how to specify nested factors when using coxph(), and if it is appropriate to nest these factors in my situation. In the simplest form, I am testing two different temperatures, with each temperature being

Re: [R] Question on broken-line regression: 'segmented' or alternative

2013-01-12 Thread David Winsemius
On Jan 12, 2010, at 2:13 AM, Benedikt Drosse wrote: Dear R-Users, I have a question concerning the determination of breakpoints and comparison of slopes from broken-line regression models. Although this is rather a standard problem in data analysis, all information I gathered so far,

[R] Aquamacs Preferences not showing, windows inaccessible, Scrolling not possible !!!

2013-01-12 Thread Christian Hoffmann
Hi, sorry for bothering, but I suspect the start of M-x R within Aquamacs is causing my problems: *Scrolling* is *not possible*, neither by key stroke nor by mouse. Aquamacs does not show all windows. 'Prefences', 'About A.', 'Check fo updates' will not open. Menu 'windows' shows several

Re: [R] Another X11 problem. (Psigh!)

2013-01-12 Thread Rolf Turner
On 01/13/2013 04:36 AM, Marc Schwartz wrote: On Jan 11, 2013, at 10:35 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: Tried to do a plot just now and got an error: Error in text.default(2, 6, main, cex = cex) : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could

Re: [R] nesting in CoxPH with survival package

2013-01-12 Thread Bert Gunter
Katie: You need to get local statistical help. What you are doing makes no sense. See inline below. -- Bert On Sat, Jan 12, 2013 at 1:03 PM, David Winsemius dwinsem...@comcast.net wrote: On Jan 11, 2013, at 5:35 PM, Katie Anweiler wrote: Hello all, I am trying to understand how to specify

Re: [R] bind tables

2013-01-12 Thread arun
Hi, You don't even need to split. This could be done dat1-read.table(text= year  h  len fre 1994  5 10.5  2 1994  5 14.0  2 1994  5 11.5  1 1994  9 13.0  3 1994  9 11.5  1 1994  9 13.5  5 ,sep=,header=TRUE)  dat1[rep(row.names(dat1),dat1$fre),1:3] #    year h  len #1   1994 5 10.5 #1.1 1994 5

Re: [R] Amelia algorithm

2013-01-12 Thread Matt Blackwell
Hi Martin, I helped to develop Amelia, so I can try to take a shot. In a non-mathematical way, Amelia works by filling in missing values with imputed values that are consistent with the observed relationships in the data, plus some random noise. Thus, Amelia creates multiple imputed datasets that

Re: [R] bind tables

2013-01-12 Thread arun
Hi Matteo, You could do this: dat1-read.table(text= year  h  len fre 1994  5 10.5  2 1994  5 14.0  2 1994  5 11.5  1 1994  9 13.0  3 1994  9 11.5  1 1994  9 13.5  5 ,sep=,header=TRUE) res-do.call(rbind,lapply(split(dat1,dat1$fre),function(x) x[rep(row.names(x),x$fre),1:3]))

[R] Interpreting coefficients in linear models with interaction terms

2013-01-12 Thread theundergrad
Hi, I am trying to interpret the coefficients in the model: RateOfMotorPlay ~ TestNumber + Sex + TestNumber * Sex where there are thee different tests and Sex is (obviously) binary. My results are: Residuals: Min 1Q Median 3QMax -86.90 -26.28 -7.68 22.52 123.74 Coefficients:

Re: [R] Another X11 problem. (Psigh!)

2013-01-12 Thread James Cloos
RT == Rolf Turner rolf.tur...@xtra.co.nz writes: RT Tried to do a plot just now and got an error: RT Error in text.default(2, 6, main, cex = cex) : RT X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size RT 16 could not be loaded R asks the X server to use the server-side

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

2013-01-12 Thread Rolf Turner
We don't do people's homework for them. But since you seem to have put in at least a little bit of your own effort . It is perfectly possible for there to be an interaction without there being main effects. Consider two factors A and B each with two levels. Let mu_11 be the population

Re: [R] random effects model

2013-01-12 Thread Usha Gurunathan
Hi AK That works. I was trying to get similar results from any other package. Being a beginner, I was not sure how to modify the syntax to get my output. lapply(split(BP_2bSexNoMV,BP_ 2bSexNoMV$Sex),function(x) (nrow(x[!complete.cases(x[,-2]),])/nrow(x))*100) #gives the percentage of rows of

[R] heatmap.2 problem

2013-01-12 Thread Peter Davidsen
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 vertical line that I would like to get rid

[R] customize color in xyplot

2013-01-12 Thread Elaine Kuo
Hello I want to draw a plot and classify the dot by different color, according to the habitats. I am using xyplot in lattice but do not know how to assign specific colors to the habitats. Please kindly advise how to modify the code. Thank you. Elaine code dataN

[R] Getting the R squared value in asymptotic regression model

2013-01-12 Thread Ahmed Attia
Please help getting the R squared value in asymptotic regression model I use the code below model1-nls(GN1~SSasymp (nrate,a,b,c), data = data.1 ) and R produced the modell coefficients without the R squared value? -- Ahmed M. Attia Research Assistant Dept. Of SoilCrop Sciences Texas AM

Re: [R] Getting the R squared value in asymptotic regression model

2013-01-12 Thread David Winsemius
On Jan 12, 2013, at 3:30 PM, Ahmed Attia wrote: Please help getting the R squared value in asymptotic regression model I use the code below model1-nls(GN1~SSasymp (nrate,a,b,c), data = data.1 ) and R produced the modell coefficients without the R squared value? What makes you think there

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

2013-01-12 Thread peter dalgaard
On Jan 12, 2013, at 23:33 , Rolf Turner wrote: We don't do people's homework for them. But since you seem to have put in at least a little bit of your own effort . It is perfectly possible for there to be an interaction without there being main effects. Consider two factors A and

Re: [R] Aquamacs Preferences not showing, windows inaccessible, Scrolling not possible !!!

2013-01-12 Thread Ista Zahn
I think you'll have better luck on the aquamacs help list. To verify that it is an aquamacs problem, you can try a different version of emacs (e.g., http://vgoulet.act.ulaval.ca/en/emacs/) and see if the problem persists. Best, Ista On Sat, Jan 12, 2013 at 4:17 PM, Christian Hoffmann

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

2013-01-12 Thread Ista Zahn
Hi Alexander, Try changing your type, e.g., X11.options(type=nbcairo). See ?X11 for details, and http://stackoverflow.com/questions/13235100/empty-plot-in-r for reference. Best, Ista On Sat, Jan 12, 2013 at 1:04 PM, Alexander Engelhardt a...@chaotic-neutral.de wrote: Hi r-help, I have a

Re: [R] random effects model

2013-01-12 Thread arun
Hi, Yes, you are right.  72.655222% was those missing among females.  35.14377% of values in females are missing from among the whole dataset (combined total of Males+Females data after removing the NAs from the variable Sex).  A.K. From: Usha Gurunathan

Re: [R] Getting the R squared value in asymptotic regression model

2013-01-12 Thread David Winsemius
On Jan 12, 2013, at 5:04 PM, Ahmed Attia wrote: So what is the best method to test the goodness of fit in nonlinear models? Did you read the citation offered? -- David. On Sat, Jan 12, 2013 at 4:34 PM, David Winsemius dwinsem...@comcast.net wrote: On Jan 12, 2013, at 3:30 PM, Ahmed

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

2013-01-12 Thread David Winsemius
On Jan 12, 2013, at 5:00 PM, peter dalgaard wrote: On Jan 12, 2013, at 23:33 , Rolf Turner wrote: We don't do people's homework for them. But since you seem to have put in at least a little bit of your own effort . It is perfectly possible for there to be an interaction without

[R] Extract data in word pad

2013-01-12 Thread Roslina Zakaria
Dear r-users,   I have saved data in word pad.  I would like to extract certain part of data only, for example   19710629 08(PARTIAL) 39.3 at interval beginning 19701126 010326 19720629 08(PARTIAL) 33.8 at interval beginning 19720517 144507 19730629 08(PARTIAL) 32.2

Re: [R] Extract data in word pad

2013-01-12 Thread David Winsemius
Note: I usually reply to posters as well as the list, but after having my email address sent to this poster forwarded to a spamming photo site which refuses to honor its unsubscribe links, I am deleting her address from the response. On Jan 12, 2013, at 6:23 PM, Roslina Zakaria wrote:

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Jim Lemon
On 01/12/2013 06:43 PM, Ved P. Sharma wrote: Hi, I am trying to draw a dotted circle by using symbols command: symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2) But it gives me a solid line. I was just wondering whether am I making a mistake? Hi Ved, You can draw circles on a

[R] getting TukeyHSD code

2013-01-12 Thread Erin Hodgess
Hello R People: Here's the Saturday night goofy question. I would like to see the code for TukeyHSD function and I tried the following: getAnywhere(TukeyHSD) A single object matching ‘TukeyHSD’ was found It was found in the following places package:stats namespace:stats with value

[R] How to combine two loops?

2013-01-12 Thread Agnes Ayang
Hello R-helpers, I want to ask your opinion since I am not so sure how to do it. This is regarding one part of my paper project and my situation is: Stage I I have 2 groups and for each group I need to compute the following steps; i) Generate 3 random numbers from normal distribution and

Re: [R] How to combine two loops?

2013-01-12 Thread Jim Lemon
On 01/13/2013 05:15 PM, Agnes Ayang wrote: Hello R-helpers, I want to ask your opinion since I am not so sure how to do it. This is regarding one part of my paper project and my situation is: Stage I I have 2 groups and for each group I need to compute the following steps; i) Generate 3

Re: [R] getting TukeyHSD code

2013-01-12 Thread David Winsemius
On Jan 12, 2013, at 9:54 PM, Erin Hodgess wrote: Hello R People: Here's the Saturday night goofy question. I would like to see the code for TukeyHSD function and I tried the following: getAnywhere(TukeyHSD) A single object matching ‘TukeyHSD’ was found It was found in the following places

Re: [R] Drawing a dotted circle.

2013-01-12 Thread Majid Einian
library(Cairo) CairoWin() symbols(0, 0, circles = 1, inches = FALSE, fg = 'gray', lty=2) dev.off() the plot is ok when using Cairo, but not ok with default windows graphics device. On Sun, Jan 13, 2013 at 9:16 AM, Jim Lemon j...@bitwrit.com.au wrote: On 01/12/2013 06:43 PM, Ved P. Sharma

Re: [R] getting TukeyHSD code

2013-01-12 Thread Rolf Turner
Hi Erin, What you're missing is that the TukeyHSD function is generic. There seems to be only one method for it, namely TukeyHSD.aov. Try typing: methods(TukeyHSD) On my system if I type TukeyHSD.aov I see a splendiferous amount of lovely --- and (mirabile dictu!) reasonably