[R] 16. Database connection query (Lalitha Kristipati)

Manel Amado Martí amado at cambrasabadell.org
Mon Feb 9 17:22:21 CET 2015


Hi,

You can read the R Data Import / Export Manual, that comes within the help files for the R Standard. I recommend specially the chapter 4, where you'll found the generical guidelines to connect to databases. At 4.3, RODBC Package, or DBI packages should be right to you.

Regards,

Manel Amado i Martí
Cap d'Assessoria de Comerç Interior
amado at cambrasabadell.org
Tel. 93 745 12 63 · Fax 93 745 12 64 
    
Av. Francesc Macià, 35 · 08206 Sabadell
Apt. corr. 119 · www.cambrasabadell.org



-----Missatge original-----
De: R-help [mailto:r-help-bounces at r-project.org] En nom de r-help-request at r-project.org
Enviat: dilluns, 9 / febrer / 2015 12:00
Per a: r-help at r-project.org
Tema: R-help Digest, Vol 144, Issue 9

Send R-help mailing list submissions to
	r-help at r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-help
or, via email, send a message with subject or body 'help' to
	r-help-request at r-project.org

You can reach the person managing the list at
	r-help-owner at r-project.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of R-help digest..."


Today's Topics:

   1. Re: how to draw paired mosaic plot? (Michael Friendly)
   2. Re: how to draw paired mosaic plot? (Michael Friendly)
   3. Re: how to draw paired mosaic plot? (meng)
   4. Unable to use `eval(parse(text))' in  nlme::lme (Ravi Varadhan)
   5. Re: Unable to use `eval(parse(text))' in  nlme::lme (Rolf Turner)
   6. Re: Unable to use `eval(parse(text))' in  nlme::lme
      (Duncan Murdoch)
   7. Package build help (Glenn Schultz)
   8. Re: Package build help (Duncan Murdoch)
   9. Re: Superscript in legend without using expression function
      (Gabor Grothendieck)
  10. confidence interval for wilcox_test (RomanGelzhaeuser)
  11. Re: Unable to use `eval(parse(text))' in  nlme::lme (Ben Bolker)
  12. specifying dimensions of a graphic (not the window...)
      (Evan Cooch)
  13. Re: specifying dimensions of a graphic (not the window...)
      (Evan Cooch)
  14. Zero length data block in hexView? (Jeff Newmiller)
  15. ASA John M. Chambers Statistical Software Award - 2015
      (Munjal, Aarti)
  16. Database connection query (Lalitha Kristipati)


----------------------------------------------------------------------

Message: 1
Date: Sun, 8 Feb 2015 10:01:09 -0500
From: Michael Friendly <friendly at yorku.ca>
To: <r-help at stat.math.ethz.ch>
Cc: R help <r-help at r-project.org>
Subject: Re: [R] how to draw paired mosaic plot?
Message-ID: <54D77A35.1030108 at yorku.ca>
Content-Type: text/plain; charset="windows-1252"; format=flowed

You are looking for the pairs plot for table and other objects in the vcd package:

  ?vcd::pairs.table

It allows you to use various panel functions for the diagonal and off-diagonal plots

