Re: [Rd] .Rdata file in data subdirectory won't load

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sun, 28 Nov 2010 13:27:23 +0000 (GMT)

It needs to be polygon1.RData, not .Rdata. You've not actually told us your OS, but it looks like you imagine that R is case-insensitive just because Windows is.

On Sun, 28 Nov 2010, Ronald Barry wrote:

> Greetings,
> I wanted to add a dataset to a complete R package I am working on
> (the package cleanly installs and passes the R CMD check).
> The data (a matrix) was saved, and the save() image dragged to the
> /data folder, and is a .Rdata file. It can be read directly using
> load (see below), but now the R CMD check indicates "subdirectory data
> contains no datasets" and it won't load using 'data()'. I have read
> through the R extensions manual and Leisch's tutorial, but can't find

Try ?data !

> a good hint as to what is going wrong. I also tried this with
> 'polygon1'
> added to the 'export' in the NAMESPACE, with no effect.
>
>> library(latticeDensity)
>> data(polygon1)
> Warning message:
> In data(polygon1) : data set 'polygon1' not found
>> file.choose()
> [1] "C:\\Documents and Settings\\Ronald Barry\\My
> Documents\\latticeDensity\\data\\polygon1.Rdata"
>> load( "C:\\Documents and Settings\\Ronald Barry\\My Documents\\latticeDensity\\data\\polygon1.Rdata")
>> polygon1
> [,1] [,2]
> [1,] 0.6421053 0.8132050
> [2,] 0.6845247 0.4814305
> [3,] 0.7057345 0.2858322
> [4,] 0.6696779 0.2066025
> [5,] 0.5190888 0.1892710
> [6,] 0.5445405 0.4145805
> [7,] 0.5424195 0.6275103
> [8,] 0.5233307 0.7983494
> [9,] 0.5000000 0.7983494
> [10,] 0.5127258 0.5458047
> [11,] 0.5042419 0.3303989
> [12,] 0.4851532 0.1348006
> [13,] 0.2836606 0.1843191
> [14,] 0.2582090 0.3675378
> [15,] 0.1733700 0.6795048
> [16,] 0.3154753 0.8057772
> [17,] 0.2391202 1.0162311
> [18,] 0.5381775 0.9592847
> [19,] 0.7333071 0.9320495
>>
>
>
> Thank you for any pointers.
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
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, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun 28 Nov 2010 - 13:32:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 28 Nov 2010 - 16:10:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive