[R] Cannot start OpenBUGS from R2WinBugs

2017-11-24 Thread Lubo Larsson
Hello,

I'm running R version 3.4.2 on Windows. I have a program written in
BUGS which I can successfully run from the R2WinBUGS package.

I would also like to try and use the same package to use OpenBUGS
(version 3.2.3) rather than WinBUGS.

The initial output looks ok (shown below), but the OpenBUGS executable
is never started. Instead I see a process running called
“BugsHelper.exe *32” in the Windows Task manager, and the R bugs()
call just hangs.

Can anyone suggest a reason why this is happening?

(Apologies if this should be on a more specialized list, but I did not
see one that looked any more suitable. Please anyone let me know
otherwise.)

Best,
John

“Loading required namespace: BRugs
Welcome to BRugs connected to OpenBUGS version 3.2.3
model is syntactically correct
data loaded
model compiled
Initializing chain 1:
model is initialized
model is already initialized
Sampling has been started ...”

__
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] installing "rgl" package

2017-11-24 Thread Santosh
Hi Duncan,
Thanks for the suggestions. How do I uninstall mesa related installations?
Do I need to uninstall all of "mesa" or only the specific ones?

Santosh

On Fri, Nov 24, 2017 at 3:05 PM, Duncan Murdoch 
wrote:

> On 24/11/2017 5:45 PM, Dirk Eddelbuettel wrote:
>
>>
>> On 24 November 2017 at 11:30, Santosh wrote:
>> | Hi All, Duncan, Rolf, Ista, DIrk,
>> |
>> | Thanks for the suggestions and I tried all of them (as suggested by
>> Duncan,
>> | Rolf, Ista and Dirk)... I still get similar error as before while
>> | installing 'rgl' package.. I also tried to manually configure "rgl" and
>> got
>> | an error message (please see below for the verbatim output).  Would
>> highly
>> | any further ideas/suggestions!
>> |
>> | *In my system, "GL" library is present under "/usr/include/GL"*
>> |
>> | Here are the libraries available (as suggested by Rolf)
>> |
>> | After installing some of them, I continue to get the same error message,
>> | please below the output messages in config.log after I ran
>> "./configure")
>> |
>> |
>> | "ii  r-cran-rgl0.93.996-1
>> | amd64GNU R package for three-dimensional visualisation
>> | using OpenGL"
>>
>> That means you _have_ the rgl package installed, and can stop everything
>> you
>> are doing.
>>
>> You do _not_ need to install it from source via R. You have it from
>> Ubuntu.
>>
>>
> Actually the version on CRAN is pretty old, so I'd recommend people do
> install it from source, getting the source from R-forge.  Since that is a
> development site the quality varies over time, but right at this minute I
> would say it is better than the CRAN version.
>
> Re Santosh's error messages:  it looks as though the Mesa installation is
> messed up.  I'd recommend uninstalling it, making sure there's no remnant
> of Mesa anywhere, then reinstalling it.
>
> Duncan Murdoch
>

[[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] installing "rgl" package

2017-11-24 Thread Duncan Murdoch

On 24/11/2017 5:45 PM, Dirk Eddelbuettel wrote:


On 24 November 2017 at 11:30, Santosh wrote:
| Hi All, Duncan, Rolf, Ista, DIrk,
|
| Thanks for the suggestions and I tried all of them (as suggested by Duncan,
| Rolf, Ista and Dirk)... I still get similar error as before while
| installing 'rgl' package.. I also tried to manually configure "rgl" and got
| an error message (please see below for the verbatim output).  Would highly
| any further ideas/suggestions!
|
| *In my system, "GL" library is present under "/usr/include/GL"*
|
| Here are the libraries available (as suggested by Rolf)
|
| After installing some of them, I continue to get the same error message,
| please below the output messages in config.log after I ran "./configure")
|
|
| "ii  r-cran-rgl0.93.996-1
| amd64GNU R package for three-dimensional visualisation
| using OpenGL"

That means you _have_ the rgl package installed, and can stop everything you
are doing.

You do _not_ need to install it from source via R. You have it from Ubuntu.



Actually the version on CRAN is pretty old, so I'd recommend people do 
install it from source, getting the source from R-forge.  Since that is 
a development site the quality varies over time, but right at this 
minute I would say it is better than the CRAN version.


Re Santosh's error messages:  it looks as though the Mesa installation 
is messed up.  I'd recommend uninstalling it, making sure there's no 
remnant of Mesa anywhere, then reinstalling it.


Duncan Murdoch

__
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] installing "rgl" package

2017-11-24 Thread Santosh
Hi Duncan, Dirk, & Others,

Mine has also like this...
/usr/lib/x86_64-linux-gnu/libGL.so -> mesa/libGL.so  ->  libGL.so.1.2.0

however, I could not find the source of libGL.so.1.2.0

Dirk, I just now saw your response... Yes, r-cran-rgl and ibgl1-mesa-glx
 are the latest
available now.  How do I install R package "rgl" successfully? it gives the
error about glEnd... and removes the  R package "rgl".

Thanks again,
Santosh


On Fri, Nov 24, 2017 at 2:33 PM, Duncan Murdoch 
wrote:

