Re: [Rd] The XO laptop from the One Laptop Per Child (OLPC) program

2007-12-17 Thread Dirk Eddelbuettel

On 17 December 2007 at 18:03, Peter Dalgaard wrote:
| Douglas Bates wrote:
| > There was recently a question on the R-help list about the eee pc.  I
| > had a related question about the XO laptop from OLPC (laptop.org).
| > Has anyone looked at the development environment sufficiently to
| > determine if it would be possible to create an executable image for R?
| >  The laptop itself only supports Python, Javascript, etc. but it is
| > running a real Linux operating system.
| >
| >   
| It is Fedora based and x86 compatible, so it could be as simple as "yum
| install R".
| The potential pitfall is if that pulls in so many dependencies that you
| overflow the 1GB solid-state disk.

AFAIK you can emulate the "sugar" operating system used on the OLPC/XO on
Ubuntu and other Linux variants.  See
http://wiki.laptop.org/go/Sugar_on_Ubuntu_Linux 
Maybe Doug can get Sugar running on his dvd player?

Dirk

-- 
Three out of two people have difficulties with fractions.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wrong length of POSIXt vectors (PR#10507)

2007-12-17 Thread Tony Plate
Jeffrey J. Hallman wrote:
> Duncan Murdoch <[EMAIL PROTECTED]> writes:
>
>   
>> One reason I don't want to work on this is because the appropriate 
>> action depends on what "length(x)" is intended to mean.  Currently for 
>> POSIXlt objects, it gives the physical length of the underlying basic 
>> type (the list).  This is the same behaviour as we have for matrices, 
>> data frames and every other object without a specific length method, so 
>> it's not outrageous.
>>
>> The proposed change is to have it return the logical length of the 
>> object, which also seems quite reasonable.  I don't think matrices and 
>> data frames have a "logical length", so there would be no contradiction 
>> in those examples.  The thing that worries me is that there are probably 
>> objects in packages where both logical length and physical length make 
>> sense but are different.  I don't have any expectation that length(x) on 
>> those currently is consistent in which type of value it returns.
>>
>> If we were to decide that "length(x)" *always* meant logical length, 
>> then we would have a problem:  matrices and data frames don't have a 
>> logical length, so we shouldn't be getting an answer there.  Changing 
>> length(x) for those is not acceptable.
>>
>> On the other hand, if we decide that "length(x)" *always* means physical 
>> length, we don't need to do anything to the POSIXlt or matrices or data 
>> frames, but there may well be other kinds of objects out there that 
>> violate this rule.
>>
>> We could leave the meaning of length(x) ambiguous.  If you want to know 
>> what it does for a POSIXlt object, you need to read the documentation or 
>> look at the source code.  As a policy, this isn't particularly 
>> appealing, but I could probably live with it if someone else did the 
>> research and showed that current usage is ambiguous.
>> 
>
> Physical length and logical length are, as you say, two different things.  So
> why not two functions?  Keep length() for physical length, as it is now, and
> maybe Length() for logical length.  The latter could be defined as
>
> Length <- function(x, ...) UseMethod("Length")
>
> Length.default <- function(x, ...) length(x)
>
> and then add methods for classes that want something else.
>   
A very reasonable suggestion, but I'd also put this in the "next time we 
design a language" category.

The current system in R seems workable to me, if one knows that 
vector-like classes that have a S3 list-based implementation need to 
have methods defined for 'c', 'length', '[', etc, and that if these 
methods aren't defined, then you'll be operating on the underlying list 
structure.  Where these methods are defined, one can get at the 
underlying structure by unclassing first, and that's OK.  However, 
classes that have some of these methods defined but not others seem to 
me to be needlessly confusing -- it's not like there any great benefit 
that length() always returns the length of the underlying list for 
POSIXlt -- if there was a length() method one could get at the 
underlying length using length(unclass(x)).  It just seems like a design 
oversight that makes using such classes unnecessarily difficult and 
error-prone.

Hence my proposal (in a new thread) for coding & documentation 
guidelines that would that would:
(1) suggest consistency is a good thing
(2) suggent compliance or deviation should be documented
(3) define what consistency was (and here it's not so important to get 
absolutely the right set of consistency definitions as it is to get a 
reasonable set that people agree on.)

-- Tony Plate

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] The XO laptop from the One Laptop Per Child (OLPC) program

