Re: [R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-24 Thread Jeff Newmiller
You MUST put all data you plan to refer to into a data frame when using ggplot. 
There are a couple of ways you could do this... the easiest is to put a header 
line in the data file with column names. Or, you can assign a vector of new 
names to the names of the data frame.

names( hetshoms ) <- c( "chrom", "start.pos", "end.pos", "hets", "het_stat", 
"homs", "hom_stat", "indiv" )
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On March 24, 2015 3:40:11 PM PDT, Loren  wrote:
>Hello all,
>
>I am having a perplexing problem trying to use facet_wrap in ggplot,
>with
>both my real dataset and a simplified dummy dataset.  I am trying to
>plot
>heterozygosity across the genome for multiple individuals, with each
>chromosome shown separately.
>
>My dummy data:
>chr1   123000  124000  2   0.2 26  0.00026 indiv1
>chr1   124000  125000  3   0.3 12  0.00012 indiv1
>chr1   125000  126000  1   0.1 6   0.6 indiv1
>chr1   126000  126000  2   0.2 14  0.00014 indiv1
>chr2   123000  124000  6   0.6 20  0.00020 indiv1
>chr2   124000  125000  0   0.0 12  0.00012 indiv1
>chr1   123000  124000  2   0.2 26  0.00026 indiv2
>chr1   124000  125000  3   0.3 12  0.00012 indiv2
>chr1   125000  126000  1   0.1 6   0.6 indiv2
>chr1   126000  126000  2   0.2 14  0.00014 indiv2
>chr2   123000  124000  6   0.6 20  0.00020 indiv2
>chr2   124000  125000  0   0.0 12  0.00012 indiv2
>
>My code to read in the data:
>hetshoms <- read.table("fakedata.txt", header=F)
>
>chrom <- hetshoms$V1
>start.pos <- hetshoms$V2
>end.pos <- hetshoms$V3
>hets <- hetshoms$V4
>het_stat <- hetshoms$V5
>homs <- hetshoms$V6
>hom_stat <- hetshoms$V7
>indiv <- hetshoms$V8
>
>HetRatio <- hets/(hets+homs)
>
>When I try to plot the chromosomes separately in qplot, it works fine:
>testplot <- qplot(start.pos, HetRatio, facets = chrom ~ .,
>colour=chrom)
>
>But when I try an analogous thing in ggplot, it does not work.
>The first part works fine:
>testplot <- ggplot(hetshoms, aes(x=start.pos, y=HetRatio)) +
>geom_point(aes(color=chrom, alpha=1/4)) 
>
>but when I try to add the facet_wrap:
>testplot + facet_wrap(~chrom)
>
>This produces the following error (and no plot)
>"Error en layout_base(data, vars, drop = drop) : 
>  At least one layer must contain all variables used for facetting"
>
>I have tried adding an (as.formula(paste)) and directly calling
>hetshoms$V1
>but neither solves the problem.
>
>Can anyone please point out where I have gone wrong and how to fix my
>code?  
>
>Much appreciated,
>Loren
>
>
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/facets-work-in-qplot-but-facet-wrap-produces-an-error-in-ggplot-tp4705058.html
>Sent from the R help mailing list archive at Nabble.com.
>
>__
>R-help@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.

__
R-help@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.


Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
Another thought... if you have a ".RData" file in your working directory, you 
might want to delete or rename it.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On March 24, 2015 7:44:37 PM PDT, Jeff Newmiller  
wrote:
>Because no package loads 1.9GB of data when you load it into memory, so
>this has to be a bug. The first thing to do when the software is acting
>buggy is to update to current.
>
>Having done that, I think it is time to contact the maintainer (see
>?maintainer).
>
>For future reference, your posting is corrupted because you are posting
>using HTML format email rather than plain text as the Posting Guide
>tells you to.
>---
>Jeff NewmillerThe .   .  Go
>Live...
>DCN:Basics: ##.#.   ##.#.  Live
>Go...
> Live:   OO#.. Dead: OO#..  Playing
>Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
>/Software/Embedded Controllers)   .OO#.   .OO#. 
>rocks...1k
>---
>
>Sent from my phone. Please excuse my brevity.
>
>On March 24, 2015 7:18:29 PM PDT, Jam One 
>wrote:
>>> sessionInfo()
>>R version 3.1.3 (2015-03-09)
>>Platform: i386-w64-mingw32/i386 (32-bit)
>>Running under: Windows 7 (build 7601) Service Pack 1
>>
>>locale:
>>[1] LC_COLLATE=English_United States.1252 
>>[2] LC_CTYPE=English_United States.1252   
>>[3] LC_MONETARY=English_United States.1252
>>[4] LC_NUMERIC=C  
>>[5] LC_TIME=English_United States.1252    
>>
>>attached base packages:
>>[1] stats graphics  grDevices utils datasets  methods  
>>base 
>>
>>loaded via a namespace (and not attached):
>>[1] digest_0.6.6 grid_3.1.3   gtable_0.1.2 tools_3.1.3 
>>
>>> library(ggplot2)Error : cannot allocate vector of size 1.9 Gb
>>In addition: Warning messages:
>>1: In get(Info[i, 1], envir = env) :
>>  Reached total allocation of 1535Mb: see help(memory.size)
>>2: In get(Info[i, 1], envir = env) :
>>  Reached total allocation of 1535Mb: see help(memory.size)
>>3: In get(Info[i, 1], envir = env) :
>>  Reached total allocation of 1535Mb: see help(memory.size)
>>4: In get(Info[i, 1], envir = env) :
>>  Reached total allocation of 1535Mb: see help(memory.size)
>>Error: package or namespace load failed for ‘ggplot2’
>>> memory.size(4000)
>>[1] 4000
>>> library(ggplot2)
>>Error : cannot allocate vector of size 1.9 Gb
>>Error: package or namespace load failed for ‘ggplot2’
>>Just curious, why did you think that solution would work?
>>  From: Jeff Newmiller 
>>To: Jam One ; "r-help@R-project.org"
>> 
>> Sent: Wednesday, March 25, 2015 4:44 AM
>> Subject: Re: [R] ggplot2 Error : cannot allocate vector of size 1.9
>Gb
>>   
>>Upgrade your copy of R to the latest.
>>---
>>Jeff Newmiller                        The    .      .  Go
>>Live...
>>DCN:        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.
>>
>>
>>
>>On March 23, 2015 11:36:09 PM PDT, Jam One 
>>wrote:
>>>Dear All,
>>>I have a showstopper here. I cannot run a library(UsingR) because I
>>>cannot load the package 'ggplot2'.
 sessionInfo()
