Re: [R] x axis position and ggplot2

2014-12-12 Thread Jouanin Celine
Hi, Thank you for your answer, I thought we could used something like the axis function ( axis(side=3,...)) in ggplot2. I didn't find something like this in ggplot and I'm a bite surprised this doesn't exist. Sometimes we need to use lattice, grid -thank you Duncan for your help, or ggplot or

Re: [R] How to pass a nested random effect with frailty in coxph()

2014-12-12 Thread Therneau, Terry M., Ph.D.
Use the coxme funtion (package coxme), which has the same syntax as lme4. The frailty() function in coxph only handles the simple case of a random intercept. Terry Therneau On 12/12/2014 05:00 AM, r-help-requ...@r-project.org wrote: Hi, I have a very simple Cox regression model in which I

Re: [R] Is there a plotmath symbol \mapsto?

2014-12-12 Thread Prof Brian Ripley
The only symbols plotmath has access to are those in the Adobe Symbol encoding. You can display all of those using the example at the bottom of ?points, as ?plotmath did tell you. (So it was a rather rich asking for an example.) It also tells you that on some devices/platforms you can use

[R] R and tcltk, problem to get the value entered

2014-12-12 Thread Jouanin Celine
Hi dear R list, I would like to create a graphical user interface with tcltk.I want to have a window where the user will enter a numeric, this will open a message box with his value. This works, but I don't succeed to get the value x, to use it after in a script in the R console. The x variable

Re: [R] Is there a plotmath symbol \mapsto?

2014-12-12 Thread Marius Hofert
Dear Professor Ripley, Thank you for your reply. Do you specify \u21A6 via something like this? plot(1, main=expression(symbol(\u21A6))) This gives an the 'registered trademark symbol' (circled R) for me (also cairo-based Linux). Thanks and cheers, Marius

Re: [R] R and tcltk, problem to get the value entered

2014-12-12 Thread peter dalgaard
On 12 Dec 2014, at 11:02 , Jouanin Celine celine_joua...@yahoo.fr wrote: Hi dear R list, I would like to create a graphical user interface with tcltk.I want to have a window where the user will enter a numeric, this will open a message box with his value. This works, but I don't succeed to

Re: [R] x axis position and ggplot2

2014-12-12 Thread Duncan Mackay
Hi Céline ggplot2 and lattice have different constructs to the base graphics – although they may share some common arguments like xlab, lwd col etc the rest may be totally different. In the latticeExtra package I think there is a function to make the lattice look like ggplot. I have

[R] create matrices with constraint

2014-12-12 Thread Kathryn Lord
Dear all, Suppose that I have natural numbers 1 through 28. Based on these numbers, choose 4 numbers 7 times without replacement and make a 4 by 7 matrix, for example, a1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,]159 13 17 21 25 [2,]26 10 14 18 22 26

Re: [R] create matrices with constraint

2014-12-12 Thread peter dalgaard
On 12 Dec 2014, at 18:00 , Kathryn Lord kathryn.lord2...@gmail.com wrote: Dear all, Suppose that I have natural numbers 1 through 28. Based on these numbers, choose 4 numbers 7 times without replacement and make a 4 by 7 matrix, for example, a1 [,1] [,2] [,3] [,4] [,5] [,6]

Re: [R] Is there a plotmath symbol \mapsto?

2014-12-12 Thread David Winsemius
On Dec 12, 2014, at 5:32 AM, Prof Brian Ripley wrote: The only symbols plotmath has access to are those in the Adobe Symbol encoding. You can display all of those using the example at the bottom of ?points, as ?plotmath did tell you. (So it was a rather rich asking for an example.)

Re: [R] create matrices with constraint

2014-12-12 Thread John McKown
On Fri, Dec 12, 2014 at 12:17 PM, peter dalgaard pda...@gmail.com wrote: On 12 Dec 2014, at 18:00 , Kathryn Lord kathryn.lord2...@gmail.com wrote: Dear all, Suppose that I have natural numbers 1 through 28. Based on these numbers, choose 4 numbers 7 times without replacement and