> On 24/11/2017 5:24 PM, Santosh wrote:
>
>> Hi Duncan, and others..
>>
>> Yes, below are the search results. it is linked to mesa/libGL.so and is
>> again point to libGL.so -> libGL.so.1.2.0 . However, I could not find
>> libGL.so.1.2.0 or its source. Where is libGL.so.1.2.0 expected to be
>> located?
>>
>
> Mine was in /usr/lib/x86_64-linux-gnu/mesa/.
>
> Duncan Murdoch
>
>
>>
>> /usr/lib/libGL.so.1
>>
>> /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGL.so.1
>> /usr/lib/x86_64-linux-gnu/mesa/libGL.so
>>
>>
>> Thanks again,
>> Santosh
>>
>> On Fri, Nov 24, 2017 at 12:39 PM, Duncan Murdoch <
>> murdoch.dun...@gmail.com > wrote:
>>
>> On 24/11/2017 2:30 PM, Santosh wrote:
>>
>> Hi All, Duncan, Rolf, Ista, DIrk,
>>
>> Thanks for the suggestions and I tried all of them (as suggested
>> by Duncan,
>> Rolf, Ista and Dirk)... I still get similar error as before while
>> installing 'rgl' package.. I also tried to manually configure
>> "rgl" and got
>> an error message (please see below for the verbatim output).
>>Would highly
>> any further ideas/suggestions!
>>
>> *In my system, "GL" library is present under "/usr/include/GL"*
>>
>>
>> That's the include file.  The error is saying you don't have
>> libGL.so, which it is looking for in /usr/lib/x86_64-linux-gnu.  Do
>> you have that file?  Is it there, and marked as executable?
>>
>> It's probably a symbolic link; on an old Ubuntu system I just
>> checked, it points to mesa/libGL.so, which is also a symlink,
>> pointing to mesa/libGL.so.1.2.0, which is executable.
>>
>> Duncan Murdoch
>>
>>
>>
>> Here are the libraries available (as suggested by Rolf)
>>
>> After installing some of them, I continue to get the same error
>> message,
>> please below the output messages in config.log after I ran
>> "./configure")
>>
>>
>> "ii  r-cran-rgl0.93.996-1
>>   amd64GNU R package for three-dimensional
>> visualisation
>> using OpenGL"
>>
>> "ii  libegl1-mesa:amd6410.1.3-0ubuntu0.6
>>  amd64free implementation of the EGL API --
>> runtime"
>>
>> "ii  libegl1-mesa-dev  10.1.3-0ubuntu0.6
>>  amd64free implementation of the EGL API --
>> development files"
>>
>> "ii  libegl1-mesa-drivers:amd6410.1.3-0ubuntu0.6
>>  amd64free implementation of the EGL API --
>> hardware drivers"
>>
>> "ii  libgl1-mesa-dev   10.1.3-0ubuntu0.6
>>  amd64free implementation of the OpenGL API -- GLX
>> development files"
>>
>> "ii  libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.6
>>  amd64free implementation of the OpenGL API --
>> DRI modules"
>>
>>
>> "ii  libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.6
>>  amd64free implementation of the OpenGL API --
>> GLX runtime"
>>
>>
>> "ii  libglapi-mesa:amd64   10.1.3-0ubuntu0.6
>>  amd64free implementation of the GL API --
>> shared library"
>>
>> "ii  libglu1-mesa:amd649.0.0-2
>>  amd64Mesa OpenGL utility library (GLU)"
>>
>> "ii  libglu1-mesa-dev  9.0.0-2
>>  amd64Mesa OpenGL utility library -- development
>> files"
>>
>> "ii  libwayland-client0:amd64  1.4.0-1ubuntu1
>>   amd64wayland compositor infrastructure -
>> client library"
>>
>> "ii  libwayland-cursor0:amd64  1.4.0-1ubuntu1
>>   amd64wayland compositor infrastructure -
>> cursor library"
>>
>> "ii  libwayland-dev1.4.0-1ubuntu1
>>   amd64wayland compositor infrastructure -
>> development files"
>>
>> "ii  libwayland-egl1-mesa:amd6410.1.3-0ubuntu0.6
>>  amd64implementation of the Wayland EGL platform
>> -- runtime"
>>
>> "ii  libwayland-server0:amd64  1.4.0-1ubuntu1
>>

Re: [R] installing "rgl" package

2017-11-24 Thread Dirk Eddelbuettel

On 24 November 2017 at 11:30, Santosh wrote:
| Hi All, Duncan, Rolf, Ista, DIrk,
| 
| Thanks for the suggestions and I tried all of them (as suggested by Duncan,
| Rolf, Ista and Dirk)... I still get similar error as before while
| installing 'rgl' package.. I also tried to manually configure "rgl" and got
| an error message (please see below for the verbatim output).  Would highly
| any further ideas/suggestions!
| 
| *In my system, "GL" library is present under "/usr/include/GL"*
| 
| Here are the libraries available (as suggested by Rolf)
| 
| After installing some of them, I continue to get the same error message,
| please below the output messages in config.log after I ran "./configure")
| 
| 
| "ii  r-cran-rgl0.93.996-1
| amd64GNU R package for three-dimensional visualisation
| using OpenGL"

That means you _have_ the rgl package installed, and can stop everything you
are doing.

You do _not_ need to install it from source via R. You have it from Ubuntu.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.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] installing "rgl" package

2017-11-24 Thread Duncan Murdoch

On 24/11/2017 5:24 PM, Santosh wrote:

Hi Duncan, and others..

Yes, below are the search results. it is linked to mesa/libGL.so and is 
again point to libGL.so -> libGL.so.1.2.0 . However, I could not find 
libGL.so.1.2.0 or its source. Where is libGL.so.1.2.0 expected to be 
located?


Mine was in /usr/lib/x86_64-linux-gnu/mesa/.

Duncan Murdoch




/usr/lib/libGL.so.1

/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGL.so.1 
/usr/lib/x86_64-linux-gnu/mesa/libGL.so



Thanks again,
Santosh

On Fri, Nov 24, 2017 at 12:39 PM, Duncan Murdoch 
mailto:murdoch.dun...@gmail.com>> wrote:


On 24/11/2017 2:30 PM, Santosh wrote:

Hi All, Duncan, Rolf, Ista, DIrk,

Thanks for the suggestions and I tried all of them (as suggested
by Duncan,
Rolf, Ista and Dirk)... I still get similar error as before while
installing 'rgl' package.. I also tried to manually configure
"rgl" and got
an error message (please see below for the verbatim output). 
Would highly

any further ideas/suggestions!

*In my system, "GL" library is present under "/usr/include/GL"*


That's the include file.  The error is saying you don't have
libGL.so, which it is looking for in /usr/lib/x86_64-linux-gnu.  Do
you have that file?  Is it there, and marked as executable?

It's probably a symbolic link; on an old Ubuntu system I just
checked, it points to mesa/libGL.so, which is also a symlink,
pointing to mesa/libGL.so.1.2.0, which is executable.

Duncan Murdoch



Here are the libraries available (as suggested by Rolf)

After installing some of them, I continue to get the same error
message,
please below the output messages in config.log after I ran
"./configure")


"ii  r-cran-rgl                            0.93.996-1
          amd64        GNU R package for three-dimensional
visualisation
using OpenGL"

"ii  libegl1-mesa:amd64                    10.1.3-0ubuntu0.6
         amd64        free implementation of the EGL API -- runtime"

"ii  libegl1-mesa-dev                      10.1.3-0ubuntu0.6
         amd64        free implementation of the EGL API --