2007-12-17 Thread Peter Dalgaard
Douglas Bates wrote:
> There was recently a question on the R-help list about the eee pc.  I
> had a related question about the XO laptop from OLPC (laptop.org).
> Has anyone looked at the development environment sufficiently to
> determine if it would be possible to create an executable image for R?
>  The laptop itself only supports Python, Javascript, etc. but it is
> running a real Linux operating system.
>
>   
It is Fedora based and x86 compatible, so it could be as simple as "yum
install R".
The potential pitfall is if that pulls in so many dependencies that you
overflow the 1GB solid-state disk.

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] The XO laptop from the One Laptop Per Child (OLPC) program

2007-12-17 Thread Douglas Bates
There was recently a question on the R-help list about the eee pc.  I
had a related question about the XO laptop from OLPC (laptop.org).
Has anyone looked at the development environment sufficiently to
determine if it would be possible to create an executable image for R?
 The laptop itself only supports Python, Javascript, etc. but it is
running a real Linux operating system.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread Oleg Sklyar
RGtk2 is a packages that is a wrapper for GTK+ GUI toolkit. GTK+ itself
is a large separate software package. I do not know if GTK+ is delivered
within the RGtk2, but I doubt it as the former is quite big (at least
with my own package that uses GTK, users need to install GTK
separately). Now on Windows you can install GTK runtime environment as
any other application by downloading it from here:
http://gladewin32.sf.net and running a Windows-standard installation.
The default installation should be fine. After you have GTK installed,
reinstall the RGtk2 package if it does not work automatically. 

Actually I just checked http://www.ggobi.org/rgtk2/ and it says that
indeed you need to install GTK separately.

Best,
Oleg