Re: [R] Is there a plotmath symbol \mapsto?

2014-12-12 Thread Prof Brian Ripley
On 12/12/2014 19:40, David Winsemius wrote: On Dec 12, 2014, at 5:32 AM, Prof Brian Ripley wrote: The only symbols plotmath has access to are those in the Adobe Symbol encoding. You can display all of those using the example at the bottom of ?points, as ?plotmath did tell you. (So it was

[R] R-intro question

2014-12-12 Thread Александр Гехсбарг
Dear Sir/Madam, While reading R-intro document (found here http://cran.r-project.org/doc/manuals/R-intro.pdf) on the page 37, I have found such text *which does indicate a significant difference, assuming normality* referenced to t-test for equality of two means (unpaired t-test). Could, you,

Re: [R] R-intro question

2014-12-12 Thread David Winsemius
On Dec 12, 2014, at 12:00 PM, Александр Гехсбарг wrote: Dear Sir/Madam, While reading R-intro document (found here http://cran.r-project.org/doc/manuals/R-intro.pdf) on the page 37, I have found such text *which does indicate a significant difference, assuming normality* referenced

[R] Invisible Printing

2014-12-12 Thread Dinesh Chowdhary
R 3.1.2 Dear good people I have a very generic question, and please excuse me for the informal format of presenting it? Is invisible printing still persistent in the latest version of R. why to use `invisible(x)` ? Thanking you in anticipation Dinesh [[alternative HTML version

Re: [R] Invisible Printing

2014-12-12 Thread Jeff Newmiller
Yes. The help file for this function explains why it is used. If you don't want to use it, that is fine. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

[R] Missing Data Imputation for Complex Survey Data

2014-12-12 Thread N F
Dear all, I've got a bit of a challenge on my hands. I've got survey data produced by a government agency for which I want to use the person-weights in my analyses. This is best accomplished by specifying weights in {survey} and then calculating descriptive statistics/models through functions in

[R] Getting a Error: unexpected symbol in:

2014-12-12 Thread Sajjad Jafri
I am trying to create a simple function that finds the number of days between two dates. However, when I run the function, R gives me an error message saying: unexpected '}' in } Here is my function: #create a function that finds the number of days between two dates

Re: [R] Getting a Error: unexpected symbol in:

2014-12-12 Thread Bert Gunter
As what is going on is completely obvious, I think you need to consult a local programmer to explain it to you -- probably a 15 year old kid will do. Seriously. Doesn't have to know R (other than that a multiline's function's code/body must be enclosed in { }. Perhaps reading an R tutorial (maybe

Re: [R] Getting a Error: unexpected symbol in:

2014-12-12 Thread David Winsemius
On Dec 12, 2014, at 1:43 PM, Sajjad Jafri wrote: I am trying to create a simple function that finds the number of days between two dates. However, when I run the function, R gives me an error message saying: What do you mean when you run the function? I do not see any calls to the

Re: [R] Getting a Error: unexpected symbol in:

2014-12-12 Thread Jeff Newmiller
The body of a function needs to be wrapped in one pair of braces. diffdate-function(x,y){ z-unclass(as.Date(x)) z1-unclass(as.Date(y)) return(z1-z) } It is common in R to make sure that date values are of the appropriate type before you call the function instead of

Re: [R] create matrices with constraint

2014-12-12 Thread Richard M. Heiberger
I think you might be looking for incomplete block designs. See Cochran and Cox 1957, page 481 for Plan 11.38 t=28, k=4, r=9, b=63, lambda=1, E=.78. Type I This design might be the set of 4 x 7 matrices you are looking for. On Fri, Dec 12, 2014 at 12:00 PM, Kathryn Lord

Re: [R] Missing Data Imputation for Complex Survey Data

2014-12-12 Thread Anthony Damico
the mitools package is compatible with the survey package.. asdfree.com has complete step-by-step R code examples to work with govt microdata. here are the ones with multiply imputed survey data. :) national health interview survey national survey of children's health consumer expenditure