development files"

"ii  libegl1-mesa-drivers:amd64            10.1.3-0ubuntu0.6
         amd64        free implementation of the EGL API --
hardware drivers"

"ii  libgl1-mesa-dev                       10.1.3-0ubuntu0.6
         amd64        free implementation of the OpenGL API -- GLX
development files"

"ii  libgl1-mesa-dri:amd64                 10.1.3-0ubuntu0.6
         amd64        free implementation of the OpenGL API --
DRI modules"


"ii  libgl1-mesa-glx:amd64                 10.1.3-0ubuntu0.6
         amd64        free implementation of the OpenGL API --
GLX runtime"


"ii  libglapi-mesa:amd64                   10.1.3-0ubuntu0.6
         amd64        free implementation of the GL API --
shared library"

"ii  libglu1-mesa:amd64                    9.0.0-2
         amd64        Mesa OpenGL utility library (GLU)"

"ii  libglu1-mesa-dev                      9.0.0-2
         amd64        Mesa OpenGL utility library -- development
files"

"ii  libwayland-client0:amd64              1.4.0-1ubuntu1
          amd64        wayland compositor infrastructure -
client library"

"ii  libwayland-cursor0:amd64              1.4.0-1ubuntu1
          amd64        wayland compositor infrastructure -
cursor library"

"ii  libwayland-dev                        1.4.0-1ubuntu1
          amd64        wayland compositor infrastructure -
development files"

"ii  libwayland-egl1-mesa:amd64            10.1.3-0ubuntu0.6
         amd64        implementation of the Wayland EGL platform
-- runtime"

"ii  libwayland-server0:amd64              1.4.0-1ubuntu1
          amd64        wayland compositor infrastructure -
server library"

"ii  mesa-common-dev                       10.1.3-0ubuntu0.6
         amd64        Developer documentation for Mesa"

"ii  mesa-vdpau-drivers:amd64              10.1.3-0ubuntu0.6
         amd64        Mesa VDPAU video acceleration drivers"

"ii  mesa-utils                            8.1.0-2
         amd64        Miscellaneous Mesa GL utilities"


The error message when installing "rgl" library,

* installing *source* package ‘rgl’ ...

checking for gcc... gcc -std=gnu99

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix o

Re: [R] installing "rgl" package

2017-11-24 Thread Santosh
Hi Duncan, and others..

Yes, below are the search results. it is linked to mesa/libGL.so and is
again point to libGL.so -> libGL.so.1.2.0 . However, I could not find
libGL.so.1.2.0 or its source. Where is libGL.so.1.2.0 expected to be
located?


/usr/lib/libGL.so.1

/usr/lib/x86_64-linux-gnu/libGL.so
/usr/lib/x86_64-linux-gnu/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so


Thanks again,
Santosh

On Fri, Nov 24, 2017 at 12:39 PM, Duncan Murdoch 
wrote:

> On 24/11/2017 2:30 PM, Santosh wrote:
>
>> Hi All, Duncan, Rolf, Ista, DIrk,
>>
>> Thanks for the suggestions and I tried all of them (as suggested by
>> Duncan,
>> Rolf, Ista and Dirk)... I still get similar error as before while
>> installing 'rgl' package.. I also tried to manually configure "rgl" and
>> got
>> an error message (please see below for the verbatim output).  Would highly
>> any further ideas/suggestions!
>>
>> *In my system, "GL" library is present under "/usr/include/GL"*
>>
>
> That's the include file.  The error is saying you don't have libGL.so,
> which it is looking for in /usr/lib/x86_64-linux-gnu.  Do you have that
> file?  Is it there, and marked as executable?
>
> It's probably a symbolic link; on an old Ubuntu system I just checked, it
> points to mesa/libGL.so, which is also a symlink, pointing to
> mesa/libGL.so.1.2.0, which is executable.
>
> Duncan Murdoch
>
>
>
>> Here are the libraries available (as suggested by Rolf)
>>
>> After installing some of them, I continue to get the same error message,
>> please below the output messages in config.log after I ran "./configure")
>>
>>
>> "ii  r-cran-rgl0.93.996-1
>>  amd64GNU R package for three-dimensional visualisation
>> using OpenGL"
>>
>> "ii  libegl1-mesa:amd6410.1.3-0ubuntu0.6
>> amd64free implementation of the EGL API -- runtime"
>>
>> "ii  libegl1-mesa-dev  10.1.3-0ubuntu0.6
>> amd64free implementation of the EGL API -- development
>> files"
>>
>> "ii  libegl1-mesa-drivers:amd6410.1.3-0ubuntu0.6
>> amd64free implementation of the EGL API -- hardware
>> drivers"
>>
>> "ii  libgl1-mesa-dev   10.1.3-0ubuntu0.6
>> amd64free implementation of the OpenGL API -- GLX
>> development files"
>>
>> "ii  libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.6
>> amd64free implementation of the OpenGL API -- DRI modules"
>>
>>
>> "ii  libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.6
>> amd64free implementation of the OpenGL API -- GLX runtime"
>>
>>
>> "ii  libglapi-mesa:amd64   10.1.3-0ubuntu0.6
>> amd64free implementation of the GL API -- shared library"
>>
>> "ii  libglu1-mesa:amd649.0.0-2
>> amd64Mesa OpenGL utility library (GLU)"
>>
>> "ii  libglu1-mesa-dev  9.0.0-2
>> amd64Mesa OpenGL utility library -- development files"
>>
>> "ii  libwayland-client0:amd64  1.4.0-1ubuntu1
>>  amd64wayland compositor infrastructure - client library"
>>
>> "ii  libwayland-cursor0:amd64  1.4.0-1ubuntu1
>>  amd64wayland compositor infrastructure - cursor library"
>>
>> "ii  libwayland-dev1.4.0-1ubuntu1
>>  amd64wayland compositor infrastructure - development
>> files"
>>
>> "ii  libwayland-egl1-mesa:amd6410.1.3-0ubuntu0.6
>> amd64implementation of the Wayland EGL platform --
>> runtime"
>>
>> "ii  libwayland-server0:amd64  1.4.0-1ubuntu1
>>  amd64wayland compositor infrastructure - server library"
>>
>> "ii  mesa-common-dev   10.1.3-0ubuntu0.6
>> amd64Developer documentation for Mesa"
>>
>> "ii  mesa-vdpau-drivers:amd64  10.1.3-0ubuntu0.6
>> amd64Mesa VDPAU video acceleration drivers"
>>
>> "ii  mesa-utils8.1.0-2
>> amd64Miscellaneous Mesa GL utilities"
>>
>>
>> The error message when installing "rgl" library,
>>
>> * installing *source* package ‘rgl’ ...
>>
>> checking for gcc... gcc -std=gnu99
>>
>> checking whether the C compiler works... yes
>>
>> checking for C compiler default output file name... a.out
>>
>> checking for suffix of executables...
>>
>> checking whether we are cross compiling... no
>>
>> checking for suffix of object files... o
>>
>> checking whether we are using the GNU C compiler... yes
>>
>> checking whether gcc -std=gnu99 accepts -g... yes
>>
>> checking for gcc -std=gnu99 option to accept ISO C89... none needed
>>
>> checking how to run the C preprocessor... gcc -std=gnu99 -E
>>
>> checking for gcc... (cached) gcc -std=gnu99
>>
>> checking whether we are using the GNU C compiler... (cached) yes
>>
>> checking whether gcc -std=gnu99 accepts -g... (cached) yes
>>
>> checking for gcc -std=gnu99 optio