On Mon, 2007-12-17 at 15:00 +0100, [EMAIL PROTECTED]
wrote:
> Full_Name: Caroline Keef
> Version: 2.6.1
> OS: Windows XP
> Submission from: (NULL) (195.171.203.131)
> 
> 
> I have tried to install the package rggobi which if I'm right requires the
> package RGtk2 
> If I install RGtk2 using the install.packages (I used the UK (Bristol) 
> mirror, I
> haven't tried any other mirror) within R and then use library(RGtk2) I get the
> following message box
> 
> "This application has failed to start because libtak-1.0-0.dll was not found. 
> Re-installing the application may fix this problem."
> 
> I click ok and the following is printed to the R console.
> 
> Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
> 
> 
> [1] "PLEASE RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN"
> Error in .C("R_gtkInit", length(args), x = args, PACKAGE = "RGtk2") : 
>   C symbol name "R_gtkInit" not in DLL for package "RGtk2"
> In addition: Warning message:
> In fun(...) :
>   Failed to load RGtk2 dynamic library:Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
> 
> 
> Error : .onLoad failed in 'loadNamespace' for 'RGtk2'
> Error: package/namespace load failed for 'RGtk2'
> 
> I've re-started R again and the same happened.  I've also tried downloading 
> the
> RGtk2 zip files from the CRAN website and installing from a local zip file
> option which gave the same results.  I haven't tried re-installing R to get
> around this problem.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wrong length of POSIXt vectors (PR#10507)

2007-12-17 Thread Jeffrey J. Hallman
Duncan Murdoch <[EMAIL PROTECTED]> writes:

> One reason I don't want to work on this is because the appropriate 
> action depends on what "length(x)" is intended to mean.  Currently for 
> POSIXlt objects, it gives the physical length of the underlying basic 
> type (the list).  This is the same behaviour as we have for matrices, 
> data frames and every other object without a specific length method, so 
> it's not outrageous.
>
> The proposed change is to have it return the logical length of the 
> object, which also seems quite reasonable.  I don't think matrices and 
> data frames have a "logical length", so there would be no contradiction 
> in those examples.  The thing that worries me is that there are probably 
> objects in packages where both logical length and physical length make 
> sense but are different.  I don't have any expectation that length(x) on 
> those currently is consistent in which type of value it returns.
>
> If we were to decide that "length(x)" *always* meant logical length, 
> then we would have a problem:  matrices and data frames don't have a 
> logical length, so we shouldn't be getting an answer there.  Changing 
> length(x) for those is not acceptable.
>
> On the other hand, if we decide that "length(x)" *always* means physical 
> length, we don't need to do anything to the POSIXlt or matrices or data 
> frames, but there may well be other kinds of objects out there that 
> violate this rule.
>
> We could leave the meaning of length(x) ambiguous.  If you want to know 
> what it does for a POSIXlt object, you need to read the documentation or 
> look at the source code.  As a policy, this isn't particularly 
> appealing, but I could probably live with it if someone else did the 
> research and showed that current usage is ambiguous.

Physical length and logical length are, as you say, two different things.  So
why not two functions?  Keep length() for physical length, as it is now, and
maybe Length() for logical length.  The latter could be defined as

Length <- function(x, ...) UseMethod("Length")

Length.default <- function(x, ...) length(x)

and then add methods for classes that want something else.

-- 
Jeff

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread ripley
This is not a bug, and not appropriate to R-bugs as it is about a 
contributed package.

>From http://cran.r-project.org/bin/windows/contrib/2.6/ReadMe you will see

   Package RGtk2 requires an installed version of Gtk2 with version
   number >= 2.10.11.

Now, so does GGobi and hence rggobi.  'Installed' includes ensuring they 
are on your path, so if GGobi works I would expect RGtk2 to.


On Mon, 17 Dec 2007, [EMAIL PROTECTED] wrote:

> Full_Name: Caroline Keef
> Version: 2.6.1
> OS: Windows XP
> Submission from: (NULL) (195.171.203.131)
>
>
> I have tried to install the package rggobi which if I'm right requires the
> package RGtk2
> If I install RGtk2 using the install.packages (I used the UK (Bristol) 
> mirror, I
> haven't tried any other mirror) within R and then use library(RGtk2) I get the
> following message box
>
> "This application has failed to start because libtak-1.0-0.dll was not found.
> Re-installing the application may fix this problem."
>
> I click ok and the following is printed to the R console.
>
> Error in dyn.load(file, ...) :
>  unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>  LoadLibrary failure:  The specified module could not be found.
>
>
> [1] "PLEASE RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN"
> Error in .C("R_gtkInit", length(args), x = args, PACKAGE = "RGtk2") :
>  C symbol name "R_gtkInit" not in DLL for package "RGtk2"
> In addition: Warning message:
> In fun(...) :
>  Failed to load RGtk2 dynamic library:Error in dyn.load(file, ...) :
>  unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>  LoadLibrary failure:  The specified module could not be found.
>
>
> Error : .onLoad failed in 'loadNamespace' for 'RGtk2'
> Error: package/namespace load failed for 'RGtk2'
>
> I've re-started R again and the same happened.  I've also tried downloading 
> the
> RGtk2 zip files from the CRAN website and installing from a local zip file
> option which gave the same results.  I haven't tried re-installing R to get
> around this problem.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote:
> Full_Name: Caroline Keef
> Version: 2.6.1
> OS: Windows XP
> Submission from: (NULL) (195.171.203.131)
>
>
> I have tried to install the package rggobi which if I'm right requires the
> package RGtk2 
> If I install RGtk2 using the install.packages (I used the UK (Bristol) 
> mirror, I
> haven't tried any other mirror) within R and then use library(RGtk2) I get the
> following message box
>
> "This application has failed to start because libtak-1.0-0.dll was not found. 
> Re-installing the application may fix this problem."
>
> I click ok and the following is printed to the R console.
>
> Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
>
>
> [1] "PLEASE RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN"
> Error in .C("R_gtkInit", length(args), x = args, PACKAGE = "RGtk2") : 
>   C symbol name "R_gtkInit" not in DLL for package "RGtk2"
> In addition: Warning message:
> In fun(...) :
>   Failed to load RGtk2 dynamic library:Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
>
>
> Error : .onLoad failed in 'loadNamespace' for 'RGtk2'
> Error: package/namespace load failed for 'RGtk2'
>
> I've re-started R again and the same happened.  I've also tried downloading 
> the
> RGtk2 zip files from the CRAN website and installing from a local zip file
> option which gave the same results.  I haven't tried re-installing R to get
> around this problem.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>   
This is a package problem, not an issue in R itself, hence you should
not use the bug report interface.

However, the error indicates reliance on an external library, which you
presumably haven't got, so retrying is not going to help anything. You
probably need to go to http://www.ggobi.org/rgtk2/ and follow the
instructions that start with "If you're on Windows..."

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread Duncan Murdoch
This isn't an R bug.  You should send contributed package problems to 
the package maintainer, in this case Michael Lawrence.

You need to install GTK; it's not included as part of the package.  See 
this page for instructions:

http://www.ggobi.org/rgtk2/

It would probably be a good idea for the R package to recognize this 
omission and print more helpful error messages, but setting that up is 
tricky.  Michael, if you want help, please contact me offline.

Duncan Murdoch

On 12/17/2007 9:00 AM, [EMAIL PROTECTED] wrote:
> Full_Name: Caroline Keef
> Version: 2.6.1
> OS: Windows XP
> Submission from: (NULL) (195.171.203.131)
> 
> 
> I have tried to install the package rggobi which if I'm right requires the
> package RGtk2 
> If I install RGtk2 using the install.packages (I used the UK (Bristol) 
> mirror, I
> haven't tried any other mirror) within R and then use library(RGtk2) I get the
> following message box
> 
> "This application has failed to start because libtak-1.0-0.dll was not found. 
> Re-installing the application may fix this problem."
> 
> I click ok and the following is printed to the R console.
> 
> Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
> 
> 
> [1] "PLEASE RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN"
> Error in .C("R_gtkInit", length(args), x = args, PACKAGE = "RGtk2") : 
>   C symbol name "R_gtkInit" not in DLL for package "RGtk2"
> In addition: Warning message:
> In fun(...) :
>   Failed to load RGtk2 dynamic library:Error in dyn.load(file, ...) : 
>   unable to load shared library
> 'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
>   LoadLibrary failure:  The specified module could not be found.
> 
> 
> Error : .onLoad failed in 'loadNamespace' for 'RGtk2'
> Error: package/namespace load failed for 'RGtk2'
> 
> I've re-started R again and the same happened.  I've also tried downloading 
> the
> RGtk2 zip files from the CRAN website and installing from a local zip file
> option which gave the same results.  I haven't tried re-installing R to get
> around this problem.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] help files for load and related functions

2007-12-17 Thread Duncan Murdoch
On 12/17/2007 9:06 AM, Oleg Sklyar wrote:
> Dear Patrick,
> 
> Firstly, and most importantly, I do not think that your post qualified
> for Rd! Please use the correct mail list for such things: R-help. I do
> not think anybody on Rd wants mailboxes clogged with irrelevant
> messages.

Since Patrick's message was about changes to the documentation, I think 
it is relevant to this list.

Duncan Murdoch

> Back to your question: it is not clear if you are confused, or your
> 'user' is confused, but all three help pages look pretty clear and
> straight forward to me. Moreover,  I do not see any connection between
> attach and library, which you find logical:
> 
> - load - the general use of this one is to load external data sets, e.g.
> load serialised R object(s) (as the example shows). Until you load, you
> cannot use the object as it has no relation to the R session and can be
> e.g. a file sitting somewhere on a network
> 
> - attach - the general use of this one would be to access elements of a
> data set directly, without the data set name specifier and the accessor
> operator, such as $, thus as the help page states - it is used to add
> the data set to the search path (as the example shows). If you look at
> the example, you do not have to call attach to be able to use data, data
> could have existed there before and what you effectively get with attach
> is a more convenient way of dealing with the data
> 
> - library - is used to load *and* attach an R package, which is not
> exactly the same as a serialised R object(s), but a full set of other
> functionality. Attaching packages is just a part of the loading process,
> which occurs basically when the package becomes visible to the user.
> Same as with load, you cannot use the package until you load it. There
> is not a hint of similarity between loading a package and attaching a
> data set as I see it. 
> 
> Regards,
> Oleg
> 
> On Mon, 2007-12-17 at 11:00 +, Patrick Burns wrote:
>> I recently had a discussion with a user about loading
>> and attaching in R.  I was surprised that the help files
>> don't  provide a very clear picture.
>> 
>>  From my point of view 'load' and 'attach' are very
>> similar operations, the difference being that 'attach'
>> creates a new database on the search list while 'load'
>> puts all the objects into the global environment.
>> 
>> The help file for 'load' is inexplicit that this is what
>> happens.  The 'load' and 'attach' help files neither refer
>> to the other in their See Also.
>> 
>> Furthermore, the 'library' help file talks about "loading"
>> packages.  I would suggest that it should use "attaching"
>> as that is the analogous operation.
>> 
>> None of these three help files (nor that of 'save') has a
>> Side Effects section.  Personally I think that all help files
>> should have a Side Effects section (to make it clear to
>> new users what side effects are and that they are not a
>> good thing for most functions to have).  I can understand
>> there could be another point of view on that.  However, I
>> definitely think that there should be a Side Effects section
>> in the help files of functions whose whole point is a side
>> effect.
>> 
>> Patrick Burns
>> [EMAIL PROTECTED]
>> +44 (0)20 8525 0696
>> http://www.burns-stat.com
>> (home of S Poetry and "A Guide for the Unwilling S User")
>> 
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] help files for load and related functions

2007-12-17 Thread Patrick Burns
Patches to the help files sound like a good idea.  However,
it isn't something I'm likely to get to immediately.  I'm
hoping that some other nice person will volunteer.

Pat

Duncan Murdoch wrote:

> On 12/17/2007 6:00 AM, Patrick Burns wrote:
>
>> I recently had a discussion with a user about loading
>> and attaching in R.  I was surprised that the help files
>> don't  provide a very clear picture.
>>
>>  From my point of view 'load' and 'attach' are very
>> similar operations, the difference being that 'attach'
>> creates a new database on the search list while 'load'
>> puts all the objects into the global environment.
>>
>> The help file for 'load' is inexplicit that this is what
>> happens.  The 'load' and 'attach' help files neither refer
>> to the other in their See Also.
>>
>> Furthermore, the 'library' help file talks about "loading"
>> packages.  I would suggest that it should use "attaching"
>> as that is the analogous operation.
>>
>> None of these three help files (nor that of 'save') has a
>> Side Effects section.  Personally I think that all help files
>> should have a Side Effects section (to make it clear to
>> new users what side effects are and that they are not a
>> good thing for most functions to have).  I can understand
>> there could be another point of view on that.  However, I
>> definitely think that there should be a Side Effects section
>> in the help files of functions whose whole point is a side
>> effect.
>
>
> I think you make good points.  Care to submit patches?  The source for 
> those man pages are in
>
> https://svn.R-project.org/R/trunk/src/library/base/man/attach.Rd
>
> https://svn.R-project.org/R/trunk/src/library/base/man/library.Rd
>
> https://svn.R-project.org/R/trunk/src/library/base/man/load.Rd
>
> https://svn.R-project.org/R/trunk/src/library/base/man/save.Rd
>
> If you send them to me before Thursday or after Jan 2, I'll take a 
> look.  (If you send them to me during the Xmas break there's a good 
> chance they'll get lost.)
>
> Duncan Murdoch
>
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread caroline . keef
Full_Name: Caroline Keef
Version: 2.6.1
OS: Windows XP
Submission from: (NULL) (195.171.203.131)


I have tried to install the package rggobi which if I'm right requires the
package RGtk2 
If I install RGtk2 using the install.packages (I used the UK (Bristol) mirror, I
haven't tried any other mirror) within R and then use library(RGtk2) I get the
following message box

"This application has failed to start because libtak-1.0-0.dll was not found. 
Re-installing the application may fix this problem."

I click ok and the following is printed to the R console.

Error in dyn.load(file, ...) : 
  unable to load shared library
'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
  LoadLibrary failure:  The specified module could not be found.


[1] "PLEASE RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN"
Error in .C("R_gtkInit", length(args), x = args, PACKAGE = "RGtk2") : 
  C symbol name "R_gtkInit" not in DLL for package "RGtk2"
In addition: Warning message:
In fun(...) :
  Failed to load RGtk2 dynamic library:Error in dyn.load(file, ...) : 
  unable to load shared library
'C:/PROGRA~1/R/R-26~1.1/library/RGtk2/libs/RGtk2.dll':
  LoadLibrary failure:  The specified module could not be found.


Error : .onLoad failed in 'loadNamespace' for 'RGtk2'
Error: package/namespace load failed for 'RGtk2'

I've re-started R again and the same happened.  I've also tried downloading the
RGtk2 zip files from the CRAN website and installing from a local zip file
option which gave the same results.  I haven't tried re-installing R to get
around this problem.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] help files for load and related functions

2007-12-17 Thread Gavin Simpson
On Mon, 2007-12-17 at 14:06 +, Oleg Sklyar wrote:
> Dear Patrick,
> 
> Firstly, and most importantly, I do not think that your post qualified
> for Rd! Please use the correct mail list for such things: R-help. I do
> not think anybody on Rd wants mailboxes clogged with irrelevant
> messages.

No. R Devel *is* the correct place for this discussion, as it pertains
to the development of R. Patrick is reporting that he found the current
help for load(), attach() etc lacking explicit statements about what R
actually does when you call them, and how the functions differ in their
side effects, especially from the point of view of a new "user".

The reason for your comment above is perhaps related to the one below my
text; Patrick _isn't_ looking for help, just pointing out an infelicity
in the current documentation as identified by the "user", and, I
suspect, welcoming comment on his suggestions for changes.

G

> 
> Back to your question: it is not clear if you are confused, or your
> 'user' is confused, but all three help pages look pretty clear and
> straight forward to me. Moreover,  I do not see any connection between
> attach and library, which you find logical:
> 
> - load - the general use of this one is to load external data sets, e.g.
> load serialised R object(s) (as the example shows). Until you load, you
> cannot use the object as it has no relation to the R session and can be
> e.g. a file sitting somewhere on a network
> 
> - attach - the general use of this one would be to access elements of a
> data set directly, without the data set name specifier and the accessor
> operator, such as $, thus as the help page states - it is used to add
> the data set to the search path (as the example shows). If you look at
> the example, you do not have to call attach to be able to use data, data
> could have existed there before and what you effectively get with attach
> is a more convenient way of dealing with the data
> 
> - library - is used to load *and* attach an R package, which is not
> exactly the same as a serialised R object(s), but a full set of other
> functionality. Attaching packages is just a part of the loading process,
> which occurs basically when the package becomes visible to the user.
> Same as with load, you cannot use the package until you load it. There
> is not a hint of similarity between loading a package and attaching a
> data set as I see it. 
> 
> Regards,
> Oleg
> 
> On Mon, 2007-12-17 at 11:00 +, Patrick Burns wrote:
> > I recently had a discussion with a user about loading
> > and attaching in R.  I was surprised that the help files
> > don't  provide a very clear picture.
> > 
> >  From my point of view 'load' and 'attach' are very
> > similar operations, the difference being that 'attach'
> > creates a new database on the search list while 'load'
> > puts all the objects into the global environment.
> > 
> > The help file for 'load' is inexplicit that this is what
> > happens.  The 'load' and 'attach' help files neither refer
> > to the other in their See Also.
> > 
> > Furthermore, the 'library' help file talks about "loading"
> > packages.  I would suggest that it should use "attaching"
> > as that is the analogous operation.
> > 
> > None of these three help files (nor that of 'save') has a
> > Side Effects section.  Personally I think that all help files
> > should have a Side Effects section (to make it clear to
> > new users what side effects are and that they are not a
> > good thing for most functions to have).  I can understand
> > there could be another point of view on that.  However, I
> > definitely think that there should be a Side Effects section
> > in the help files of functions whose whole point is a side
> > effect.
> > 
> > Patrick Burns
> > [EMAIL PROTECTED]
> > +44 (0)20 8525 0696
> > http://www.burns-stat.com
> > (home of S Poetry and "A Guide for the Unwilling S User")
> > 
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] help files for load and related functions

2007-12-17 Thread Oleg Sklyar
Dear Patrick,

Firstly, and most importantly, I do not think that your post qualified
for Rd! Please use the correct mail list for such things: R-help. I do
not think anybody on Rd wants mailboxes clogged with irrelevant
messages.

Back to your question: it is not clear if you are confused, or your
'user' is confused, but all three help pages look pretty clear and
straight forward to me. Moreover,  I do not see any connection between
attach and library, which you find logical:

- load - the general use of this one is to load external data sets, e.g.
load serialised R object(s) (as the example shows). Until you load, you
cannot use the object as it has no relation to the R session and can be
e.g. a file sitting somewhere on a network

- attach - the general use of this one would be to access elements of a
data set directly, without the data set name specifier and the accessor
operator, such as $, thus as the help page states - it is used to add
the data set to the search path (as the example shows). If you look at
the example, you do not have to call attach to be able to use data, data
could have existed there before and what you effectively get with attach
is a more convenient way of dealing with the data

- library - is used to load *and* attach an R package, which is not
exactly the same as a serialised R object(s), but a full set of other
functionality. Attaching packages is just a part of the loading process,
which occurs basically when the package becomes visible to the user.
Same as with load, you cannot use the package until you load it. There
is not a hint of similarity between loading a package and attaching a
data set as I see it. 

Regards,
Oleg

On Mon, 2007-12-17 at 11:00 +, Patrick Burns wrote:
> I recently had a discussion with a user about loading
> and attaching in R.  I was surprised that the help files
> don't  provide a very clear picture.
> 
>  From my point of view 'load' and 'attach' are very
> similar operations, the difference being that 'attach'
> creates a new database on the search list while 'load'
> puts all the objects into the global environment.
> 
> The help file for 'load' is inexplicit that this is what
> happens.  The 'load' and 'attach' help files neither refer
> to the other in their See Also.
> 
> Furthermore, the 'library' help file talks about "loading"
> packages.  I would suggest that it should use "attaching"
> as that is the analogous operation.
> 
> None of these three help files (nor that of 'save') has a
> Side Effects section.  Personally I think that all help files
> should have a Side Effects section (to make it clear to
> new users what side effects are and that they are not a
> good thing for most functions to have).  I can understand
> there could be another point of view on that.  However, I
> definitely think that there should be a Side Effects section
> in the help files of functions whose whole point is a side
> effect.
> 
> Patrick Burns
> [EMAIL PROTECTED]
> +44 (0)20 8525 0696
> http://www.burns-stat.com
> (home of S Poetry and "A Guide for the Unwilling S User")
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] help files for load and related functions

2007-12-17 Thread Duncan Murdoch
On 12/17/2007 6:00 AM, Patrick Burns wrote:
> I recently had a discussion with a user about loading
> and attaching in R.  I was surprised that the help files
> don't  provide a very clear picture.
> 
>  From my point of view 'load' and 'attach' are very
> similar operations, the difference being that 'attach'
> creates a new database on the search list while 'load'
> puts all the objects into the global environment.
> 
> The help file for 'load' is inexplicit that this is what
> happens.  The 'load' and 'attach' help files neither refer
> to the other in their See Also.
> 
> Furthermore, the 'library' help file talks about "loading"
> packages.  I would suggest that it should use "attaching"
> as that is the analogous operation.
> 
> None of these three help files (nor that of 'save') has a
> Side Effects section.  Personally I think that all help files
> should have a Side Effects section (to make it clear to
> new users what side effects are and that they are not a
> good thing for most functions to have).  I can understand
> there could be another point of view on that.  However, I
> definitely think that there should be a Side Effects section
> in the help files of functions whose whole point is a side
> effect.

I think you make good points.  Care to submit patches?  The source for 
those man pages are in

https://svn.R-project.org/R/trunk/src/library/base/man/attach.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/library.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/load.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/save.Rd

If you send them to me before Thursday or after Jan 2, I'll take a look. 
  (If you send them to me during the Xmas break there's a good chance 
they'll get lost.)

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] help files for load and related functions

2007-12-17 Thread Patrick Burns
I recently had a discussion with a user about loading
and attaching in R.  I was surprised that the help files
don't  provide a very clear picture.

 From my point of view 'load' and 'attach' are very
similar operations, the difference being that 'attach'
creates a new database on the search list while 'load'
puts all the objects into the global environment.

The help file for 'load' is inexplicit that this is what
happens.  The 'load' and 'attach' help files neither refer
to the other in their See Also.

Furthermore, the 'library' help file talks about "loading"
packages.  I would suggest that it should use "attaching"
as that is the analogous operation.

None of these three help files (nor that of 'save') has a
Side Effects section.  Personally I think that all help files
should have a Side Effects section (to make it clear to
new users what side effects are and that they are not a
good thing for most functions to have).  I can understand
there could be another point of view on that.  However, I
definitely think that there should be a Side Effects section
in the help files of functions whose whole point is a side
effect.

Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Rsquared bug lm() (PR#10516)

2007-12-17 Thread lieven

Basically, I used the without intercept to get an estimate for each of my
factor levels instead of using a reference class. So I use a kind of hidden
intercept.

I should have noticed that the behavior was documented in ?summary.lm.

Sorry for the inconvenience. 

Lieven



Duncan Murdoch-2 wrote:
> 
> On 12/14/2007 8:10 AM, [EMAIL PROTECTED] wrote:
>> Full_Name: lieven clement
>> Version:  R version 2.4.0 Patched (2006-11-25 r39997)
>> OS: i486-pc-linux-gnu
>> Submission from: (NULL) (157.193.193.180)
>> 
>> 
>> summary.lm() does not calculate R² accurately for models without
>> intercepts if
>> one of the predictor variables is a factor.
>> In order to avoid one of the factor levels to be considered as a
>> reference class
>> you can use the -1 option in a formula. When you use this, R² is not
>> correctly
>> calculated.
> 
> This is not a bug.  A model without an intercept should be using y=0 as 
> a reference.
> 
> Duncan Murdoch
> 
>> 
>>>  x1<-rnorm(100)
>>> x2<-c(rep(0,25),rep(10,25),rep(20,25),rep(30,25))
>>> y<-10*x1+x2+rnorm(100,0,4)
>>> x2<-as.factor(x2)
>>> lmtest<-lm(y~-1+x1+x2)
>>> summary(lmtest)$r.sq
>> [1] 0.9650201
>>> 1-sum(lmtest$res^2)/sum((y-mean(y))^2)
>> [1] 0.9342672
>> 
>> The R squared by summary is calculated as
>>> 1-sum(lmtest$res^2)/sum((y)^2)
>> [1] 0.9650201
>> apparently because lm.summary assumes the mean of y to be zero.
>> 
>> In case of an intercept model everything seems ok
>>> lmtest<-lm(y~x1+x2)
>>> summary(lmtest)$r.sq
>> [1] 0.9342672
>>> 1-sum(lmtest$res^2)/sum((y-mean(y))^2)
>> [1] 0.9342672
>> 
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Rsquared-bug-lm%28%29-%28PR-10516%29-tp14335791p14370172.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel