[rkward-users] Error of object format with Ubuntu

Robert J. Hijmans r.hijmans at gmail.com
Mon Nov 24 17:17:41 UTC 2014


Thanks, this is indeed a small bug in 'raster' when using is.factor
with and empty RasterStack an empty list is returned.

is.factor(stack())

The next version will return FALSE as expected.

Robert


On Mon, Nov 24, 2014 at 1:37 AM, Thomas Friedrichsmeier
<thomas.friedrichsmeier at ruhr-uni-bochum.de> wrote:
> Hi,
>
> CCing the maintainer of raster, as this seems to be a buglet in raster
> (although it's rather unlikely to step on it, outside of rkward):
>
>   is.factor(as.environment("package:raster")$.__C__RasterStackBrick at prototype)
>
> returns
>
>   list()
>
> where one should reasonably expect a logical. Now, again this is totally
> unlikely to trigger outside of RKWard, as this is not an object a user would
> ever deal with, directly. RKWard does while looking at the objects contained
> in the package.
>
> I'll safeguard against this in RKWard, now, but it might make sense to fix
> this in raster, too (esp. if there is any chance that this could also trigger
> under more likely circumstances).
>
> On the upside, this error message in RKWard should not have any noticable
> consequences, and is safe to ignore.
>
> I cannot reproduce the second problem. Looks like failure to quote the name of
> the function to trace, before passing it to edit. Could you provide
>   rk.sessionInfo()
> ?
>
> Regards
> Thomas
>
> On Monday 24 November 2014 09:31:03 Seb R wrote:
>> I've been using rkward for a while now with Ubuntu.
>> I use the latest version of r-cran with the latest version of rkward
>> (stable or daily build).
>> Since I am on trusty, but also on utopic, whatever the version of rkward I
>> used, I got the following errors :
>>
>> ----------------------------
>>
>> >     rm(list=ls())
>> >     library(raster)
>>
>> Le chargement a nécessité le package : sp
>> Erreur : LOGICAL() can only be applied to a 'logical', not a 'list'
>> Avis : failure to get object prototype
>>
>> >       trace(raster:::.polygonsToRaster,edit=TRUE)
>>
>> Erreur dans as.character(name) :
>>   cannot coerce type 'closure' to vector of type 'character'
>> ------------------------------
>>
>> This must not be a problem of the raster library as I don't get the problem
>> when using Rstudio or the terminal directly.
>> Any idea on how to circumvent this problem ?
>> Thank you




More information about the Rkward-users mailing list