Re: [R] Multiple sets of proportion tests

2017-11-24 Thread Thierry Onkelinx
Hi anonymous,

?prop.test states that it returns a list. And one of the element is
'p.value'.  str() on the output of prop.test() reveals that too. So
prop.test()$p.value or prop.test()["p.value"] should work.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkel...@inbo.be
Kliniekstraat 25, B-1070 Brussel
www.inbo.be

///
To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey
///


Van 14 tot en met 19 december 2017 verhuizen we uit onze vestiging in
Brussel naar het Herman Teirlinckgebouw op de site Thurn & Taxis.
Vanaf dan ben je welkom op het nieuwe adres: Havenlaan 88 bus 73, 1000 Brussel.

///



2017-11-24 12:09 GMT+01:00 Allaisone 1 :
>
> Hi all ,
>
>
> I have a dataframe  of 200 columns and 2 rows. The first row in each column 
> contains the frequency of cases in group I . The second row in each column 
> contains the frequency of cases in group II. The frequency of trails is a 
> fixed value for group I(e.g.200) and it is also another fixed values for 
> group II (e.g. 100). The dataset looks like this :-
>
>
>> Mydata
>
>
>   variable I  variable IIVariable 
> III  . 200
>
> Freq.of cases (gp I)  6493   9375   5524
>
> Freq. of cases (gpII) 509  462 54
>
>
>
> The result I need for the first column can be given using this code :
>
>
>  MyResultsI <- prop.test(Mydata$variable I ,c(200,100))
> for the second  column :-
> MyResultsII <- prop.test(Mydata$variable II ,c(200,100))  and so on ..
>
>
> I need to do the analysis for all columns and have only the columns with 
> significant p-value results to be written in the the third row under each 
> column so the final output has to be something like this :-
>
>
>   variable IVariable III  
> .
>
> Freq.of cases (gp I)  6493   5524
>
> Freq. of cases (gpII) 509  54
>
> p-values  0.02   0.010
>
> Note, for example, that the 2nd column has bee removed as it resulted in a 
> non-significant p-value result while col 1 and col 3 were included since 
> p-value is less than 0.05.
>
> I'm not sure how to get the p-values only without other details but for the 
> analysis itself , I believe it can be done with apply() function but its not 
> clear to me how to specify the 2nd argument(n=samlpe sizes) in the prop.test.
>
>  MyResults <- apply(Mydata, 2, function(x)prop.test(Mydata,c(200,100))
>
> How can I modify the "n" argument part to solve the issue of non-equivalent 
> length between "x" and "n" ?. How can I modify this further to return only 
> significant p-values results ?. Any help would be very appreciated ..
>
> Regards
>
> [[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] number to volume weighted distribution

2017-11-24 Thread Thierry Onkelinx
Hi Petr,

I think that Duncan suggests something like this:

x<- c(rep(10,20), rep(300,5), rep(100, 10))
tx <- table(x)

prop.x <- tx / sum(tx)
vx <- as.integer(names(tx))
prop.wx <- tx * vx / sum(tx * vx)

plot(ecdf(x))
plot(vx, cumsum(prop.x), ylim = 0:1)
plot(vx, cumsum(prop.wx), ylim = 0:1)

Best regards,

Thierry

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkel...@inbo.be
Kliniekstraat 25, B-1070 Brussel
www.inbo.be

///
To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey
///


Van 14 tot en met 19 december 2017 verhuizen we uit onze vestiging in
Brussel naar het Herman Teirlinckgebouw op de site Thurn & Taxis.
Vanaf dan ben je welkom op het nieuwe adres: Havenlaan 88 bus 73, 1000 Brussel.

///



2017-11-24 14:30 GMT+01:00 PIKAL Petr :
> Hi Duncan
>
> I tried Ecdf and/or wtd.quantile from Hmisc and it is working (probably).
> Ecdf(x, q=.5)
> Ecdf(x, weights=xw,col=2, add=T, q=.5)
> wtd.quantile(x)
>   0%  25%  50%  75% 100%
>   10   10   10  100  300
> wtd.quantile(x, weights=xw, type="i/n")
>   0%  25%  50%  75% 100%
>  10. 138.8667 192.5778 246.2889 300.
>
> But could you please be more specific in this?
>
>> But you seem to be asking about a
>> definition rather than a function:  it is obtained simply by normalizing the
>> weights to sum to 1, then evaluating cumulative sums of them.
>
> Actually, when I correctly calculate weights
>
> xw <- (x^3)/sum(x^3)
> sum(xw) equals to 1
>
> but how can I plot ecdf with volume weighted data. Obviously
>
> ecdf(x*xw) or ecdf(x^3*xw) is not correct.
>
> Cheers
> Petr
>
>> -Original Message-
>> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
>> Sent: Friday, November 24, 2017 12:36 PM
>> To: PIKAL Petr ; r-help@r-project.org
>> Subject: Re: [R] number to volume weighted distribution
>>
>> On 24/11/2017 6:27 AM, PIKAL Petr wrote:
>> > Dear all
>> >
>> > Strictly speaking it is not R question but as you are the most capable 
>> > persons I
>> know I give it a try.
>> >
>> > I am strugling with recalculation of number weighted to volume weighted
>> distribution.
>> >
>> > Suppose I have objects (cubes) with size
>> >
>> > x<- c(rep(10,20), rep(100, 10), rep(300,5)) I can get
>> >
>> > plot(ecdf(x))
>> >
>> > or the number weighted average
>> >
>> > mean(x)
>> > [1] 77.14286
>> >
>> > or volume weighted average
>> > weighted.mean(x, (x/sum(x^3)))
>> > [1] 204.
>> >
>> > However I am struggling with volume weighted ecdf.
>> >
>> > Can you please give me some hints?
>>
>> I believe base R doesn't have a function for this, but Google says it exists 
>> in a
>> couple of packages:  spatstat, Hmisc.  But you seem to be asking about a
>> definition rather than a function:  it is obtained simply by normalizing the
>> weights to sum to 1, then evaluating cumulative sums of them.
>>
>> Duncan Murdoch
>
> 
> Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou 
> určeny pouze jeho adresátům.
> Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
> jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
> svého systému.
> Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
> jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
> Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
> zpožděním přenosu e-mailu.
>
> V případě, že je tento e-mail součástí obchodního jednání:
> - vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, 
> a to z jakéhokoliv důvodu i bez uvedení důvodu.
> - a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
> Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany 
> příjemce s dodatkem či odchylkou.
> - trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
> dosažením shody na všech jejích náležitostech.
> - odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
> žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
> pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu 
> případně osobě, ktero

Re: [R] installing "rgl" package

2017-11-24 Thread Duncan Murdoch

On 24/11/2017 2:30 PM, Santosh wrote:

Hi All, Duncan, Rolf, Ista, DIrk,

Thanks for the suggestions and I tried all of them (as suggested by Duncan,
Rolf, Ista and Dirk)... I still get similar error as before while
installing 'rgl' package.. I also tried to manually configure "rgl" and got
an error message (please see below for the verbatim output).  Would highly
any further ideas/suggestions!

*In my system, "GL" library is present under "/usr/include/GL"*


That's the include file.  The error is saying you don't have libGL.so, 
which it is looking for in /usr/lib/x86_64-linux-gnu.  Do you have that 
file?  Is it there, and marked as executable?


It's probably a symbolic link; on an old Ubuntu system I just checked, 
it points to mesa/libGL.so, which is also a symlink, pointing to 
mesa/libGL.so.1.2.0, which is executable.


Duncan Murdoch




Here are the libraries available (as suggested by Rolf)

After installing some of them, I continue to get the same error message,
please below the output messages in config.log after I ran "./configure")


"ii  r-cran-rgl0.93.996-1
 amd64GNU R package for three-dimensional visualisation
using OpenGL"

"ii  libegl1-mesa:amd6410.1.3-0ubuntu0.6
amd64free implementation of the EGL API -- runtime"

"ii  libegl1-mesa-dev  10.1.3-0ubuntu0.6
amd64free implementation of the EGL API -- development files"

"ii  libegl1-mesa-drivers:amd6410.1.3-0ubuntu0.6
amd64free implementation of the EGL API -- hardware drivers"

"ii  libgl1-mesa-dev   10.1.3-0ubuntu0.6
amd64free implementation of the OpenGL API -- GLX
development files"

"ii  libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.6
amd64free implementation of the OpenGL API -- DRI modules"


"ii  libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.6
amd64free implementation of the OpenGL API -- GLX runtime"


"ii  libglapi-mesa:amd64   10.1.3-0ubuntu0.6
amd64free implementation of the GL API -- shared library"

"ii  libglu1-mesa:amd649.0.0-2
amd64Mesa OpenGL utility library (GLU)"

"ii  libglu1-mesa-dev  9.0.0-2
amd64Mesa OpenGL utility library -- development files"

"ii  libwayland-client0:amd64  1.4.0-1ubuntu1
 amd64wayland compositor infrastructure - client library"

"ii  libwayland-cursor0:amd64  1.4.0-1ubuntu1
 amd64wayland compositor infrastructure - cursor library"

"ii  libwayland-dev1.4.0-1ubuntu1
 amd64wayland compositor infrastructure - development files"

"ii  libwayland-egl1-mesa:amd6410.1.3-0ubuntu0.6
amd64implementation of the Wayland EGL platform -- runtime"

"ii  libwayland-server0:amd64  1.4.0-1ubuntu1
 amd64wayland compositor infrastructure - server library"

"ii  mesa-common-dev   10.1.3-0ubuntu0.6
amd64Developer documentation for Mesa"

"ii  mesa-vdpau-drivers:amd64  10.1.3-0ubuntu0.6
amd64Mesa VDPAU video acceleration drivers"

"ii  mesa-utils8.1.0-2
amd64Miscellaneous Mesa GL utilities"


The error message when installing "rgl" library,

* installing *source* package ‘rgl’ ...

checking for gcc... gcc -std=gnu99

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc -std=gnu99 accepts -g... yes

checking for gcc -std=gnu99 option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -std=gnu99 -E

checking for gcc... (cached) gcc -std=gnu99

checking whether we are using the GNU C compiler... (cached) yes

checking whether gcc -std=gnu99 accepts -g... (cached) yes

checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed

checking for libpng-config... yes

configure: using libpng-config

configure: using libpng dynamic linkage

checking for X... libraries , headers

checking GL/gl.h usability... yes

checking GL/gl.h presence... yes

checking for GL/gl.h... yes

checking GL/glu.h usability... yes

checking GL/glu.h presence... yes

checking for GL/glu.h... yes

checking for glEnd in -lGL... no

configure: error: missing required library GL

ERROR: configuration failed for package ‘rgl’

* removing ‘/data/R/lib/rgl’

Warning in install.packages :

   installation of package ‘rgl’ had non-zero exit status


The error message as seen in config.log (after manually running
"./configure" under "rgl")

configure:4263: checking for glEnd in -l

Re: [R] installing "rgl" package

2017-11-24 Thread Santosh
Hi All, Duncan, Rolf, Ista, DIrk,

Thanks for the suggestions and I tried all of them (as suggested by Duncan,
Rolf, Ista and Dirk)... I still get similar error as before while
installing 'rgl' package.. I also tried to manually configure "rgl" and got
an error message (please see below for the verbatim output).  Would highly
any further ideas/suggestions!

*In my system, "GL" library is present under "/usr/include/GL"*

Here are the libraries available (as suggested by Rolf)

After installing some of them, I continue to get the same error message,
please below the output messages in config.log after I ran "./configure")