>>>R version 3.1.0 (2014-04-10)
>>>Platform: i386-w64-mingw32/i386 (32-bit)
>>>
>>>locale:
>>>[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>>>States.1252  
>>>[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C             
> 
>>
>>>        
>>>[5] LC_TIME=English_United States.1252    
>>>
>>>attached base packages:
>>>[1] splines  grid      stats    graphics  grDevices utils    
>>>datasets  methods  
>>>[9] base    
>>>
>>>other attached packages:
>>>[1] Formula_1.2-0  survival_2.38-1 lattice_0.20-29 HistData_0.7-5 
>>>MASS_7.3-40    
>>>
>>>loaded via a namespace (and not attached):
>>>[1] digest_0.6.6 gtable_0.1.2 tools_3.1.0 
 install.packages("ggplot2")
>>>Installing package into
>‘C:/Users/xxx/Documents/R/win-library/3.1’
>>>(as ‘lib’ is unspecified)
>>>trying URL
>>>'http://cran.rstudio.com/bin/windows/contrib/3.1

Re: [R] reading in from xlsx files

2015-03-24 Thread Jim Lemon
Hi Bob,
Most likely you didn't save the resulting Excel file before sourcing the R
code. I would close Excel (which given the time elapsed since your message
you probably have done) and open the XSLX file again. If the changes are
there in Excel, they should show up when you run the R code (using the xlsx
package, we assume?)

Although Sarah's answer may be more sensible.

Jim


On Wed, Mar 25, 2015 at 5:00 AM, John McKown 
wrote:

> On Tue, Mar 24, 2015 at 7:40 AM, Robert Lyons  wrote:
> > I'm sorry if this is well below the level of this forum.
> > Using R Console v3.1.3 32-bit
> > Both of our R Programming sources left the company and I'm in need of
> some very basic help.
> > The code is reading in column and row information from two xlsx files.
> > I made what I thought were some basic changes to the contents of those
> files, one was a correction to a typo for a row, the other was flipping two
> columns that were in the wrong order.
> > When I Source the R Code neither change shows up in the output.
>
> Well, first of all, nobody can help you with code unless you actually
> post the code in question. Hard to fix the car while you're driving
> it. [grin]
>
> Second, if you do post some code, you __REALLY__ need to disable
> posting in HTML. HTML messages normally come across on this forum as
> junk and most won't even try to read them.
>
> I may be off base on the following and likely be corrected if I am.
> But, unless the "fix" is simple, which from your post seems likely,
> you might be better off hiring a contractor who is an R programmer.
> Especially, as it appears in the case, that this is a for-profit
> company. TANSTAAFL, although many will help if they are curious and
> have time.
>
> >
> > Thank you for your time.
> >
> > Cordially,
> > Bob Lyons
> >
>
>
>
> --
> If you sent twitter messages while exploring, are you on a textpedition?
>
> He's about as useful as a wax frying pan.
>
> 10 to the 12th power microphones = 1 Megaphone
>
> Maranatha! <><
> John McKown
>
> __
> R-help@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@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.


Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
Because no package loads 1.9GB of data when you load it into memory, so this 
has to be a bug. The first thing to do when the software is acting buggy is to 
update to current.

Having done that, I think it is time to contact the maintainer (see 
?maintainer).

For future reference, your posting is corrupted because you are posting using 
HTML format email rather than plain text as the Posting Guide tells you to.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On March 24, 2015 7:18:29 PM PDT, Jam One  wrote:
>> sessionInfo()
>R version 3.1.3 (2015-03-09)
>Platform: i386-w64-mingw32/i386 (32-bit)
>Running under: Windows 7 (build 7601) Service Pack 1
>
>locale:
>[1] LC_COLLATE=English_United States.1252 
>[2] LC_CTYPE=English_United States.1252   
>[3] LC_MONETARY=English_United States.1252
>[4] LC_NUMERIC=C  
>[5] LC_TIME=English_United States.1252    
>
>attached base packages:
>[1] stats graphics  grDevices utils datasets  methods  
>base 
>
>loaded via a namespace (and not attached):
>[1] digest_0.6.6 grid_3.1.3   gtable_0.1.2 tools_3.1.3 
>
>> library(ggplot2)Error : cannot allocate vector of size 1.9 Gb
>In addition: Warning messages:
>1: In get(Info[i, 1], envir = env) :
>  Reached total allocation of 1535Mb: see help(memory.size)
>2: In get(Info[i, 1], envir = env) :
>  Reached total allocation of 1535Mb: see help(memory.size)
>3: In get(Info[i, 1], envir = env) :
>  Reached total allocation of 1535Mb: see help(memory.size)
>4: In get(Info[i, 1], envir = env) :
>  Reached total allocation of 1535Mb: see help(memory.size)
>Error: package or namespace load failed for ‘ggplot2’
>> memory.size(4000)
>[1] 4000
>> library(ggplot2)
>Error : cannot allocate vector of size 1.9 Gb
>Error: package or namespace load failed for ‘ggplot2’
>Just curious, why did you think that solution would work?
>  From: Jeff Newmiller 
>To: Jam One ; "r-help@R-project.org"
> 
> Sent: Wednesday, March 25, 2015 4:44 AM
> Subject: Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb
>   
>Upgrade your copy of R to the latest.
>---
>Jeff Newmiller                        The    .      .  Go
>Live...
>DCN:        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.
>
>
>
>On March 23, 2015 11:36:09 PM PDT, Jam One 
>wrote:
>>Dear All,
>>I have a showstopper here. I cannot run a library(UsingR) because I
>>cannot load the package 'ggplot2'.
>>> sessionInfo()
>>R version 3.1.0 (2014-04-10)
>>Platform: i386-w64-mingw32/i386 (32-bit)
>>
>>locale:
>>[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>>States.1252  
>>[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C               
>
>>        
>>[5] LC_TIME=English_United States.1252    
>>
>>attached base packages:
>>[1] splines  grid      stats    graphics  grDevices utils    
>>datasets  methods  
>>[9] base    
>>
>>other attached packages:
>>[1] Formula_1.2-0  survival_2.38-1 lattice_0.20-29 HistData_0.7-5 
>>MASS_7.3-40    
>>
>>loaded via a namespace (and not attached):
>>[1] digest_0.6.6 gtable_0.1.2 tools_3.1.0 
>>> install.packages("ggplot2")
>>Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.1’
>>(as ‘lib’ is unspecified)
>>trying URL
>>'http://cran.rstudio.com/bin/windows/contrib/3.1/ggplot2_1.0.1.zip'
>>Content type 'application/zip' length 2675835 bytes (2.6 Mb)
>>opened URL
>>downloaded 2.6 Mb
>>
>>package ‘ggplot2’ successfully unpacked and MD5 sums checked
>>
>>The downloaded binary packages are in
>>   
>C:\Users\xxx\AppData\Local\Temp\RtmpSA08kR\downloaded_packages>
>>memory.limit(4000)
>>[1] 4000
>>> library(UsingR)
>>Loading required package: Hmisc
>>Loading required package: ggplot2
>>Error : cannot allocate vector of size 1.9 Gb
>>In addition: Warning messages:
>>1: package ‘UsingR’ was built under R version 3.1.3 
>>2: package ‘Hmisc’ was built under R version 3.1.3 
>>3: package ‘ggplot2’ was built under R version 3.1.3 
>>Error: package ‘ggplot2’ could not be loaded
>>
>>Can anyone suggest a solution to this problem, and NO switching to a
>>64-bit machine is not an option?
>>
>>Tha

Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jam One
> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C  
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 

loaded via a namespace (and not attached):
[1] digest_0.6.6 grid_3.1.3   gtable_0.1.2 tools_3.1.3 

> library(ggplot2)Error : cannot allocate vector of size 1.9 Gb
In addition: Warning messages:
1: In get(Info[i, 1], envir = env) :
  Reached total allocation of 1535Mb: see help(memory.size)
2: In get(Info[i, 1], envir = env) :
  Reached total allocation of 1535Mb: see help(memory.size)
3: In get(Info[i, 1], envir = env) :
  Reached total allocation of 1535Mb: see help(memory.size)
4: In get(Info[i, 1], envir = env) :
  Reached total allocation of 1535Mb: see help(memory.size)
Error: package or namespace load failed for ‘ggplot2’
> memory.size(4000)
[1] 4000
> library(ggplot2)
Error : cannot allocate vector of size 1.9 Gb
Error: package or namespace load failed for ‘ggplot2’
Just curious, why did you think that solution would work?
  From: Jeff Newmiller 
 To: Jam One ; "r-help@R-project.org" 
 
 Sent: Wednesday, March 25, 2015 4:44 AM
 Subject: Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb
   
Upgrade your copy of R to the latest.
---
Jeff Newmiller                        The    .      .  Go Live...
DCN:        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.




>Dear All,
>I have a showstopper here. I cannot run a library(UsingR) because I
>cannot load the package 'ggplot2'.
>> sessionInfo()
>R version 3.1.0 (2014-04-10)
>Platform: i386-w64-mingw32/i386 (32-bit)
>
>locale:
>[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>States.1252  
>[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                
>        
>[5] LC_TIME=English_United States.1252    
>
>attached base packages:
>[1] splines  grid      stats    graphics  grDevices utils    
>datasets  methods  
>[9] base    
>
>other attached packages:
>[1] Formula_1.2-0  survival_2.38-1 lattice_0.20-29 HistData_0.7-5 
>MASS_7.3-40    
>
>loaded via a namespace (and not attached):
>[1] digest_0.6.6 gtable_0.1.2 tools_3.1.0 
>> install.packages("ggplot2")
>Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.1’
>(as ‘lib’ is unspecified)
>trying URL
>'http://cran.rstudio.com/bin/windows/contrib/3.1/ggplot2_1.0.1.zip'
>Content type 'application/zip' length 2675835 bytes (2.6 Mb)
>opened URL
>downloaded 2.6 Mb
>
>package ‘ggplot2’ successfully unpacked and MD5 sums checked
>
>The downloaded binary packages are in
>    C:\Users\xxx\AppData\Local\Temp\RtmpSA08kR\downloaded_packages>
>memory.limit(4000)
>[1] 4000
>> library(UsingR)
>Loading required package: Hmisc
>Loading required package: ggplot2
>Error : cannot allocate vector of size 1.9 Gb
>In addition: Warning messages:
>1: package ‘UsingR’ was built under R version 3.1.3 
>2: package ‘Hmisc’ was built under R version 3.1.3 
>3: package ‘ggplot2’ was built under R version 3.1.3 
>Error: package ‘ggplot2’ could not be loaded
>
>Can anyone suggest a solution to this problem, and NO switching to a
>64-bit machine is not an option?
>
>Thanks in advance.
>
>    [[alternative HTML version deleted]]
>
>__
>R-help@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@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.

[R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-24 Thread Loren
Hello all,

I am having a perplexing problem trying to use facet_wrap in ggplot, with
both my real dataset and a simplified dummy dataset.  I am trying to plot
heterozygosity across the genome for multiple individuals, with each
chromosome shown separately.

My dummy data:
chr1123000  124000  2   0.2 26  0.00026 indiv1
chr1124000  125000  3   0.3 12  0.00012 indiv1
chr1125000  126000  1   0.1 6   0.6 indiv1
chr1126000  126000  2   0.2 14  0.00014 indiv1
chr2123000  124000  6   0.6 20  0.00020 indiv1
chr2124000  125000  0   0.0 12  0.00012 indiv1
chr1123000  124000  2   0.2 26  0.00026 indiv2
chr1124000  125000  3   0.3 12  0.00012 indiv2
chr1125000  126000  1   0.1 6   0.6 indiv2
chr1126000  126000  2   0.2 14  0.00014 indiv2
chr2123000  124000  6   0.6 20  0.00020 indiv2
chr2124000  125000  0   0.0 12  0.00012 indiv2

My code to read in the data:
hetshoms <- read.table("fakedata.txt", header=F)

chrom <- hetshoms$V1
start.pos <- hetshoms$V2
end.pos <- hetshoms$V3
hets <- hetshoms$V4
het_stat <- hetshoms$V5
homs <- hetshoms$V6
hom_stat <- hetshoms$V7
indiv <- hetshoms$V8

HetRatio <- hets/(hets+homs)

When I try to plot the chromosomes separately in qplot, it works fine:
testplot <- qplot(start.pos, HetRatio, facets = chrom ~ ., colour=chrom)

But when I try an analogous thing in ggplot, it does not work.
The first part works fine:
testplot <- ggplot(hetshoms, aes(x=start.pos, y=HetRatio)) +
geom_point(aes(color=chrom, alpha=1/4)) 

but when I try to add the facet_wrap:
testplot + facet_wrap(~chrom)

This produces the following error (and no plot)
"Error en layout_base(data, vars, drop = drop) : 
  At least one layer must contain all variables used for facetting"

I have tried adding an (as.formula(paste)) and directly calling hetshoms$V1
but neither solves the problem.

Can anyone please point out where I have gone wrong and how to fix my code?  

Much appreciated,
Loren






--
View this message in context: 
http://r.789695.n4.nabble.com/facets-work-in-qplot-but-facet-wrap-produces-an-error-in-ggplot-tp4705058.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] make elements of a list into functions

2015-03-24 Thread Uwe Ligges



On 25.03.2015 00:38, Kruti Pandya wrote:

Hi I have a list called g as follows and I want to  make elements of g into
functions so that I can evaluate them at randomly generated data point say
c(0,0,0). For example,

change  g[[1]]  (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3]) to
function(x) (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])

change g[[2]]  (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1]) to
function(x) (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])

and so on..

So that I  can evaluate g[[1]] as follows g1<-function(x) (!x[2] & !x[3]) |
(!x[2] & x[3]) | (x[2] & x[3])


One way:

f <- function(x) x
gfunc <- lapply(g, function(i) {body(f) <- parse(text=i); f})

So now you have functions in your list gfunc and can call them via

gfunc[[1]](c(0,0,0))


Best,
Uwe Ligges







g1(c(0,0,0))

[1] TRUE

g<-list(structure("(!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])", class
= "noquote"),
 structure("(!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])",
class = "noquote"),
 structure("(!x[2] & x[3]) | (x[2] & !x[3])", class = "noquote"))

g
[[1]]
[1] (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])

[[2]]
[1] (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])

[[3]]
[1] (!x[2] & x[3]) | (x[2] & !x[3])

Do not know how proceed. Any help is appreciated. I have created a small
example for demo. My actual list g has 50 elements so need a function which
can pick each element of g and convert it into function (x)..

[[alternative HTML version deleted]]

__
R-help@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.



__
R-help@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.


[R] make elements of a list into functions

2015-03-24 Thread Kruti Pandya
Hi I have a list called g as follows and I want to  make elements of g into
functions so that I can evaluate them at randomly generated data point say
c(0,0,0). For example,

change  g[[1]]  (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3]) to
function(x) (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])

