[R] Solution: Re: Can't install R6 in new installation of R 3.5.2

2019-08-05 Thread Barnet Wagman

The problem was not specific to R6 (and probably not to R 3.5.2).

In my .RProfile,  I invoke source() on several of my *.R files that load 
R6.  Apparently the failed attempt to load a package prevents it from 
being installed. Commenting out the offending lines in .RProfile solved 
the problem.


FYI is this true attempting to do an install both from within an R 
session and at the command line with 'R CMD INSTALL ...'


Regards

On 8/3/19 5:21 PM, Barnet Wagman wrote:
I've just installed R 3.5.2 (on Debian 10, Buster) and am unable to 
install R6.


install.packages("R6");

yields

Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/R6_2.4.0.tar.gz'
Content type 'application/x-gzip' length 31545 bytes (30 KB)
==
downloaded 30 KB

Error in library(R6) : there is no package called ‘R6’
Calls: source -> withVisible -> eval -> eval -> library
Execution halted

The downloaded source packages are in
    ‘/tmp/RtmpMQfLun/downloaded_packages’
Warning message:
In install.packages("R6") :
  installation of package ‘R6’ had non-zero exit status

Adding the 'dependencies=TRUE option' yields a whole slew of

Error in library(R6) : there is no package called ‘R6’
Calls: source -> withVisible -> eval -> eval -> library
Execution halted

errors.  (The full output is below.)

I'd appreciate any thoughts on this.  I've installed R /many/ times 
and haven't run into this problem before.


Thanks.




Full output of 'install.packages("R6",dependencies=TRUE)'

> install.packages("R6",dependencies=TRUE)
Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘backports’, ‘ellipsis’, ‘zeallot’,
‘utf8’, ‘vctrs’, ‘mime’, ‘glue’, ‘stringi’, ‘assertthat’, ‘plyr’,
‘fansi’, ‘pillar’, ‘pkgconfig’, ‘colorspace’, ‘evaluate’, ‘highr’,
‘markdown’, ‘stringr’, ‘yaml’, ‘xfun’, ‘Rcpp’, ‘cli’, ‘crayon’,
‘digest’, ‘magrittr’, ‘praise’, ‘rlang’, ‘withr’, ‘gtable’,
‘lazyeval’, ‘reshape2’, ‘tibble’, ‘viridisLite’, ‘labeling’,
‘munsell’, ‘RColorBrewer’, ‘knitr’, ‘microbenchmark’, ‘pryr’,
‘testthat’, ‘ggplot2’, ‘scales’

trying URL
'https://cloud.r-project.org/src/contrib/backports_1.1.4.tar.gz'
Content type 'application/x-gzip' length 13859 bytes (13 KB)
==
downloaded 13 KB

trying URL
'https://cloud.r-project.org/src/contrib/ellipsis_0.2.0.1.tar.gz'
Content type 'application/x-gzip' length 7045 bytes
==
downloaded 7045 bytes

trying URL
'https://cloud.r-project.org/src/contrib/zeallot_0.1.0.tar.gz'
Content type 'application/x-gzip' length 32549 bytes (31 KB)
==
downloaded 31 KB

trying URL 'https://cloud.r-project.org/src/contrib/utf8_1.1.4.tar.gz'
Content type 'application/x-gzip' length 218882 bytes (213 KB)
==
downloaded 213 KB

trying URL 'https://cloud.r-project.org/src/contrib/vctrs_0.2.0.tar.gz'
Content type 'application/x-gzip' length 668258 bytes (652 KB)
==
downloaded 652 KB

trying URL 'https://cloud.r-project.org/src/contrib/mime_0.7.tar.gz'
Content type 'application/x-gzip' length 13130 bytes (12 KB)
==
downloaded 12 KB

trying URL 'https://cloud.r-project.org/src/contrib/glue_1.3.1.tar.gz'
Content type 'application/x-gzip' length 122950 bytes (120 KB)
==
downloaded 120 KB

trying URL
'https://cloud.r-project.org/src/contrib/stringi_1.4.3.tar.gz'
Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
==
downloaded 7.0 MB

trying URL
'https://cloud.r-project.org/src/contrib/assertthat_0.2.1.tar.gz'
Content type 'application/x-gzip' length 12742 bytes (12 KB)
==
downloaded 12 KB

trying URL 'https://cloud.r-project.org/src/contrib/plyr_1.8.4.tar.gz'
Content type 'application/x-gzip' length 392451 bytes (383 KB)
==
downloaded 383 KB

trying URL 'https://cloud.r-project.org/src/contrib/fansi_0.4.0.tar.gz'
Content type 'application/x-gzip' length 266123 bytes (259 KB)
==
downloaded 259 KB

trying URL 'https://cloud.r-project.org/src/contrib/pillar_1.4.2.tar.gz'
Content type 'application/x-gzip' length 228815 bytes (223 KB)
==
downloaded 223 KB

trying URL
'https://cloud.r-project.org/src/contrib/pkgconfig_2.0.2.tar.gz'
Content type 'application/x-gzip' length 6024 bytes
==

[R] Can't install R6 in new installation of R 3.5.2

2019-08-05 Thread Barnet Wagman
I've just installed R 3.5.2 (on Debian 10, Buster) and am unable to 
install R6.


install.packages("R6");

yields

Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/R6_2.4.0.tar.gz'
Content type 'application/x-gzip' length 31545 bytes (30 KB)
==
downloaded 30 KB

Error in library(R6) : there is no package called ‘R6’
Calls: source -> withVisible -> eval -> eval -> library
Execution halted

The downloaded source packages are in
    ‘/tmp/RtmpMQfLun/downloaded_packages’
Warning message:
In install.packages("R6") :
  installation of package ‘R6’ had non-zero exit status

Adding the 'dependencies=TRUE option' yields a whole slew of

Error in library(R6) : there is no package called ‘R6’
Calls: source -> withVisible -> eval -> eval -> library
Execution halted

errors.  (The full output is below.)

I'd appreciate any thoughts on this.  I've installed R /many/ times and 
haven't run into this problem before.


Thanks.




Full output of 'install.packages("R6",dependencies=TRUE)'

> install.packages("R6",dependencies=TRUE)
Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘backports’, ‘ellipsis’, ‘zeallot’,
‘utf8’, ‘vctrs’, ‘mime’, ‘glue’, ‘stringi’, ‘assertthat’, ‘plyr’,
‘fansi’, ‘pillar’, ‘pkgconfig’, ‘colorspace’, ‘evaluate’, ‘highr’,
‘markdown’, ‘stringr’, ‘yaml’, ‘xfun’, ‘Rcpp’, ‘cli’, ‘crayon’,
‘digest’, ‘magrittr’, ‘praise’, ‘rlang’, ‘withr’, ‘gtable’,
‘lazyeval’, ‘reshape2’, ‘tibble’, ‘viridisLite’, ‘labeling’,
‘munsell’, ‘RColorBrewer’, ‘knitr’, ‘microbenchmark’, ‘pryr’,
‘testthat’, ‘ggplot2’, ‘scales’

trying URL
'https://cloud.r-project.org/src/contrib/backports_1.1.4.tar.gz'
Content type 'application/x-gzip' length 13859 bytes (13 KB)
==
downloaded 13 KB

trying URL
'https://cloud.r-project.org/src/contrib/ellipsis_0.2.0.1.tar.gz'
Content type 'application/x-gzip' length 7045 bytes
==
downloaded 7045 bytes

trying URL
'https://cloud.r-project.org/src/contrib/zeallot_0.1.0.tar.gz'
Content type 'application/x-gzip' length 32549 bytes (31 KB)
==
downloaded 31 KB

trying URL 'https://cloud.r-project.org/src/contrib/utf8_1.1.4.tar.gz'
Content type 'application/x-gzip' length 218882 bytes (213 KB)
==
downloaded 213 KB

trying URL 'https://cloud.r-project.org/src/contrib/vctrs_0.2.0.tar.gz'
Content type 'application/x-gzip' length 668258 bytes (652 KB)
==
downloaded 652 KB

trying URL 'https://cloud.r-project.org/src/contrib/mime_0.7.tar.gz'
Content type 'application/x-gzip' length 13130 bytes (12 KB)
==
downloaded 12 KB

trying URL 'https://cloud.r-project.org/src/contrib/glue_1.3.1.tar.gz'
Content type 'application/x-gzip' length 122950 bytes (120 KB)
==
downloaded 120 KB

trying URL
'https://cloud.r-project.org/src/contrib/stringi_1.4.3.tar.gz'
Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
==
downloaded 7.0 MB

trying URL
'https://cloud.r-project.org/src/contrib/assertthat_0.2.1.tar.gz'
Content type 'application/x-gzip' length 12742 bytes (12 KB)
==
downloaded 12 KB