"ii  r-cran-rgl0.93.996-1
amd64GNU R package for three-dimensional visualisation
using OpenGL"

"ii  libegl1-mesa:amd6410.1.3-0ubuntu0.6
   amd64free implementation of the EGL API -- runtime"

"ii  libegl1-mesa-dev  10.1.3-0ubuntu0.6
   amd64free implementation of the EGL API -- development files"

"ii  libegl1-mesa-drivers:amd6410.1.3-0ubuntu0.6
   amd64free implementation of the EGL API -- hardware drivers"

"ii  libgl1-mesa-dev   10.1.3-0ubuntu0.6
   amd64free implementation of the OpenGL API -- GLX
development files"

"ii  libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.6
   amd64free implementation of the OpenGL API -- DRI modules"


"ii  libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.6
   amd64free implementation of the OpenGL API -- GLX runtime"


"ii  libglapi-mesa:amd64   10.1.3-0ubuntu0.6
   amd64free implementation of the GL API -- shared library"

"ii  libglu1-mesa:amd649.0.0-2
   amd64Mesa OpenGL utility library (GLU)"

"ii  libglu1-mesa-dev  9.0.0-2
   amd64Mesa OpenGL utility library -- development files"

"ii  libwayland-client0:amd64  1.4.0-1ubuntu1
amd64wayland compositor infrastructure - client library"