change g[[2]]  (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1]) to
function(x) (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])

and so on..

So that I  can evaluate g[[1]] as follows g1<-function(x) (!x[2] & !x[3]) |
(!x[2] & x[3]) | (x[2] & x[3])

> g1(c(0,0,0))
[1] TRUE

g<-list(structure("(!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])", class
= "noquote"),
structure("(!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])",
class = "noquote"),
structure("(!x[2] & x[3]) | (x[2] & !x[3])", class = "noquote"))

g
[[1]]
[1] (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3])

[[2]]
[1] (!x[2] & !x[1]) | (!x[2] & x[1]) | (x[2] & !x[1])

[[3]]
[1] (!x[2] & x[3]) | (x[2] & !x[3])

Do not know how proceed. Any help is appreciated. I have created a small
example for demo. My actual list g has 50 elements so need a function which
can pick each element of g and convert it into function (x)..

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
Upgrade your copy of R to the latest.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On March 23, 2015 11:36:09 PM PDT, Jam One  wrote:
>Dear All,
>I have a showstopper here. I cannot run a library(UsingR) because I
>cannot load the package 'ggplot2'.
>> sessionInfo()
>R version 3.1.0 (2014-04-10)
>Platform: i386-w64-mingw32/i386 (32-bit)
>
>locale:
>[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>States.1252   
>[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> 
>[5] LC_TIME=English_United States.1252
>
>attached base packages:
>[1] splines   grid  stats graphics  grDevices utils
>datasets  methods  
>[9] base 
>
>other attached packages:
>[1] Formula_1.2-0   survival_2.38-1 lattice_0.20-29 HistData_0.7-5 
>MASS_7.3-40
>
>loaded via a namespace (and not attached):
>[1] digest_0.6.6 gtable_0.1.2 tools_3.1.0 
>> install.packages("ggplot2")
>Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.1’
>(as ‘lib’ is unspecified)
>trying URL
>'http://cran.rstudio.com/bin/windows/contrib/3.1/ggplot2_1.0.1.zip'
>Content type 'application/zip' length 2675835 bytes (2.6 Mb)
>opened URL
>downloaded 2.6 Mb
>
>package ‘ggplot2’ successfully unpacked and MD5 sums checked
>
>The downloaded binary packages are in
>   C:\Users\xxx\AppData\Local\Temp\RtmpSA08kR\downloaded_packages>
>memory.limit(4000)
>[1] 4000
>> library(UsingR)
>Loading required package: Hmisc
>Loading required package: ggplot2
>Error : cannot allocate vector of size 1.9 Gb
>In addition: Warning messages:
>1: package ‘UsingR’ was built under R version 3.1.3 
>2: package ‘Hmisc’ was built under R version 3.1.3 
>3: package ‘ggplot2’ was built under R version 3.1.3 
>Error: package ‘ggplot2’ could not be loaded
>
>Can anyone suggest a solution to this problem, and NO switching to a
>64-bit machine is not an option?
>
>Thanks in advance.
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@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.

__
R-help@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.

Re: [R] the making of _R_ eBooks

2015-03-24 Thread John Maindonald
Thanks for that.  Useful to have that question asked and to get that
information.


John Maindonald email: 
john.maindon...@anu.edu.au


On 25/03/2015, at 0:00, 
r-help-requ...@r-project.org wrote:

From: John McKown 
mailto:john.archie.mck...@gmail.com>>
Subject: Re: [R] the making of _R_ eBooks
Date: 24 March 2015 1:36:38 NZDT
To: "Dr. Wolfgang Lindner" mailto:lindn...@t-online.de>>
Cc: Help R mailto:r-help@r-project.org>>


On Mon, Mar 23, 2015 at 3:50 AM, Dr. Wolfgang Lindner
mailto:lindn...@t-online.de>> wrote:
Dear list members,

I like the look and feel of the eBook versions of the R manuals very much.
So I would like to generate eBooks (teaching material etc) in that look.

I am not an expert. But I have looked at the source, so I can give you
some information.


Q1: is there a description how the _R_ ebooks have been produced?

Looking at the source, it appears that the source manuals are in a
document markup language called "GNU Texinfo".
https://www.gnu.org/software/texinfo/
You can think of this as something akin to, but different from, HTML
or "markdown" encoding. Texinfo is an evolution by the system first
designed by Richard Stallman of MIT. He is the driving force behind
the GPL and most of the GNU software which forms the basis of the user
space commands for Linux and the *BSD operating systems. Texinfo is
then converted to TeX. TeX is the typesetting language designed by Dr.
Donald Knuth. TeX, nominally, is converted into a DVI printer control
language (DeVice Independent). But in the case of creating a PDF file,
there is a processor called "pdftex",
http://en.wikipedia.org/wiki/PdfTeX, which produces a PDF file as
output . A good site for TeX is https://tug.org/

Texinfo has the plus of also having processor which will convert it to
UNIX "man" (manual) pages and HTML web pages. So one "source" document
can generate three different types of output document file types.

Most people use a enhanced TeX called LaTeX instead of "plain TeX"
when using TeX. LaTeX can be read up on here:
http://www.latex-project.org/ A good TeX document processor is
TeXstudio at http://texstudio.sourceforge.net/ . I use this one myself
(which is not necessary a strong endorsement because I'm nobody
special).

I feel the need to warn you that TeX is very powerful and, at least to
me, quite difficult, with a fairly step learning curve. Which may be
why the R project uses Texinfo because it is quite a bit easier to
learn.


Q2: which (free) software was used for them?

See the links above. On Fedora Linux, I get the TeX oriented software
from a bunch of packages which start with "texlive". More information,
including the processors for Linux, Windows, and Mac are at
https://www.tug.org/texlive/

Q3: any other recommendations?

You might consider LyX.
http://www.lyx.org/
LyX is a document processor. It would likely be easier to use than the
above if you are used to MS Word or other word processing system. It
is cross platform: Linux, Windows, and Mac. It stores files in its own
textual format, which is somewhat human readable. LyX, like Texinfo,
translates its format into TeX as an intermediate on its way to its
ultimate destination. I am still learning LyX, but I personally like
it.

Your mention of LibreOffice is also a fairly good one. I, personally,
use LibreOffice. But I don't use it for big documents. I have a
learned aversion for word processors because it is so easy for them to
be misused. In my opinion, a good document needs good metadata in it
as well as just "looking pretty". Word processor users tend to focus
on the format and not the content. That's just my opinion, based on
what I've seen where I work.


Seaching the internet gives me e.g.
[1]
https://sites.google.com/site/richardbyrnepdsite/ebooks-and-audiobooks/create-your-own-ebooks
[2]  
opensource.com/life/13/8/how-create-ebook-open-source-way
[3] http://scottnesbitt.net/ubuntublog/creating-a-ebook-with-libreoffice-writer/

but I m not sure, if there are better possibilities..

Thanks for any hint or link by expert R users.

Oh, well, that excludes me. I'm not an expert. But maybe it was helpful anyway.


Wolfgang Lindner
Leichlingen, Germany

--
If you sent twitter messages while exploring, are you on a textpedition?

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown



[[alternative HTML version deleted]]

__
R-help@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.


[R] RSperl Problem

2015-03-24 Thread Panayiotis Georgiades
Hi there, I have Perl version 5.14.2 and R installed on Ubuntu 12.04 and had a 
problem while trying to install RSPerl. I followed the instructions on the 
guide in omegahat.org, and ran the commandR CMD INSTALL  
--configure-args='--with-in-perl' RSPerl
and the following error occured:* installing to library 
�/usr/local/lib/R/site-library�
* installing *source* package �RSPerl� ...
checking for perl... /usr/bin/perl
No support for any of the Perl modules from calling Perl from R.
*

   Set PERL5LIB to /usr/local/lib/R/site-library/RSPerl/perl

*
Testing: -L/usr/lib/R/lib -lR
Using '/usr/bin/perl' as the perl executable
Perl modules (no): 
Adding R package to list of Perl modules to enable callbacks to R from Perl
Creating the C code for dynamically loading modules with native code for Perl:  
R
modules:   R; linking: 
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Support R in Perl: yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating inst/scripts/RSPerl.csh
config.status: creating inst/scripts/RSPerl.bsh
config.status: creating src/RinPerlMakefile
config.status: creating src/Makefile.PL
config.status: creating cleanup
config.status: creating src/R.pm
config.status: creating R/perl5lib.R
making target all in RinPerlMakefile
gcc -std=gnu99 -I/usr/share/R/include -I.  -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.14/CORE  
-DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 
-fpic  -O3 -pipe  -g -c Converters.c -o Converters.o
Converters.c: In function 'fromPerl':
Converters.c:323:28: error: 'sv_undef' undeclared (first use in this function)
Converters.c:323:28: note: each undeclared identifier is reported only once for 
each function it appears in
Converters.c: In function 'toPerl':
Converters.c:483:12: error: 'sv_undef' undeclared (first use in this function)
Converters.c: In function 'PerlAddHomogeneousElement':
Converters.c:1056:7: error: duplicate case value
Converters.c:1041:7: error: previously used here
make: *** [Converters.o] Error 1
calling make -f Makefile.perl install
Makefile out-of-date with respect to Makefile.PL
Cleaning current config before rebuilding Makefile...
make -f Makefile.perl.old clean > /dev/null 2>&1
/usr/bin/perl Makefile.PL 
Warning: -L. changed to -L/home/panayiotis/Desktop/RSPerl/src/.
Note (probably harmless): No library found for -lPerlConverter
Writing Makefile.perl for R
Writing MYMETA.yml
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command.  <==
false
make: *** [Makefile.perl] Error 1
chmod: changing permissions of `blib/lib/R.pm': Operation not permitted
Finished configuration
** libs
gcc -std=gnu99 -I/usr/share/R/include -I.  -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.14/CORE  
-DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 
-fpic  -O3 -pipe  -g -c Converters.c -o Converters.o
Converters.c: In function �fromPerl�:
Converters.c:323:28: error: �sv_undef� undeclared (first use in this function)
Converters.c:323:28: note: each undeclared identifier is reported only once for 
each function it appears in
Converters.c: In function �toPerl�:
Converters.c:483:12: error: �sv_undef� undeclared (first use in this function)
Converters.c: In function �PerlAddHomogeneousElement�:
Converters.c:1056:7: error: duplicate case value
Converters.c:1041:7: error: previously used here
make: *** [Converters.o] Error 1
ERROR: compilation failed for package �RSPerl�
* removing �/usr/local/lib/R/site-library/RSPerl�
Do anyone knows how can I resolve this issue?   
  
[[alternative HTML version deleted]]

__
R-help@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.

Re: [R] Ayuda con un árbol de regresión

2015-03-24 Thread Michael Dewey

Miguel, si prefieres escribir en espanol

https://stat.ethz.ch/mailman/listinfo/r-help-es

(This is the address of the Spanish language mailing list)

On 23/03/2015 20:13, Miguel angel Lopez Martinez wrote:

ARBOL<-tree(PRECIO~CILINDRAJE_DEL_MOTOR+MODELO,data=CARROST)
ARBOL
plot(ARBOL)
text(ARBOL,cex=0.9)

  este es el código que utilizamos las variables cilindraje y modelo son
categóricas transformadas por que si utilizamos las varibales como factor
no las reconoce

[[alternative HTML version deleted]]

__
R-help@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.

-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5751 / Virus Database: 4315/9373 - Release Date: 03/24/15



--
Michael
http://www.dewey.myzen.co.uk

__
R-help@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.

Re: [R] reading in from xlsx files

2015-03-24 Thread John McKown
On Tue, Mar 24, 2015 at 7:40 AM, Robert Lyons  wrote:
> I'm sorry if this is well below the level of this forum.
> Using R Console v3.1.3 32-bit
> Both of our R Programming sources left the company and I'm in need of some 
> very basic help.
> The code is reading in column and row information from two xlsx files.
> I made what I thought were some basic changes to the contents of those files, 
> one was a correction to a typo for a row, the other was flipping two columns 
> that were in the wrong order.
> When I Source the R Code neither change shows up in the output.

Well, first of all, nobody can help you with code unless you actually
post the code in question. Hard to fix the car while you're driving
it. [grin]

Second, if you do post some code, you __REALLY__ need to disable
posting in HTML. HTML messages normally come across on this forum as
junk and most won't even try to read them.

I may be off base on the following and likely be corrected if I am.
But, unless the "fix" is simple, which from your post seems likely,
you might be better off hiring a contractor who is an R programmer.
Especially, as it appears in the case, that this is a for-profit
company. TANSTAAFL, although many will help if they are curious and
have time.

>
> Thank you for your time.
>
> Cordially,
> Bob Lyons
>



-- 
If you sent twitter messages while exploring, are you on a textpedition?

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

__
R-help@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.


Re: [R] Light response curve using non rectangular hypebola

2015-03-24 Thread Sarah Goslee
Hi,

Is this homework?

What have you tried? What worked, and what didn't?

What do your data look like?

You'll get much more help on this list if you read the posting guide
and provide reproducible examples, plus some evidence that you've
worked on the problem yourself.

Without a reproducible example that includes some sample data (fake is
fine), the code you used, and some clear idea of what output you
expect, it's impossible to figure out how to help you. Here are some
suggestions for creating a good reproducible example:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

The R-help posting guide may also be useful:
http://www.r-project.org/posting-guide.html

Sarah

On Tue, Mar 24, 2015 at 1:43 AM, Sayedur Rahman  wrote:
> Hi
> I am a student trying to get Amax, thea,phi, and Rd from my light response
> data.
>
> I have 3 genotypes with 4 reps under 2 CO2 level. How do I solve the
> equation using R. Any one can help me with writing script and solve thE
> equation for non rectangular hyperbola
>
> Thank you
> Sayedur
>
> [[alternative HTML version deleted]]

Please post in plain text.

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@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.


Re: [R] reading in from xlsx files

2015-03-24 Thread Sarah Goslee
Did you start in a clean R session?

What is your code? We can't telepathically diagnose code that's not
sent to the list.

Why not just change the data frames in R?

Please read the posting guide linked at the bottom of this message,
and provide enough information that we can reasonably help you. Basic
questions are fine, but we expect the querent to have done a bit of
work on their own, and to provide complete explanations.

Sarah

On Tue, Mar 24, 2015 at 8:40 AM, Robert Lyons  wrote:
> I'm sorry if this is well below the level of this forum.
> Using R Console v3.1.3 32-bit
> Both of our R Programming sources left the company and I'm in need of some 
> very basic help.
> The code is reading in column and row information from two xlsx files.
> I made what I thought were some basic changes to the contents of those files, 
> one was a correction to a typo for a row, the other was flipping two columns 
> that were in the wrong order.
> When I Source the R Code neither change shows up in the output.
>
> Thank you for your time.
>
> Cordially,
> Bob Lyons
>
>
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 
Sarah Goslee\
http://www.functionaldiversity.org

__
R-help@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.


[R] reading in from xlsx files

2015-03-24 Thread Robert Lyons
I'm sorry if this is well below the level of this forum.
Using R Console v3.1.3 32-bit
Both of our R Programming sources left the company and I'm in need of some very 
basic help.
The code is reading in column and row information from two xlsx files.
I made what I thought were some basic changes to the contents of those files, 
one was a correction to a typo for a row, the other was flipping two columns 
that were in the wrong order.
When I Source the R Code neither change shows up in the output.

Thank you for your time.

Cordially,
Bob Lyons



IMPORTANT NOTICE REGARDING THIS MESSAGE:
This message is intended for the use of the person(s) and/or entity(s) to whom 
it is addressed and may contain information that is privileged, confidential, 
and protected from disclosure under applicable law. If you are not the intended 
recipient, your use of this message for any purpose is strictly prohibited. If 
you have received this communication in error, please delete the message and 
notify the sender immediately.

[[alternative HTML version deleted]]

__
R-help@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.


[R] Light response curve using non rectangular hypebola

2015-03-24 Thread Sayedur Rahman
Hi
I am a student trying to get Amax, thea,phi, and Rd from my light response
data.

I have 3 genotypes with 4 reps under 2 CO2 level. How do I solve the
equation using R. Any one can help me with writing script and solve thE
equation for non rectangular hyperbola

Thank you
Sayedur

[[alternative HTML version deleted]]

__
R-help@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.


[R] Ayuda con un árbol de regresión

2015-03-24 Thread Miguel angel Lopez Martinez
ARBOL<-tree(PRECIO~CILINDRAJE_DEL_MOTOR+MODELO,data=CARROST)
ARBOL
plot(ARBOL)
text(ARBOL,cex=0.9)

 este es el código que utilizamos las variables cilindraje y modelo son
categóricas transformadas por que si utilizamos las varibales como factor
no las reconoce

[[alternative HTML version deleted]]

__
R-help@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.

[R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jam One
Dear All,
I have a showstopper here. I cannot run a library(UsingR) because I cannot load 
the package 'ggplot2'.
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252  
 
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C 
 
[5] LC_TIME=English_United States.1252

attached base packages:
[1] splines   grid  stats graphics  grDevices utils datasets  
methods  
[9] base 

other attached packages:
[1] Formula_1.2-0   survival_2.38-1 lattice_0.20-29 HistData_0.7-5  MASS_7.3-40 
   

loaded via a namespace (and not attached):
[1] digest_0.6.6 gtable_0.1.2 tools_3.1.0 
> install.packages("ggplot2")
Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/ggplot2_1.0.1.zip'
Content type 'application/zip' length 2675835 bytes (2.6 Mb)
opened URL
downloaded 2.6 Mb

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\xxx\AppData\Local\Temp\RtmpSA08kR\downloaded_packages> 
memory.limit(4000)
[1] 4000
> library(UsingR)
Loading required package: Hmisc
Loading required package: ggplot2
Error : cannot allocate vector of size 1.9 Gb
In addition: Warning messages:
1: package ‘UsingR’ was built under R version 3.1.3 
2: package ‘Hmisc’ was built under R version 3.1.3 
3: package ‘ggplot2’ was built under R version 3.1.3 
Error: package ‘ggplot2’ could not be loaded

Can anyone suggest a solution to this problem, and NO switching to a 64-bit 
machine is not an option?

Thanks in advance.

[[alternative HTML version deleted]]

__
R-help@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.

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-24 Thread Clint Bowman
Because the range is so different between the two series, I'd suggest 
using log="y", ylim=c(500,2)



Clint BowmanINTERNET:   cl...@ecy.wa.gov
Air Quality Modeler INTERNET:   cl...@math.utah.edu
Department of Ecology   VOICE:  (360) 407-6815
PO Box 47600FAX:(360) 407-7534
Olympia, WA 98504-7600

USPS:   PO Box 47600, Olympia, WA 98504-7600
Parcels:300 Desmond Drive, Lacey, WA 98503-1274

On Mon, 23 Mar 2015, Boris Steipe wrote:


... and that gives you a "double ordinate plot", a staple of misleading 
statistics.

Let me give you an analogy:

Imagine you are on a chemistry mailing list and someone asks about the proper way to mix 
aluminum powder with fertilizer. Of course, as a chemist you know how. But still - and 
the same holds for the "double ordinate plot" - just say no.


:-)


For reference (taken from a post on SO):
Junk charts:
 http://junkcharts.typepad.com/junk_charts/2006/06/illusion_of_suc.html
 http://junkcharts.typepad.com/junk_charts/2006/05/the_crossover_l.html
Perecptual Edge ( a more detailed analysis)
 
http://www.perceptualedge.com/articles/visual_business_intelligence/dual-scaled_axes.pdf
SMBC's tutorial on infographics (point 4).
 http://www.smbc-comics.com/?id=3167



On Mar 23, 2015, at 2:14 PM, Clint Bowman  wrote:


Agreed--I neglected to add the secondary y-axis (shouldn't hit send so fast.)

Clint BowmanINTERNET:   cl...@ecy.wa.gov
Air Quality Modeler INTERNET:   cl...@math.utah.edu
Department of Ecology   VOICE:  (360) 407-6815
PO Box 47600FAX:(360) 407-7534
Olympia, WA 98504-7600

   USPS:   PO Box 47600, Olympia, WA 98504-7600
   Parcels:300 Desmond Drive, Lacey, WA 98503-1274

On Mon, 23 Mar 2015, Boris Steipe wrote:


... which is exactly what he shouldn't do because now it the plot falsely 
asserts that both curves are plotted to the same scale.


B.



On Mar 23, 2015, at 12:34 PM, Clint Bowman  wrote:


Try:
plot(Date,MORTSBu,lwd=2,lty="dashed",axes=F,xlab="",ylab="")



Clint BowmanINTERNET:   cl...@ecy.wa.gov
Air Quality Modeler INTERNET:   cl...@math.utah.edu
Department of Ecology   VOICE:  (360) 407-6815
PO Box 47600FAX:(360) 407-7534
Olympia, WA 98504-7600

  USPS:   PO Box 47600, Olympia, WA 98504-7600
  Parcels:300 Desmond Drive, Lacey, WA 98503-1274

On Mon, 23 Mar 2015, varin sacha wrote:


Dear R-Experts,

I try to superimpose/present 2 curves/plots on the same graph. I would like the 
result/graph to be readable.
For that, I use the par(new=TRUE) argument but on the Y-axis there is a 
superposition of writings and the Y-axis becomes unreadable.
How can I solve this problem ?

Here is a reproducible example :
Date<-c(1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010)

MORTSFr<-c(16445,17671,18113,17043,14738,14355,15028,14283,13229,13603,13672,13547,13527,13021,12737,11388,11947,10742,11497,11476,11215,10483,9900,9568,9019,8891,8541,8444,8918,8487,8079,8160,7655,6058,5593,5318,4709,4620,4275,4273,3992)

MORTSBu<-c(838,889,934,946,960,1030,1021,1040,1153,1149,1199,1219,1229,1123,1119,1113,1070,1153,1153,1280,1567,1114,1299,1307,1390,1264,1014,915,1003,1047,1012,1011,959,960,943,957,1043,1006,1061,901,776)

plot(Date,MORTSFr,type="l")
par(new=TRUE)

plot(Date,MORTSBu,lwd=2,lty="dashed")

Thanks for your time.
Best,
S

__
R-help@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.



__
R-help@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.








__
R-help@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.


Re: [R] missing in neural network

2015-03-24 Thread Charles Determan Jr
I should have actually created some test code for you.  Here is an example:

library(neuralnet)
data(infert)

# create your formula
fm <- as.formula(paste("case ~ ", paste(colnames(infert)[c(3,4,6)],
collapse="+")))

# call neuralnet
net.infert <- neuralnet(fm, infert,
err.fct="ce", linear.output=FALSE, likelihood=TRUE)

You don't want to index your dataset like that, you should utilize the
formula interface.  Interestingly, the '.' notation doesn't seem to work
here.  Your formula call probably will look like this:

fm <- as.formula(paste("resp ~ ", paste(colnames(data), collapse="+")))

And you call would be

out1 <- neuralnet(fm,data=mydata, hidden = 4, lifesign = "minimal",
linear.output = FALSE, threshold = 0.1)

Regards,

Charles

On Tue, Mar 24, 2015 at 9:56 AM, Soheila Khodakarim 
wrote:

> Dear Charles,
>
> Thanks for your guide.
> I run this code:
>
> library("neuralnet")
> resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
> mydata <- cbind(data, resp)
> out1 <- neuralnet(resp~mydata[,1:3110],data=mydata, hidden = 4, lifesign =
> "minimal", linear.output = FALSE, threshold = 0.1)
>
> I saw this error
>
> Error in neurons[[i]] %*% weights[[i]] : non-conformable arguments
>
> :(:(:(
>
> What should I do now??
>
> Regards,
> Soheila
>
>
> On Tue, Mar 24, 2015 at 3:48 PM, Charles Determan Jr 
> wrote:
>
>> Hi Soheila,
>>
>> You are using the formula argument incorrectly.  The neuralnet function
>> has a separate argument for data aptly names 'data'.  You can review the
>> arguments by looking at the documentation  with ?neuralnet.
>>
>> As I cannot reproduce your data the following is not tested but I think
>> should work for you.
>>
>> # Join your response variable to your data set.
>> mydata <- cbind(data, resp)
>>
>> # Run neuralnet
>> out <- neuralnet(resp ~ ., data=mydata, hidden = 4, lifesign = "minimal",
>>linear.output = FALSE, threshold = 0.1,na.rm =
>> TRUE)
>>
>>
>> Best,
>> Charles
>>
>> On Tue, Mar 24, 2015 at 4:47 AM, Soheila Khodakarim <
>> lkhodaka...@gmail.com> wrote:
>>
>>> Dear All,
>>>
>>> I want to run "neural network" on my dataset.
>>> ##
>>> resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
>>> dim(data)
>>> #20*3110
>>>
>>> out <- neuralnet(y ~ data, hidden = 4, lifesign = "minimal",
>>> linear.output
>>> = FALSE, threshold = 0.1,na.rm = TRUE)
>>> 
>>> but I see this Error
>>> Error in varify.variables(data, formula, startweights,
>>> learningrate.limit,
>>>  :
>>>   argument "data" is missing, with no default
>>>
>>> What should I do now??
>>>
>>> Best Regards,
>>> Soheila
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> __
>>> R-help@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.
>>>
>>
>>
>>
>>
>>
>


-- 
Dr. Charles Determan, PhD
Integrated Biosciences

[[alternative HTML version deleted]]

__
R-help@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.


[R] Fwd: missing in neural network

2015-03-24 Thread Soheila Khodakarim
Dear Charles,

Thanks for your guide.
I run this code:

library("neuralnet")
resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
mydata <- cbind(data, resp)
out1 <- neuralnet(resp~mydata[,1:3110],data=mydata, hidden = 4, lifesign =
"minimal", linear.output = FALSE, threshold = 0.1)

I saw this error

Error in neurons[[i]] %*% weights[[i]] : non-conformable arguments

:(:(:(

What should I do now??

Regards,
Soheila


On Tue, Mar 24, 2015 at 3:48 PM, Charles Determan Jr 
wrote:

> Hi Soheila,
>
> You are using the formula argument incorrectly.  The neuralnet function
> has a separate argument for data aptly names 'data'.  You can review the
> arguments by looking at the documentation  with ?neuralnet.
>
> As I cannot reproduce your data the following is not tested but I think
> should work for you.
>
> # Join your response variable to your data set.
> mydata <- cbind(data, resp)
>
> # Run neuralnet
> out <- neuralnet(resp ~ ., data=mydata, hidden = 4, lifesign = "minimal",
>linear.output = FALSE, threshold = 0.1,na.rm =
> TRUE)
>
>
> Best,
> Charles
>
> On Tue, Mar 24, 2015 at 4:47 AM, Soheila Khodakarim  > wrote:
>
>> Dear All,
>>
>> I want to run "neural network" on my dataset.
>> ##
>> resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
>> dim(data)
>> #20*3110
>>
>> out <- neuralnet(y ~ data, hidden = 4, lifesign = "minimal", linear.output
>> = FALSE, threshold = 0.1,na.rm = TRUE)
>> 
>> but I see this Error
>> Error in varify.variables(data, formula, startweights, learningrate.limit,
>>  :
>>   argument "data" is missing, with no default
>>
>> What should I do now??
>>
>> Best Regards,
>> Soheila
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@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@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.


Re: [R] Cluster analysis using term frequencies

2015-03-24 Thread Christian Hennig

Dear Sun Shine,


dtes <- dist(tes.df, method = 'euclidean')
dtesFreq <- hclust(dtes, method = 'ward.D')
plot(dtesFreq, labels = names(tes.df))


However, I get an error message when trying to plot this: "Error in 
graphics:::plotHclust(n1, merge, height, order(x$order), hang,  : invalid 
dendrogram input".


I don't see anything wrong with the code, so what I'd do is run
str(dtes) and str(dtesFreq) to see whether these are what they should be 
(or if not, what they are instead).


I'm clearly screwing something up, either in my source data.frame or in my 
setting hclust up, but don't know which, nor how.


Can't comment on your source data but generally, whatever you do, use 
str() or even print() to see whether the R-objects are allright or what 
went wrong.


More than just identifying the error however, I am interested in finding a 
smart (efficient/ elegant) way of checking the occurrence and frequency value 
of the terms that may be associated with 'sports', 'learning', and 
'extra-mural' and extracting these into a matrix or data frame so that I can 
analyse and plot their clustering to see if how I associated these terms is 
actually supported statistically.


The first thing that comes to my mind (not necessarily the best/most 
elegant) is to run...

dtes3 <- cutree(dtesFreq,3)
...and to table dtes3 against your manual classification.
Note that 3 is the most "natural" number of clusters to cut the tree 
here but may not be the best to match your classification (for example, 
you may have a one-point cluster in the 3-cluster solution, so it may 
effectively be a two-cluster solution with an outlier). Your 
dendrogram, if you succeed plotting it, may give you a hint about that.


Hope this helps,
Christian




I'm sure that there must be a way of doing this in R, but I'm obviously not 
going about it correctly. Can anyone shine a light please?


Thanks for any help/ guidance.

Regards,
Sun

__
R-help@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.



*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
c.hen...@ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche

__
R-help@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.


Re: [R] missing in neural network

2015-03-24 Thread Charles Determan Jr
Hi Soheila,

You are using the formula argument incorrectly.  The neuralnet function has
a separate argument for data aptly names 'data'.  You can review the
arguments by looking at the documentation  with ?neuralnet.

As I cannot reproduce your data the following is not tested but I think
should work for you.

# Join your response variable to your data set.
mydata <- cbind(data, resp)

# Run neuralnet
out <- neuralnet(resp ~ ., data=mydata, hidden = 4, lifesign = "minimal",
   linear.output = FALSE, threshold = 0.1,na.rm = TRUE)


Best,
Charles

On Tue, Mar 24, 2015 at 4:47 AM, Soheila Khodakarim 
wrote:

> Dear All,
>
> I want to run "neural network" on my dataset.
> ##
> resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
> dim(data)
> #20*3110
>
> out <- neuralnet(y ~ data, hidden = 4, lifesign = "minimal", linear.output
> = FALSE, threshold = 0.1,na.rm = TRUE)
> 
> but I see this Error
> Error in varify.variables(data, formula, startweights, learningrate.limit,
>  :
>   argument "data" is missing, with no default
>
> What should I do now??
>
> Best Regards,
> Soheila
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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@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.


[R] Cluster analysis using term frequencies

2015-03-24 Thread Sun Shine

Hi list

I am using the 'tm' package to review meeting notes at a school to 
identify terms frequently associated with 'learning', 'sports', and 
'extra-mural' activities, and then to sort any terms according to these 
three headers in a way that could be supported statistically (as opposed 
to, say, my own bias, etc.).


To accomplish this, I have done the following:

(1) After the usual pre-processing of the text data, loading it as a 
corpus and then converting it into a document term matrix (called 
'allTerms'), I have identified the 20 most frequently occurring terms in 
the meeting notes and extracted these into a named vector called 
'freqTerms'. Many of the terms returned have nothing to do with any of 
the three themes of 'learning', 'sports', or 'extra-mural'.


(2) Therefore, I have also manually generated a list of terms and 
synonyms for 'learning' and 'sports', etc. (e.g. 'football', 'soccer', 
'drama', 'chess', etc.) and then tested for the occurrence of each of 
these terms in the corpus, e.g.:


> allTerms['soccer']

and have come up with a list of some 30 terms together with their 
frequencies. I manually sorted these according to three headers 
'learning', 'sports', and 'extra-mural' and dropped these into a table 
in a word processing document. Some of these terms are also in the 
freqTerms vector.


What I want to do now is to use cluster analysis (hclust, from the 
'cluster' library) to plot a dendrogram of the terms I have manually 
checked and put into the table, in order to see how closely similar the 
terms are and whether they cluster in ways similar to the way as I 
manually sorted these under the table column headers of 'learning', 
'sports', and 'extra-mural'.


To do this, I dropped these manually sorted terms into a data frame 
together with the associated values (which I called 'tes.df') and then 
tried plotting this as follows:


> dtes <- dist(tes.df, method = 'euclidean')
> dtesFreq <- hclust(dtes, method = 'ward.D')
> plot(dtesFreq, labels = names(tes.df))

However, I get an error message when trying to plot this: "Error in 
graphics:::plotHclust(n1, merge, height, order(x$order), hang,  : 
invalid dendrogram input".


I'm clearly screwing something up, either in my source data.frame or in 
my setting hclust up, but don't know which, nor how.


More than just identifying the error however, I am interested in finding 
a smart (efficient/ elegant) way of checking the occurrence and 
frequency value of the terms that may be associated with 'sports', 
'learning', and 'extra-mural' and extracting these into a matrix or data 
frame so that I can analyse and plot their clustering to see if how I 
associated these terms is actually supported statistically.


I'm sure that there must be a way of doing this in R, but I'm obviously 
not going about it correctly. Can anyone shine a light please?


Thanks for any help/ guidance.

Regards,
Sun

__
R-help@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.


[R] missing in neural network

2015-03-24 Thread Soheila Khodakarim
Dear All,

I want to run "neural network" on my dataset.
##
resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1)
dim(data)
#20*3110

out <- neuralnet(y ~ data, hidden = 4, lifesign = "minimal", linear.output
= FALSE, threshold = 0.1,na.rm = TRUE)

but I see this Error
Error in varify.variables(data, formula, startweights, learningrate.limit,
 :
  argument "data" is missing, with no default

What should I do now??

Best Regards,
Soheila

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] the making of _R_ eBooks

2015-03-24 Thread Dr. Wolfgang Lindner
From: "Amos B. Elberg" 
| If you take a look at rmarkdown and the rticles package, you'll find a 
template for | a "tufte ebook" in the style of Edward Tufte.

From: "Sven E. Templer" 
|> Q3: any other recommendations?
| You might be interested in the very easy to use R markdown, see:
| http://rmarkdown.rstudio.com/

Dear Sven, dear Amos,

that's what I was looking for!
Thanks for pointing me to rmarkdown, rticles package and the Tufte template.

best, Wolfgang G Lindner
Leichlingen, Germany

__
R-help@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.