trying URL 'https://cloud.r-project.org/src/contrib/plyr_1.8.4.tar.gz'
Content type 'application/x-gzip' length 392451 bytes (383 KB)
==
downloaded 383 KB

trying URL 'https://cloud.r-project.org/src/contrib/fansi_0.4.0.tar.gz'
Content type 'application/x-gzip' length 266123 bytes (259 KB)
==
downloaded 259 KB

trying URL 'https://cloud.r-project.org/src/contrib/pillar_1.4.2.tar.gz'
Content type 'application/x-gzip' length 228815 bytes (223 KB)
==
downloaded 223 KB

trying URL
'https://cloud.r-project.org/src/contrib/pkgconfig_2.0.2.tar.gz'
Content type 'application/x-gzip' length 6024 bytes
==
downloaded 6024 bytes

trying URL
'https://cloud.r-project.org/src/contrib/colorspace_1.4-1.tar.gz'
Content type 'application/x-gzip' length 2152594 bytes (2.1 MB)
==
downloaded 2.1 MB

trying URL
'https://cloud.r-project.org/src/contrib/evaluate_0.14.tar.gz'
Content type 'application/x-gzip' length 24206 bytes (23 KB)
==
downloaded 23 KB

trying URL 'https://cloud.r-project.org/src/contrib/highr_0.8.tar.gz'
Content type 

[R] Can't install R6 in new installation of R 3.5.2

2019-08-05 Thread Barnet Wagman
I've just installed R 3.5.2 (on Debian 10, Buster) and am unable to 
install R6.


   install.packages("R6");

yields

   Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
   (as ‘lib’ is unspecified)
   trying URL 'https://cloud.r-project.org/src/contrib/R6_2.4.0.tar.gz'
   Content type 'application/x-gzip' length 31545 bytes (30 KB)
   ==
   downloaded 30 KB

   Error in library(R6) : there is no package called ‘R6’
   Calls: source -> withVisible -> eval -> eval -> library
   Execution halted

   The downloaded source packages are in
    ‘/tmp/RtmpMQfLun/downloaded_packages’
   Warning message:
   In install.packages("R6") :
  installation of package ‘R6’ had non-zero exit status

Adding the 'dependencies=TRUE option' yields a whole slew of

   Error in library(R6) : there is no package called ‘R6’
   Calls: source -> withVisible -> eval -> eval -> library
   Execution halted

errors.  (The full output is below.)

I'd appreciate any thoughts on this.  I've installed R /many/ times and 
haven't run into this problem before.


Thanks.




Full output of 'install.packages("R6",dependencies=TRUE)'