"ii  libwayland-cursor0:amd64  1.4.0-1ubuntu1
amd64wayland compositor infrastructure - cursor library"

"ii  libwayland-dev1.4.0-1ubuntu1
amd64wayland compositor infrastructure - development files"

"ii  libwayland-egl1-mesa:amd6410.1.3-0ubuntu0.6
   amd64implementation of the Wayland EGL platform -- runtime"

"ii  libwayland-server0:amd64  1.4.0-1ubuntu1
amd64wayland compositor infrastructure - server library"

"ii  mesa-common-dev   10.1.3-0ubuntu0.6
   amd64Developer documentation for Mesa"

"ii  mesa-vdpau-drivers:amd64  10.1.3-0ubuntu0.6
   amd64Mesa VDPAU video acceleration drivers"

"ii  mesa-utils8.1.0-2
   amd64Miscellaneous Mesa GL utilities"


The error message when installing "rgl" library,

* installing *source* package ‘rgl’ ...

checking for gcc... gcc -std=gnu99

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc -std=gnu99 accepts -g... yes

checking for gcc -std=gnu99 option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -std=gnu99 -E

checking for gcc... (cached) gcc -std=gnu99

checking whether we are using the GNU C compiler... (cached) yes

checking whether gcc -std=gnu99 accepts -g... (cached) yes

checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed

checking for libpng-config... yes

configure: using libpng-config

configure: using libpng dynamic linkage

checking for X... libraries , headers

checking GL/gl.h usability... yes

checking GL/gl.h presence... yes

checking for GL/gl.h... yes

checking GL/glu.h usability... yes

checking GL/glu.h presence... yes

checking for GL/glu.h... yes

checking for glEnd in -lGL... no

configure: error: missing required library GL

ERROR: configuration failed for package ‘rgl’

* removing ‘/data/R/lib/rgl’

Warning in install.packages :

  installation of package ‘rgl’ had non-zero exit status


The error message as seen in config.log (after manually running
"./configure" under "rgl")