On 2/7/2015 9:50 AM, meng wrote:
> If there are many character variables,and I want to get the mosaic plot of every pair of each variable,how to do then?
>
>
> If the variables are numeric, I can use pairs to get paired scatter plot.
> But as to the character variables, how to get the "paired mosaic plot"?
>
>
> Many thanks.
>
>
>
>
>
> --
> QQ: 1733768559
>
>
>
>
>
> At 2015-02-07 17:04:26,"Jim Lemon" <drjimlemon at gmail.com> wrote:
>> Hi meng,
>> It's not too hard to get a mosaic plot of two character variables:
>>
>> x<-sample(LETTERS[1:3],20,TRUE)
>> y<-sample(LETTERS[24:26],20,TRUE)
>> mosaicplot(table(x,y))
>>
>> If you could tell us how the above is not what you want, perhaps a 
>> better suggestion will appear.
>>
>> Jim
>>
>>
>> On Sat, Feb 7, 2015 at 6:29 PM, meng <laomeng_3 at 163.com> wrote:
>>> If both x and y are all character, paired scatter plot is a little bit strange I think.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> QQ: 1733768559
>>>
>>>
>>>
>>>
>>>
>>> At 2015-02-06 23:52:34,"Duncan Murdoch" <murdoch.duncan at gmail.com> wrote:
>>>> On 06/02/2015 6:46 AM, meng wrote:
>>>>> Hi all:
>>>>> If there are two numeric variable:x,y, and I can get paired scatter plot by function "pairs".But if x and y are character, and I want to get paired mosaic plot,which function should be used then?
>>>>
>>>> Why not pairs, with a custom panel function?  There are examples on 
>>>> the help page, though I don't think a mosaic plot is there.
>>>>
>>>> Duncan Murdoch
>>>>>
>>>>>
>>>>> Many thanks!
>>>>> My best.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> QQ: 1733768559
>>>>>
>>>>>
>>>>>       [[alternative HTML version deleted]]
>>>>>
>>>>> ______________________________________________
>>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide 
>>>>> http://www.R-project.org/posting-guide.html
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide 
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>
> 	[[alternative HTML version deleted]]
>


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



------------------------------

Message: 2
Date: Sun, 08 Feb 2015 10:01:09 -0500
From: Michael Friendly <friendly at yorku.ca>
To: meng <laomeng_3 at 163.com>, Jim Lemon <drjimlemon at gmail.com>
Cc: R help <r-help at r-project.org>
Subject: Re: [R] how to draw paired mosaic plot?
Message-ID: <54D77A35.1030108 at yorku.ca>
Content-Type: text/plain; charset=windows-1252; format=flowed

You are looking for the pairs plot for table and other objects in the vcd package:

  ?vcd::pairs.table

It allows you to use various panel functions for the diagonal and off-diagonal plots

On 2/7/2015 9:50 AM, meng wrote:
> If there are many character variables,and I want to get the mosaic plot of every pair of each variable,how to do then?
>
>
> If the variables are numeric, I can use pairs to get paired scatter plot.
> But as to the character variables, how to get the "paired mosaic plot"?
>
>
> Many thanks.
>
>
>
>
>
> --
> QQ: 1733768559
>
>
>
>
>
> At 2015-02-07 17:04:26,"Jim Lemon" <drjimlemon at gmail.com> wrote:
>> Hi meng,
>> It's not too hard to get a mosaic plot of two character variables:
>>
>> x<-sample(LETTERS[1:3],20,TRUE)
>> y<-sample(LETTERS[24:26],20,TRUE)
>> mosaicplot(table(x,y))
>>
>> If you could tell us how the above is not what you want, perhaps a 
>> better suggestion will appear.
>>
>> Jim
>>
>>
>> On Sat, Feb 7, 2015 at 6:29 PM, meng <laomeng_3 at 163.com> wrote:
>>> If both x and y are all character, paired scatter plot is a little bit strange I think.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> QQ: 1733768559
>>>
>>>
>>>
>>>
>>>
>>> At 2015-02-06 23:52:34,"Duncan Murdoch" <murdoch.duncan at gmail.com> wrote:
>>>> On 06/02/2015 6:46 AM, meng wrote:
>>>>> Hi all:
>>>>> If there are two numeric variable:x,y, and I can get paired scatter plot by function "pairs".But if x and y are character, and I want to get paired mosaic plot,which function should be used then?
>>>>
>>>> Why not pairs, with a custom panel function?  There are examples on 
>>>> the help page, though I don't think a mosaic plot is there.
>>>>
>>>> Duncan Murdoch
>>>>>
>>>>>
>>>>> Many thanks!
>>>>> My best.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> QQ: 1733768559
>>>>>
>>>>>
>>>>>       [[alternative HTML version deleted]]
>>>>>
>>>>> ______________________________________________
>>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide 
>>>>> http://www.R-project.org/posting-guide.html
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide 
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>
> 	[[alternative HTML version deleted]]
>


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