> install.packages("R6",dependencies=TRUE)
   Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/3.5’
   (as ‘lib’ is unspecified)
   also installing the dependencies ‘backports’, ‘ellipsis’, ‘zeallot’,
   ‘utf8’, ‘vctrs’, ‘mime’, ‘glue’, ‘stringi’, ‘assertthat’, ‘plyr’,
   ‘fansi’, ‘pillar’, ‘pkgconfig’, ‘colorspace’, ‘evaluate’, ‘highr’,
   ‘markdown’, ‘stringr’, ‘yaml’, ‘xfun’, ‘Rcpp’, ‘cli’, ‘crayon’,
   ‘digest’, ‘magrittr’, ‘praise’, ‘rlang’, ‘withr’, ‘gtable’,
   ‘lazyeval’, ‘reshape2’, ‘tibble’, ‘viridisLite’, ‘labeling’,
   ‘munsell’, ‘RColorBrewer’, ‘knitr’, ‘microbenchmark’, ‘pryr’,
   ‘testthat’, ‘ggplot2’, ‘scales’

   trying URL
   'https://cloud.r-project.org/src/contrib/backports_1.1.4.tar.gz'
   Content type 'application/x-gzip' length 13859 bytes (13 KB)
   ==
   downloaded 13 KB

   trying URL
   'https://cloud.r-project.org/src/contrib/ellipsis_0.2.0.1.tar.gz'
   Content type 'application/x-gzip' length 7045 bytes
   ==
   downloaded 7045 bytes

   trying URL
   'https://cloud.r-project.org/src/contrib/zeallot_0.1.0.tar.gz'
   Content type 'application/x-gzip' length 32549 bytes (31 KB)
   ==
   downloaded 31 KB

   trying URL 'https://cloud.r-project.org/src/contrib/utf8_1.1.4.tar.gz'
   Content type 'application/x-gzip' length 218882 bytes (213 KB)
   ==
   downloaded 213 KB

   trying URL 'https://cloud.r-project.org/src/contrib/vctrs_0.2.0.tar.gz'
   Content type 'application/x-gzip' length 668258 bytes (652 KB)
   ==
   downloaded 652 KB

   trying URL 'https://cloud.r-project.org/src/contrib/mime_0.7.tar.gz'
   Content type 'application/x-gzip' length 13130 bytes (12 KB)
   ==
   downloaded 12 KB

   trying URL 'https://cloud.r-project.org/src/contrib/glue_1.3.1.tar.gz'
   Content type 'application/x-gzip' length 122950 bytes (120 KB)
   ==
   downloaded 120 KB

   trying URL
   'https://cloud.r-project.org/src/contrib/stringi_1.4.3.tar.gz'
   Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
   ==
   downloaded 7.0 MB

   trying URL
   'https://cloud.r-project.org/src/contrib/assertthat_0.2.1.tar.gz'
   Content type 'application/x-gzip' length 12742 bytes (12 KB)
   ==
   downloaded 12 KB

   trying URL 'https://cloud.r-project.org/src/contrib/plyr_1.8.4.tar.gz'
   Content type 'application/x-gzip' length 392451 bytes (383 KB)
   ==
   downloaded 383 KB

   trying URL 'https://cloud.r-project.org/src/contrib/fansi_0.4.0.tar.gz'
   Content type 'application/x-gzip' length 266123 bytes (259 KB)
   ==
   downloaded 259 KB

   trying URL 'https://cloud.r-project.org/src/contrib/pillar_1.4.2.tar.gz'
   Content type 'application/x-gzip' length 228815 bytes (223 KB)
   ==
   downloaded 223 KB

   trying URL
   'https://cloud.r-project.org/src/contrib/pkgconfig_2.0.2.tar.gz'
   Content type 'application/x-gzip' length 6024 bytes
   ==
   downloaded 6024 bytes

   trying URL
   'https://cloud.r-project.org/src/contrib/colorspace_1.4-1.tar.gz'
   Content type 'application/x-gzip' length 2152594 bytes (2.1 MB)
   ==
   downloaded 2.1 MB

   trying URL
   

[R] New version of cloudRmpi

2012-05-14 Thread Barnet Wagman

cloudRmpi v 1.2 is now available on CRAN.

cloudRmpi is a means for doing parallel processing in R, using MPI on a  
cloud-based network.  It currently

supports the use of Amazon's EC2 cloud computer service.

Changes in v 1.2:

Support for RStudio. RStudio Server is available on new AMIs.  cloudRmpi 
now has a function for securely connecting to an RStudio session running 
on the master node of an EC2-MPI network, via ssh port forwarding.  
(RStudio Server is a browser based, IDE-like interface to R).


The network specification dialog shows more information about AMIs.

The network manager has a command to repeat Open MPI network network 
configuration.



Regards,

Barnet Wagman

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


[R] [R-pkgs] New version of rreval: Remote R Evaluator

2012-04-28 Thread Barnet Wagman

rreval 1.1 is now available on CRAN.

This release fixes a Window specific bug. It is required for cloudRmpi 
1.1 (which is also now available on CRAN).


rreval is a means for using R on a remote system from within a local R 
session. Any R expression can be evaluated on the remote server. All 
non-graphical results are returned to the local R session: this includes 
the results of remote evaluations and (nearly) all textual output, 
including errors and warnings. rreval uses socket level communication 
via ssh port forwarding. It supports uploading and downloading R objects 
and scp file tranfers.



Cheers,

Barnet Wagman

___
R-packages mailing list
r-packa...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages

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


[R] Nonparmetric statistics with weighted data set?

2012-03-25 Thread Barnet Wagman
I'm doing some work with a weighted data set (the CPS) and I'd like to 
use nonparametric techniques. Is there an R package that supports this?  
The np package doesn't appear to have provisions for weighted data. (Or 
have I missed something?)  I need to perform both density estimation and 
regressions.


thanks,

bw

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


[R] [R-pkgs] New package cloudRmpi: Cloud-based parallel proccessing for R

2012-03-23 Thread Barnet Wagman
cloudRmpi is means for doing parallel processing in R, using MPI on a 
cloud-based network.  It currently supports the use of Amazon's EC2 
cloud computer service. cloudRmpi provides a mechanism to launch and 
manage a cloud-based network and to access an R session on the network's 
master MPI node (using the rreval package). cloudRmpi should work with 
any MPI based R package (it has been tested with Rmpi, npRmpi, and snow).

Barnet Wagman
b...@norbl.com





[[alternative HTML version deleted]]

___
R-packages mailing list
r-packa...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages

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


[R] Weighted data with npcdensbw

2011-08-11 Thread Barnet Wagman

Is there a way of using weighted data with npcdensbw (in the np package)?

thanks

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


Re: [R] rJava on Debian squeeze (or other versions of Linux)?

2011-08-06 Thread Barnet Wagman
(Dirk: I mistakenly sent this to you directly: I meant to post it to R 
help.  Sorry)


On 8/6/11 8:16 AM, Dirk Eddelbuettel wrote:

a) Did you try 'sudo apt-get install r-cran-rjava'  ?  This is after all
packaged in Debian

b) The Debian rjava package has 'openjdk-6-jdk' in its Build-Depends, do you
have that installed if you try to build from source?


I'm going to be using rJava as part of a package I'm developing, so I 
need to be able to install it in a more generic way than the Debian 
distribution.  For the same reason, I need to get it to work with Oracle 
Java.


thanks

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


Re: [R] rJava on Debian squeeze (or other versions of Linux)?

2011-08-06 Thread Barnet Wagman

On 8/6/11 9:37 AM, Dirk Eddelbuettel wrote:

| I'm going to be using rJava as part of a package I'm developing, so I
| need to be able to install it in a more generic way than the Debian

Care to define more generic way than Debian ?


^ I mean:
(i) Install Java from Oracle
(ii) run R CMD javareconf if necessary
(iii) Install the rJava package from within R, i.e. 
install.package(rJava, ...)


I'm trying to avoid using the Debian specific package.


R CMD javareconf _should_ be all you need if you $PATH etc are properly setup.
^ Is there any documentation on what javareconf wants in the $PATH? I've 
tried setting $JAVA_HOME to all all sorts of things without success.


If not you may need more help from the R/Java list Simon runs.

^ I didn't know that Simon was currently running a list and haven't been 
able to find it.  Do you have a url or subscription email address?


thanks

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


Re: [R] rJava on Debian squeeze (or other versions of Linux)?

2011-08-06 Thread Barnet Wagman

On 8/6/11 9:37 AM, Dirk Eddelbuettel wrote:

| I'm going to be using rJava as part of a package I'm developing, so I
| need to be able to install it in a more generic way than the Debian

Care to define more generic way than Debian ?


^ I mean:
(i) Install Java from Oracle
(ii) run R CMD javareconf if necessary
(iii) Install the rJava package from within R, i.e. 
install.package(rJava, ...)


I'm trying to avoid using the Debian specific package.


R CMD javareconf _should_ be all you need if you $PATH etc are properly setup.
^ Is there any documentation on what javareconf wants in the $PATH? 
I've tried setting $JAVA_HOME to all all sorts of things without success.


If not you may need more help from the R/Java list Simon runs.

^ I didn't know that Simon was currently running a list and haven't been 
able to find it.  Do you have a url or subscription email address?


thanks

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


Re: [R] rJava on Debian squeeze (or other versions of Linux)?

2011-08-06 Thread Barnet Wagman
(Dirk: I mistakenly sent this to you directly: I meant to post it to R 
help.  Sorry)


On 8/6/11 8:16 AM, Dirk Eddelbuettel wrote:

a) Did you try 'sudo apt-get install r-cran-rjava'  ?  This is after all
packaged in Debian

b) The Debian rjava package has 'openjdk-6-jdk' in its Build-Depends, do you
have that installed if you try to build from source?


I'm going to be using rJava as part of a package I'm developing, so I 
need to be able to install it in a more generic way than the Debian 
distribution.  For the same reason, I need to get it to work with Oracle 
Java.


thanks

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


[R] rJava on Debian squeeze (or other versions of Linux)?

2011-08-05 Thread Barnet Wagman
Has anyone successfully installed rJava on Debian squeeze (or any other 
version of linux)?

I keep getting the

... (JDK) is missing or not registered in R


error message when installing the package.

I've tried running 'R CMD javareconf', setting JAVA_HOME and editing 
/etc/R/ldpaths by hand, but to no avail.

The problem might be related to the R_JAVA_LD_LIBRARY_PATH that's set in 
/etc/R/ldpaths.  Does anyone know what it's supposed to contain?  I 
haven't been able to find any documentation on it?

Searching the web, I've found many references to this problem, but no 
solutions.

thanks,

bw



[[alternative HTML version deleted]]

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