[Rd] Typo in ?image

2016-09-22 Thread Mikko Korpela
In ?image (src/library/graphics/man/image.Rd), the text fragment "will 
show though" should probably be "will show through".


--
Mikko Korpela
Department of Geosciences and Geography
University of Helsinki

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


Re: [Rd] Typo in ?image

2016-09-22 Thread Duncan Murdoch

On 22/09/2016 7:43 AM, Mikko Korpela wrote:

In ?image (src/library/graphics/man/image.Rd), the text fragment "will
show though" should probably be "will show through".


Thanks, fixed.


Duncan Murdoch

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


[Rd] as.character.factor and S4 object containing factor

2016-09-22 Thread Ott Toomet
Do I mess up something or is this a bug?  If I define an S4 object
that contains "factor", all the tests indicate that it is a factor but
as.character.factor() complains of it being a non-factor...

> setClass("Foo", contains="factor")
> a <- new("Foo", factor(1:3))
> a
Object of class "Foo"
[1] 1 2 3
Levels: 1 2 3
> class(a)
[1] "Foo"
attr(,"package")
[1] ".GlobalEnv"
> inherits(a, "factor")
[1] TRUE
> is(a, "factor")
[1] TRUE
> as.character.factor(a)
Error in as.character.factor(a) : attempting to coerce non-factor
> print(a)
Error in as.character.factor(x) : attempting to coerce non-factor
In addition: Warning message:
In print.factor(a) :
  Setting class(x) to NULL;   result will no longer be an S4 object

This means I cannot use ordinary print/summary methods...

platform   x86_64-pc-linux-gnu
arch   x86_64
os linux-gnu
system x86_64, linux-gnu
status
major  3
minor  3.1
year   2016
month  06
day21
svn rev70800
language   R
version.string R version 3.3.1 (2016-06-21)
nickname   Bug in Your Hair

Cheers,
Ott


-- 
Ott Toomet

Visiting Researcher
School of Information
Mary Gates Hall, Suite 310
University of Washington
Seattle, WA 98195

[[alternative HTML version deleted]]

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


Re: [Rd] as.character.factor and S4 object containing factor

2016-09-22 Thread Michael Lawrence
The issue with as.character.factor() was reported and fixed recently.

https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17141

The warning emitted from print.factor() is interesting. I'm not sure
why we are setting the class to NULL there. Could just create a new
character vector instead. Will look into it later.

Michael

On Thu, Sep 22, 2016 at 10:41 AM, Ott Toomet  wrote:
> Do I mess up something or is this a bug?  If I define an S4 object
> that contains "factor", all the tests indicate that it is a factor but
> as.character.factor() complains of it being a non-factor...
>
>> setClass("Foo", contains="factor")
>> a <- new("Foo", factor(1:3))
>> a
> Object of class "Foo"
> [1] 1 2 3
> Levels: 1 2 3
>> class(a)
> [1] "Foo"
> attr(,"package")
> [1] ".GlobalEnv"
>> inherits(a, "factor")
> [1] TRUE
>> is(a, "factor")
> [1] TRUE
>> as.character.factor(a)
> Error in as.character.factor(a) : attempting to coerce non-factor
>> print(a)
> Error in as.character.factor(x) : attempting to coerce non-factor
> In addition: Warning message:
> In print.factor(a) :
>   Setting class(x) to NULL;   result will no longer be an S4 object
>
> This means I cannot use ordinary print/summary methods...
>
> platform   x86_64-pc-linux-gnu
> arch   x86_64
> os linux-gnu
> system x86_64, linux-gnu
> status
> major  3
> minor  3.1
> year   2016
> month  06
> day21
> svn rev70800
> language   R
> version.string R version 3.3.1 (2016-06-21)
> nickname   Bug in Your Hair
>
> Cheers,
> Ott
>
>
> --
> Ott Toomet
>
> Visiting Researcher
> School of Information
> Mary Gates Hall, Suite 310
> University of Washington
> Seattle, WA 98195
>
> [[alternative HTML version deleted]]
>
> __
> 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