------------------------------

Message: 3
Date: Mon, 9 Feb 2015 00:23:57 +0800 (CST)
From: meng  <laomeng_3 at 163.com>
To: "Michael Friendly" <friendly at yorku.ca>
Cc: R help <r-help at r-project.org>
Subject: Re: [R] how to draw paired mosaic plot?
Message-ID: <613a4eff.b2c.14b6a012f45.Coremail.laomeng_3 at 163.com>
Content-Type: text/plain; charset="UTF-8"

Many thanks.





--
QQ: 1733768559





At 2015-02-08 23:01:09,"Michael Friendly" <friendly at yorku.ca> wrote:
>You are looking for the pairs plot for table and other objects in the 
>vcd package:
>
>  ?vcd::pairs.table
>
>It allows you to use various panel functions for the diagonal and 
>off-diagonal plots
>
>On 2/7/2015 9:50 AM, meng wrote:
>> If there are many character variables,and I want to get the mosaic plot of every pair of each variable,how to do then?
>>
>>
>> If the variables are numeric, I can use pairs to get paired scatter plot.
>> But as to the character variables, how to get the "paired mosaic plot"?
>>
>>
>> Many thanks.
>>
>>
>>
>>
>>
>> --
>> QQ: 1733768559
>>
>>
>>
>>
>>
>> At 2015-02-07 17:04:26,"Jim Lemon" <drjimlemon at gmail.com> wrote:
>>> Hi meng,
>>> It's not too hard to get a mosaic plot of two character variables:
>>>
>>> x<-sample(LETTERS[1:3],20,TRUE)
>>> y<-sample(LETTERS[24:26],20,TRUE)
>>> mosaicplot(table(x,y))
>>>
>>> If you could tell us how the above is not what you want, perhaps a 
>>> better suggestion will appear.
>>>
>>> Jim
>>>
>>>
>>> On Sat, Feb 7, 2015 at 6:29 PM, meng <laomeng_3 at 163.com> wrote:
>>>> If both x and y are all character, paired scatter plot is a little bit strange I think.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> QQ: 1733768559
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> At 2015-02-06 23:52:34,"Duncan Murdoch" <murdoch.duncan at gmail.com> wrote:
>>>>> On 06/02/2015 6:46 AM, meng wrote:
>>>>>> Hi all:
>>>>>> If there are two numeric variable:x,y, and I can get paired scatter plot by function "pairs".But if x and y are character, and I want to get paired mosaic plot,which function should be used then?
>>>>>
>>>>> Why not pairs, with a custom panel function?  There are examples 
>>>>> on the help page, though I don't think a mosaic plot is there.
>>>>>
>>>>> Duncan Murdoch
>>>>>>
>>>>>>
>>>>>> Many thanks!
>>>>>> My best.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> QQ: 1733768559
>>>>>>
>>>>>>
>>>>>>       [[alternative HTML version deleted]]
>>>>>>
>>>>>> ______________________________________________
>>>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>>> PLEASE do read the posting guide 
>>>>>> http://www.R-project.org/posting-guide.html
>>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>
>>>>
>>>>          [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide 
>>>> http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>
>> 	[[alternative HTML version deleted]]
>>
>
>
>-- 
>Michael Friendly     Email: friendly AT yorku DOT ca
>Professor, Psychology Dept. & Chair, Quantitative Methods
>York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
>4700 Keele Street    Web:   http://www.datavis.ca
>Toronto, ONT  M3J 1P3 CANADA

	[[alternative HTML version deleted]]


------------------------------

Message: 4
Date: Sun, 8 Feb 2015 17:46:18 +0000
From: Ravi Varadhan <ravi.varadhan at jhu.edu>
To: R-Help <r-help at r-project.org>
Subject: [R] Unable to use `eval(parse(text))' in  nlme::lme
Message-ID: <1423417571305.5335 at jhu.edu>
Content-Type: text/plain; charset="UTF-8"

Hi,

I would like to run lme() on a number of response variables in a dataframe in an automatic manner.  Bu, when I use eval(parse(text=yname)) to denote the LHS of the formula in lme(), I get the following error message:



> require(nlme)



> mod2 <- with(subset(labdata2, Transplant_type!=0 & time >0), 
> lme(eval(parse(text=yname)) ~ time +  as.factor(gvhd), random = 
> ~1|Patient, correlation = corAR1(), method="ML", na.action=na.omit))
Error in model.frame.default(formula = ~Patient + yname + time + gvhd,  :
  variable lengths differ (found for 'yname')

The same usage works well in lme4::lmer without any problems.



It seems that there is a problem in how the formula object is evaluated in lme().  Is there an alternative way to do this?



Thank you,

Ravi

	[[alternative HTML version deleted]]



------------------------------

Message: 5
Date: Mon, 09 Feb 2015 09:49:41 +1300
From: Rolf Turner <r.turner at auckland.ac.nz>
To: Ravi Varadhan <ravi.varadhan at jhu.edu>, R-Help
	<r-help at r-project.org>
Subject: Re: [R] Unable to use `eval(parse(text))' in  nlme::lme
Message-ID: <54D7CBE5.9020002 at auckland.ac.nz>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 09/02/15 06:46, Ravi Varadhan wrote:
> Hi,
>
> I would like to run lme() on a number of response variables in a 
> dataframe in an automatic manner.  Bu, when I use
> eval(parse(text=yname)) to denote the LHS of the formula in lme(), I 
> get the following error message:
>
>
>
>> require(nlme)
>
>
>
>> mod2 <- with(subset(labdata2, Transplant_type!=0 & time >0),
>> lme(eval(parse(text=yname)) ~ time +  as.factor(gvhd), random = 
>> ~1|Patient, correlation = corAR1(), method="ML",
>> na.action=na.omit))
> Error in model.frame.default(formula = ~Patient + yname + time + gvhd, 
> : variable lengths differ (found for 'yname')
>
> The same usage works well in lme4::lmer without any problems.
>
>
>
> It seems that there is a problem in how the formula object is 
> evaluated in lme().  Is there an alternative way to do this?

What about trying some'at lahk:

fmla <- as.formula(paste(yname,"~ time + as.factor(gvhd)"))
mod2 <- with(...., lme(fmla, random = ....))

Also you would probably be better off using the data argument rather then using with(); this could have some impact on the environment in which the formula is evaluated.

Just stabbing in the dark here since you did not provide a reproducible example.

cheers,

Rolf Turner

--
Rolf Turner
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
Home phone: +64-9-480-4619



------------------------------

Message: 6
Date: Sun, 08 Feb 2015 16:14:55 -0500
From: Duncan Murdoch <murdoch.duncan at gmail.com>
To: Rolf Turner <r.turner at auckland.ac.nz>,	Ravi Varadhan
	<ravi.varadhan at jhu.edu>, R-Help <r-help at r-project.org>
Subject: Re: [R] Unable to use `eval(parse(text))' in  nlme::lme
Message-ID: <54D7D1CF.2010205 at gmail.com>
Content-Type: text/plain; charset=windows-1252

On 08/02/2015 3:49 PM, Rolf Turner wrote:
> On 09/02/15 06:46, Ravi Varadhan wrote:
>> Hi,
>>
>> I would like to run lme() on a number of response variables in a
>> dataframe in an automatic manner.  Bu, when I use
>> eval(parse(text=yname)) to denote the LHS of the formula in lme(), I
>> get the following error message:
>>
>>
>>
>>> require(nlme)
>>
>>
>>
>>> mod2 <- with(subset(labdata2, Transplant_type!=0 & time >0),
>>> lme(eval(parse(text=yname)) ~ time +  as.factor(gvhd), random =
>>> ~1|Patient, correlation = corAR1(), method="ML",
>>> na.action=na.omit))
>> Error in model.frame.default(formula = ~Patient + yname + time +
>> gvhd,  : variable lengths differ (found for 'yname')
>>
>> The same usage works well in lme4::lmer without any problems.
>>
>>
>>
>> It seems that there is a problem in how the formula object is
>> evaluated in lme().  Is there an alternative way to do this?
> 
> What about trying some'at lahk:
> 
> fmla <- as.formula(paste(yname,"~ time + as.factor(gvhd)"))
> mod2 <- with(...., lme(fmla, random = ....))
> 
> Also you would probably be better off using the data argument rather 
> then using with(); this could have some impact on the environment in 
> which the formula is evaluated.

Formulas are a little tricky:  effectively they are evaluated twice.  If
you type something like

y ~ x

(or eval(parse(text="y ~ x")), or as.formula("y ~ x")) then a formula
object is created.  That object remembers the environment in which it
was created, so later when the modelling function uses it, the x and y
variables are evaluated in the original context.

In your example, as.formula() will convert the string to a formula, and
attach the current environment.  So you'd better hope that whatever
variable yname names, as well as time and gvhd, are all available there.

Duncan Murdoch

> 
> Just stabbing in the dark here since you did not provide a reproducible 
> example.
> 
> cheers,
> 
> Rolf Turner
>



------------------------------

Message: 7
Date: Sun, 08 Feb 2015 21:06:03 +0000 (GMT)
From: Glenn Schultz <glennmschultz at me.com>
To: R Help R <r-help at r-project.org>
Subject: [R] Package build help
Message-ID: <b3a194a5-fe72-4202-9999-adf41b5a88c0 at me.com>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hello All,

I am in the final stages of building my first package "BondLab" and the check throughs the following warning. ?I think this is namespace thing. ?I have not done anything with the namespace at this point. ?I am turning my attention to the namespace now. ?Am I correct this can be a handled by the namespace?

Thanks,
Glenn

Found the following significant warnings:
? Warning: replacing previous import by ?lubridate::duration? when loading ?BondLab?
? Warning: replacing previous import by ?plyr::here? when loading ?BondLab?

------------------------------

Message: 8
Date: Sun, 08 Feb 2015 18:15:45 -0500
From: Duncan Murdoch <murdoch.duncan at gmail.com>
To: Glenn Schultz <glennmschultz at me.com>, R Help R
	<r-help at r-project.org>
Subject: Re: [R] Package build help
Message-ID: <54D7EE21.7030505 at gmail.com>
Content-Type: text/plain; charset=windows-1252

On 08/02/2015 4:06 PM, Glenn Schultz wrote:
> Hello All,
> 
> I am in the final stages of building my first package "BondLab" and the check throughs the following warning.  I think this is namespace thing.  I have not done anything with the namespace at this point.  I am turning my attention to the namespace now.  Am I correct this can be a handled by the namespace?
> 

I would guess you have imported the lubridate and plyr packages, and
also defined your own duration() and here() functions, hiding theirs.

Duncan Murdoch

> Thanks,
> Glenn
> 
> Found the following significant warnings:
>   Warning: replacing previous import by ?lubridate::duration? when loading ?BondLab?
>   Warning: replacing previous import by ?plyr::here? when loading ?BondLab?
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



------------------------------

Message: 9
Date: Sun, 8 Feb 2015 19:08:56 -0500
From: Gabor Grothendieck <ggrothendieck at gmail.com>
To: jgui001 <j.guilbert at auckland.ac.nz>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Subject: Re: [R] Superscript in legend without using expression
	function
Message-ID:
	<CAP01uRm8q8ZweJxwQ3BiuvdNQezDwu5hxxaoRhLpj5q=BCgAjw at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Sat, Feb 7, 2015 at 4:57 PM, jgui001 <j.guilbert at auckland.ac.nz> wrote:
> I am plotting three sets of data on a single graph, and doing around 100+
> graphs.
> I can use the expression function to superscript the 2 but that seems to
> force me to manually put in the R squared values. Is there away around this?
>
> This code will show what it should look like this but with the 2
> superscripted
>
> r1<-c(0.59,0.9,0.6)
> plot(1:6)
> legend("topleft",
> legend=c(paste("G1 r=",r1[1]), paste("G2 r=",r1[2]), paste("G3 r=",r1[3])))

Replace the legend statement with:

leg <- as.list(parse(text = sprintf("G%d~r^2=%.2f", 1:3, r1)))
legend("topleft", legend = leg)



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 10
Date: Sun, 8 Feb 2015 14:20:34 -0800 (PST)
From: RomanGelzhaeuser <roman at gelzhaeuser.net>
To: r-help at r-project.org
Subject: [R] confidence interval for wilcox_test
Message-ID: <1423434034917-4702950.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii

Hello,
When using wilcox_test from coin I got a sample estimator which does not lie
in the confidence interval.(see below) How is that possible? (The
documentation said that both referre to some kind of pseudo median but it
seems to be the same for both the confidence interval and the samplle
estimator)

> wilcox_test(ErgebnisBefragung~V,daten,conf.int=T)

        Asymptotic Wilcoxon Mann-Whitney Rank Sum Test

data:  ErgebnisBefragung by V (Burch, TVT)
Z = -2.0157, p-value = 0.04383
alternative hypothesis: true mu is not equal to 0
95 percent confidence interval:
 -2.056811e-05 -4.179582e-06
sample estimates:
difference in location 
         -3.251934e-05 

> 



--
View this message in context: http://r.789695.n4.nabble.com/confidence-interval-for-wilcox-test-tp4702950.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 11
Date: Mon, 9 Feb 2015 01:16:55 +0000
From: Ben Bolker <bbolker at gmail.com>
To: <r-help at stat.math.ethz.ch>
Subject: Re: [R] Unable to use `eval(parse(text))' in  nlme::lme
Message-ID: <loom.20150209T001628-315 at post.gmane.org>
Content-Type: text/plain; charset="us-ascii"

Ravi Varadhan <ravi.varadhan <at> jhu.edu> writes:

> I would like to run lme() on a number of response variables 
> in a dataframe in an automatic manner.  Bu, when I
> use eval(parse(text=yname)) to denote the LHS of the formula in lme(),
> I get the following error message:
> 
> > require(nlme)
> 
> > mod2 <- with(subset(labdata2, Transplant_type!=0 & time >0), 
> lme(eval(parse(text=yname)) ~ time + 
> as.factor(gvhd), random = ~1|Patient, correlation = corAR1(), 
> method="ML", na.action=na.omit))
> Error in model.frame.default(formula = ~Patient + yname + time + gvhd,  :
>   variable lengths differ (found for 'yname')
> 
> The same usage works well in lme4::lmer without any problems.
>
> It seems that there is a problem in 
> how the formula object is evaluated in lme().  Is there an alternative way
> to do this?
> 
  
  While I'm pleased that lmer is more robust, I would say that the
safest/most robust way to do this would be:

ff <- reformulate("time","as.factor(gvhd)",response=yname)
dd <- subset(labdata2, Transplant_type!=0 & time >0)
lme(ff, random=~1|Patient, data=dd, ...)



------------------------------

Message: 12
Date: Sun, 08 Feb 2015 19:41:31 -0500
From: Evan Cooch <evan.cooch at gmail.com>
To: r-help at r-project.org
Subject: [R] specifying dimensions of a graphic (not the window...)
Message-ID: <54D8023B.9030109 at gmail.com>
Content-Type: text/plain; charset="UTF-8"

Greetings --

Graphics newbie (I generally don't use R for graphics, so if the 
question is 'obvious', point that out gently ;-)

I'm trying to use levelplot in the lattice package, to generate what 
I'll call a 'decision table', where optimal decisions (discrete, on the 
interval [0.0,0.5] by increments of 0.1) from a dynamic programming 
problem are plotted as a function of time since the time horizon. The 
'matrix' I'm trying to plot is 100 rows x 10 columns. While using the 
following works, more or less...

rgb.palette <- colorRampPalette(c("red", "green"), space = "rgb")
levelplot(t(results$policy), main="optimal harvest", xlab="time from 
end", ylab="state (N)", col.regions=rgb.palette(6), cuts=6, 
at=seq(0,0.5,0.1))


the rendered figure is waaaaay too narrow. I want to make the 
proportions of the 'levelplot' (what I usually call a 'heat map') square 
(or something else that I specify). I'm used to dedicated graphics 
applications wherew I simply grab the figure and resize it to whatever 
aspect ratio I want. Obviously, with R, I need to invoke some sort of 
command line argument.

In my searches, I've found a fair number of queries/answers about how to 
change the size of the graphics windows, but I could care lerss what the 
graphics window sizing is (presumably, it should adjust to whatever the 
size of the underlying graphic is). I want to 'hard code' the dimensions 
of the graphic itself, not the window it's rendered in.

I'm sure the answer is out there, but I've been unsuccessful at finding 
the magic keywords in my searches.

Thanks in advance.





	[[alternative HTML version deleted]]



------------------------------

Message: 13
Date: Sun, 08 Feb 2015 20:13:06 -0500
From: Evan Cooch <evan.cooch at gmail.com>
To: r-help at r-project.org
Subject: Re: [R] specifying dimensions of a graphic (not the
	window...)
Message-ID: <54D809A2.7050708 at gmail.com>
Content-Type: text/plain; charset="UTF-8"


On 2/8/2015 7:41 PM, Evan Cooch wrote:
> Greetings --
>
> Graphics newbie (I generally don't use R for graphics, so if the 
> question is 'obvious', point that out gently ;-)
>
> I'm trying to use levelplot in the lattice package, to generate what 
> I'll call a 'decision table', where optimal decisions (discrete, on 
> the interval [0.0,0.5] by increments of 0.1) from a dynamic 
> programming problem are plotted as a function of time since the time 
> horizon. The 'matrix' I'm trying to plot is 100 rows x 10 columns. 
> While using the following works, more or less...
>
> rgb.palette <- colorRampPalette(c("red", "green"), space = "rgb")
> levelplot(t(results$policy), main="optimal harvest", xlab="time from
> end", ylab="state (N)", col.regions=rgb.palette(6), cuts=6, 
> at=seq(0,0.5,0.1))
>
>

Sufficient solution to the problem for now -- adding the option 
aspect="fill" fills the window, and if I specify the size of the window,
then this amounts to the same thing, more or less.

Seems kind of a backward way to do it. I'd have thought setting size of 
the graphic, and then having the window size change dynamically around 
said graphic, would have been more intuitive.




	[[alternative HTML version deleted]]



------------------------------

Message: 14
Date: Sun, 08 Feb 2015 21:41:04 -0800
From: Jeff Newmiller <jdnewmil at dcn.davis.CA.us>
To: R-help <r-help at r-project.org>
Cc: paul at stat.auckland.ac.nz
Subject: [R] Zero length data block in hexView?
Message-ID: <1CE14B42-C0D1-4F41-8A94-D4F2DEAD2117 at dcn.davis.CA.us>
Content-Type: text/plain; charset=UTF-8

The JPG data format uses something like the "markedBlock" defined in the hexView package, but some of the blocks are just markers with no data. Is there some simple way that I might have missed to explain this concept to hexView so the readFormat function can handle this? I have cobbled together some code to read part of the header but it doesn't parallel the format definition very well.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.



------------------------------

Message: 15
Date: Sun, 8 Feb 2015 08:02:36 +0000
From: "Munjal, Aarti" <AARTI.MUNJAL at ucdenver.edu>
To: "r-help at r-project.org" <r-help at r-project.org>
Subject: [R] ASA John M. Chambers Statistical Software Award - 2015
Message-ID: <D0FC6601.8AE7%aarti.munjal at ucdenver.edu>
Content-Type: text/plain; charset="UTF-8"

John M. Chambers Statistical Software Award - 2015

Statistical Computing Section

American Statistical Association


The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998 the Association for Computing Machinery presented its Software System Award to John Chambers for the design and development of S. Dr. Chambers generously donated his award to the Statistical Computing Section to endow an annual prize for statistical software written by, or in collaboration with, an undergraduate or graduate student. The prize carries with it a cash award of $1000, plus a substantial allowance for travel to the annual Joint Statistical Meetings (JSM) where the award will be presented.


Teams of up to 3 people can participate in the competition, with the cash award being split among team members. The travel allowance will be given to just one individual in the team, who will be presented the award at JSM. To be eligible, the team must have designed and implemented a piece of statistical software. The individual within the team indicated to receive the travel allowance must have begun the development while a student, and must either currently be a student, or have completed all requirements for her/his last degree after January 1, 2014. To apply for the award, teams must provide the following materials:


Current CV's of all team members.


A letter from a faculty mentor at the academic institution of the individual indicated to receive the travel award. The letter should confirm that the individual had substantial participation in the development of the software, certify her/his student status when the software began to be developed (and either the current student status or the date of degree completion), and briefly discuss the importance of the software to statistical practice.


A brief, one to two page description of the software, summarizing what it does, how it does it, and why it is an important contribution. If the team member competing for the travel allowance has continued developing the software after finishing her/his studies, the description should indicate what was developed when the individual was a student and what has been added since.


An installable software package with its source code for use by the award committee. It should be accompanied by enough information to allow the judges to effectively use and evaluate the software (including its design considerations.) This information can be provided in a variety of ways, including but not limited to a user manual (paper or electronic), a paper, a URL, and online help to the system.


All materials must be in English. We prefer that electronic text be submitted in Postscript or PDF. The entries will be judged on a variety of dimensions, including the importance and relevance for statistical practice of the tasks performed by the software, ease of use, clarity of description, elegance and availability for use by the statistical community. Preference will be given to those entries that are grounded in software design rather than calculation. The decision of the award committee is final.


All application materials must be received by 5:00pm EST, Tuesday, February 17, 2015 at the address below. The winner will be announced in May and the award will be given at the 2015 Joint Statistical Meetings.


Chambers Statistical Software Award

c/o Aarti Munjal

Colorado School of Public Health

University of Colorado Denver

aarti.munjal at ucdenver.edu<mailto:aarti.munjal at ucdenver.edu>


	[[alternative HTML version deleted]]



------------------------------

Message: 16
Date: Mon, 9 Feb 2015 10:33:38 +0000
From: Lalitha Kristipati <Lalitha.Kristipati at techmahindra.com>
To: "'R-help at r-project.org'" <R-help at r-project.org>
Subject: [R] Database connection query
Message-ID:
	<9dea606947d54f4c8cbbbe8acf6cc050 at BLREXCHMBX001.TechMahindra.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

I would like to know when to use drivers and when to use packages to connect to databases in R

Regards,
Lalitha Kristipati
Associate Software Engineer



============================================================================================================================
Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


	[[alternative HTML version deleted]]



------------------------------

Subject: Digest Footer

_______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

------------------------------

End of R-help Digest, Vol 144, Issue 9



More information about the R-help mailing list