configure:4263: checking for glEnd in -lGL
configure:4288: gcc -std=gnu99 -o conftest -g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -g  -DHAVE_PNG_H -I/usr/include/libpng12
conftest.c -lGL   -L/usr/lib/x86_64-linux-gnu -lpng12 -lX11
>&5*/*usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
configure:4288: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME 

Re: [R] libPaths displays truncated path?

2017-11-24 Thread Loris Bennett
peter dalgaard  writes:

[snip (40 lines)]

>> I don't quite understand the point about cause and effect.  If
>> normalizePath changes the symbolic link from
>> 
>>  /cm/shared/apps/R/site-library/3.4.2
>> 
>> to the actual directory
>> 
>>  /cm/shared/apps/R/site-library/3.4
>> 
>> in libPaths, why does R fail to find the packages *unless* the symbolic
>> link exists?
>
>
> I was unclear/confused about that. I somehow got the impression that
> the symlink was the cause of the problem that it solved, but that is
> not true.
>
> AFAICT there are two scenarios
>
> Ground facts:
>
> library is in  .../3.4
> you're trying to add .../3.4.2 using .libPaths
>
> (A) no symlink:
>
> Actual libpath will have .../3.4.2 which isn't there --> FAIL
>
> (B) symlink in place
>
> Actual libpath normalized to use .../3.4 which is there --> SUCCESS
>
> If normalizePath hadn't been applied, (B) would still succeed, the
> libpath would be to 3.4.2 which exists as a link to 3.4 and (A) would
> still fail because you are fundamentally looking in the wrong place.
>
> -pd

Now I understand.  I had scenario A and FAIL, then added the symbolic
link to get B and SUCCESS, whereby normalizePath means that the actual
directory and not the symbolic link is being used.

It all makes sense now (in an odd sort of way).  Thank you.

[snip (13 lines)]

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de

__
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] number to volume weighted distribution

2017-11-24 Thread PIKAL Petr
Hi Duncan

I tried Ecdf and/or wtd.quantile from Hmisc and it is working (probably).
Ecdf(x, q=.5)
Ecdf(x, weights=xw,col=2, add=T, q=.5)
wtd.quantile(x)
  0%  25%  50%  75% 100%
  10   10   10  100  300
wtd.quantile(x, weights=xw, type="i/n")
  0%  25%  50%  75% 100%
 10. 138.8667 192.5778 246.2889 300.

But could you please be more specific in this?

> But you seem to be asking about a
> definition rather than a function:  it is obtained simply by normalizing the
> weights to sum to 1, then evaluating cumulative sums of them.

Actually, when I correctly calculate weights

xw <- (x^3)/sum(x^3)
sum(xw) equals to 1

but how can I plot ecdf with volume weighted data. Obviously

ecdf(x*xw) or ecdf(x^3*xw) is not correct.

Cheers
Petr

> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
> Sent: Friday, November 24, 2017 12:36 PM
> To: PIKAL Petr ; r-help@r-project.org
> Subject: Re: [R] number to volume weighted distribution
>
> On 24/11/2017 6:27 AM, PIKAL Petr wrote:
> > Dear all
> >
> > Strictly speaking it is not R question but as you are the most capable 
> > persons I
> know I give it a try.
> >
> > I am strugling with recalculation of number weighted to volume weighted
> distribution.
> >
> > Suppose I have objects (cubes) with size
> >
> > x<- c(rep(10,20), rep(100, 10), rep(300,5)) I can get
> >
> > plot(ecdf(x))
> >
> > or the number weighted average
> >
> > mean(x)
> > [1] 77.14286
> >
> > or volume weighted average
> > weighted.mean(x, (x/sum(x^3)))
> > [1] 204.
> >
> > However I am struggling with volume weighted ecdf.
> >
> > Can you please give me some hints?
>
> I believe base R doesn't have a function for this, but Google says it exists 
> in a
> couple of packages:  spatstat, Hmisc.  But you seem to be asking about a
> definition rather than a function:  it is obtained simply by normalizing the
> weights to sum to 1, then evaluating cumulative sums of them.
>
> Duncan Murdoch


Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny 
pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
zpožděním přenosu e-mailu.

V případě, že je tento e-mail součástí obchodního jednání:
- vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a 
to z jakéhokoliv důvodu i bez uvedení důvodu.
- a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce 
s dodatkem či odchylkou.
- trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
dosažením shody na všech jejích náležitostech.
- odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně 
osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi 
či osobě jím zastoupené známá.

This e-mail and any documents attached to it may be confidential and are 
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its sender. 
Delete the contents of this e-mail with all attachments and its copies from 
your system.
If you are not the intended recipient of this e-mail, you are not authorized to 
use, disseminate, copy or disclose this e-mail in any manner.
The sender of this e-mail shall not be liable for any possible damage caused by 
modifications of the e-mail or by delay with transfer of the email.

In case that this e-mail forms part of business dealings:
- the sender reserves the right to end negotiations about entering into a 
contract in any time, for any reason, and without stating any reasoning.
- if the e-mail contains an offer, the recipient is entitled to immediately 
accept such offer; The sender of this e-mail (offer) excludes any acceptance of 
the offer on the part of the recipient containing any amendment or variation.
- the sender insists on that the respective contract is concluded only upon an 
express mutual agreement on all its aspects.
- the sender of this e-mail informs that he/she is not authorized to enter into 
any contracts on behalf of the company except for cases in which he/she is 
expressly authorized to do so in writing, and such authorization or power of 
attorney is submitted to the recipient or the person represented by the 
recipient, or the existence of such authorization is known to the recipient of 
the person represented by the recipient.
__
R-he

Re: [R] installing "rgl" package

2017-11-24 Thread Dirk Eddelbuettel

On 23 November 2017 at 15:05, Santosh wrote:
| I am trying to install 'rgl' package in Ubuntu.. Would highly appreciate
| your assistance .. I tried several leads available on various discussion
| fora and nothing helped so far.

Install the _pre-built binary package_ via

sudo apt install r-cran-rgl

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.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] installing "rgl" package

2017-11-24 Thread Ista Zahn
On Nov 23, 2017 6:16 PM, "Duncan Murdoch"  wrote:

On 23/11/2017 6:05 PM, Santosh wrote:

> Hi Rxperts,
> I am trying to install 'rgl' package in Ubuntu.. Would highly appreciate
> your assistance .. I tried several leads available on various discussion
> fora and nothing helped so far.
>

Your message is really hard to follow, since you posted in HTML.  You need
the OpenGL development packages.  On Ubuntu, that probably means MesaGL,
but I don't know the names of the development packages.


Fortunately there is no need to memorize them:

apt-get build-dep r-cran-rgl

should be all you need.


Duncan Murdoch



>
> * installing *source* package ‘rgl’ ...checking for gcc... gcc -std=gnu99
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -std=gnu99 accepts -g... yes
> checking for gcc -std=gnu99 option to accept ISO C89... none needed
> checking how to run the C preprocessor... gcc -std=gnu99 -E
> checking for gcc... (cached) gcc -std=gnu99
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc -std=gnu99 accepts -g... (cached) yes
> checking for gcc -std=gnu99 option to accept ISO C89... (cached) none
> needed
> checking for libpng-config... yes
> configure: using libpng-config
> configure: using libpng dynamic linkage
> checking for X... libraries , headers
> checking GL/gl.h usability... yes
> checking GL/gl.h presence... yes
> checking for GL/gl.h... yes
> checking GL/glu.h usability... yes
> checking GL/glu.h presence... yes
> checking for GL/glu.h... yes
> checking for glEnd in -lGL... noconfigure: error: missing required
> library GLERROR: configuration failed for package ‘rgl’* removing
> ‘/data/R/lib/rgl’Warning in install.packages :
>installation of package ‘rgl’ had non-zero exit status
>
> Checking the system dependencies based on README..
>
> system('dpkg -l |grep  libgl1')ii  libgl1-mesa-dev
>10.1.3-0ubuntu0.6   amd64free
> implementation of the OpenGL API -- GLX development files
>
> system('dpkg -l |grep  libglu1')ii  libglu1-mesa:amd64
>> 9.0.0-2 amd64Mesa OpenGL utility
>> library (GLU)
>>
> ii  libglu1-mesa-dev  9.0.0-2
> amd64Mesa OpenGL utility library -- development
> files
>
> system('dpkg -l |grep  libpng')ii  libpng12-0:amd64
>> 1.2.50-1ubuntu2.14.04.2 amd64PNG library - runtime
>>
> ii  libpng12-dev  1.2.50-1ubuntu2.14.04.2
> amd64PNG library - development
>
> I also tried installing .. using the following command..
> install.packages("rgl",dep=T,
> INSTALL_opts="--no-multiarch",
> configure.args=c(rgl="--with-gl-includes=/usr/include/GL"))
>
> Thanks so much for your help!
> Santosh
>
> [[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/posti
> ng-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.

[[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] number to volume weighted distribution

2017-11-24 Thread Duncan Murdoch

On 24/11/2017 6:27 AM, PIKAL Petr wrote:

Dear all

Strictly speaking it is not R question but as you are the most capable persons 
I know I give it a try.

I am strugling with recalculation of number weighted to volume weighted 
distribution.

Suppose I have objects (cubes) with size

x<- c(rep(10,20), rep(100, 10), rep(300,5))
I can get

plot(ecdf(x))

or the number weighted average

mean(x)
[1] 77.14286

or volume weighted average
weighted.mean(x, (x/sum(x^3)))
[1] 204.

However I am struggling with volume weighted ecdf.

Can you please give me some hints?


I believe base R doesn't have a function for this, but Google says it 
exists in a couple of packages:  spatstat, Hmisc.  But you seem to be 
asking about a definition rather than a function:  it is obtained simply 
by normalizing the weights to sum to 1, then evaluating cumulative sums 
of them.


Duncan Murdoch

__
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] number to volume weighted distribution

2017-11-24 Thread PIKAL Petr
Dear all

Strictly speaking it is not R question but as you are the most capable persons 
I know I give it a try.

I am strugling with recalculation of number weighted to volume weighted 
distribution.

Suppose I have objects (cubes) with size

x<- c(rep(10,20), rep(100, 10), rep(300,5))
I can get

plot(ecdf(x))

or the number weighted average

mean(x)
[1] 77.14286

or volume weighted average
weighted.mean(x, (x/sum(x^3)))
[1] 204.

However I am struggling with volume weighted ecdf.

Can you please give me some hints?

Cheers
Petr



Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny 
pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
zpožděním přenosu e-mailu.

V případě, že je tento e-mail součástí obchodního jednání:
- vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a 
to z jakéhokoliv důvodu i bez uvedení důvodu.
- a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce 
s dodatkem či odchylkou.
- trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
dosažením shody na všech jejích náležitostech.
- odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně 
osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi 
či osobě jím zastoupené známá.

This e-mail and any documents attached to it may be confidential and are 
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its sender. 
Delete the contents of this e-mail with all attachments and its copies from 
your system.
If you are not the intended recipient of this e-mail, you are not authorized to 
use, disseminate, copy or disclose this e-mail in any manner.
The sender of this e-mail shall not be liable for any possible damage caused by 
modifications of the e-mail or by delay with transfer of the email.

In case that this e-mail forms part of business dealings:
- the sender reserves the right to end negotiations about entering into a 
contract in any time, for any reason, and without stating any reasoning.
- if the e-mail contains an offer, the recipient is entitled to immediately 
accept such offer; The sender of this e-mail (offer) excludes any acceptance of 
the offer on the part of the recipient containing any amendment or variation.
- the sender insists on that the respective contract is concluded only upon an 
express mutual agreement on all its aspects.
- the sender of this e-mail informs that he/she is not authorized to enter into 
any contracts on behalf of the company except for cases in which he/she is 
expressly authorized to do so in writing, and such authorization or power of 
attorney is submitted to the recipient or the person represented by the 
recipient, or the existence of such authorization is known to the recipient of 
the person represented by the recipient.
__
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] Using bartMachine with the caret package

2017-11-24 Thread Patrick Connolly
Dave Langer in this video https://www.youtube.com/watch?v=z8PRU46I3NY
uses the titanic data as an example of using caret to create xgbTree
models.  The caret train() function has a tuneGrid parameter which
takes a list set up like so:

tune.grid <- expand.grid(eta = c(0.05, 0.075, 0.1),
 nrounds = c(50, 75, 100),
 max_depth = 6:8,
 min_child_weight = c(2, 2.25, 2.5),
 colsample_bytree = (3:5)/10,
 gamma = 0, subsample = 1)

That approach also worked with my data.  By making the corresponding
adjustments, I was also successful with gbm, bstTree and extraTree
models but I can't get it to work with bartMachine models. I get
dozens of messages like these:

bartMachine initializing with 50 trees...
bartMachine vars checked...
bartMachine java init...
bartMachine factors created...
bartMachine before preprocess...
bartMachine after preprocess... 19 total features...
bartMachine sigsq estimated...
bartMachine initializing with 30 trees...
bartMachine vars checked...
bartMachine java init...
bartMachine factors created...
bartMachine before preprocess...
bartMachine after preprocess... 19 total features...
bartMachine sigsq estimated...

[...]

And eventually,  this:

Something is wrong; all the RMSE metric values are missing:
  RMSERsquaredMAE 
 Min.   : NA   Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA   Max.   : NA  
 NA's   :2 NA's   :2 NA's   :2


If I omit the tuneGrid parameter, I get a model and predictions
comparable to those from the other models.  If I could tune the
parameters I would possibly get better predictions.

Possibly relevant is the fact that formula method of defining the
model seems not to work.  I had to use the method of supplying x and y
specifically.  I couldn't find how to use the 'recipe' method.  All
the specific links in the help files were dead.

Any suggestions welcome.

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
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] Fw: modified mankendal

2017-11-24 Thread Jim Lemon
Hi Elham,
The error message:

Error in if (S == 0) { : missing value where TRUE/FALSE needed

means that for at least one S, the value is missing. The best advice I
can give you is to load the data frame X1 as in your code above, and
try something like:

which.na<-function(x) return(which(is.na(x)))
sapply(X1,which.na)

You will then get a list of the positions of any NA values in X1.

Jim

On Fri, Nov 24, 2017 at 7:45 PM, Elham Fakharizade  wrote:
> Hello Dear Jim
> Thanks for your answering
> I have more than 65000 data in my file I search for NA or NAN but nothing
> find. how can I search for missing value?
> Sincerely yours
> Elham
>
> Elham Fakharizadeshirazi.
>
> Doctoral guest researcher in Institute of Meteorology,
>
> Department of Earth Sciences,
>
> Free university of Berlin,
>
> Berlin, Germany.
>
>
>
> On Friday, November 24, 2017, 4:33:12 AM GMT+1, Jim Lemon
>  wrote:
>
>
> Hi Elham,
> The error message is pretty explicit. Check your dataset for missing values.
>
> Jim
>
> On Thu, Nov 23, 2017 at 6:14 AM, Elham Fakharizade via R-help
>  wrote:
>>
>>  Hello DearI used modifiedmk package for trend analyses.this is my script
>>  require(modifiedmk)X1<-read.table("c:/elham/first
>> article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
>> outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in
>> 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's
>> Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this
>> error:
>> Error in if (S == 0) { : missing value where TRUE/FALSE needed
>> would you please help me to solve itSincerely yoursElham
>
>>
>>
>>
>>[[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.