[R] Accessing defunct package

David Winsemius dwinsemius at comcast.net
Fri Sep 25 22:13:44 CEST 2015


On Sep 25, 2015, at 11:23 AM, Dennis Fisher wrote:

> David
> 
> Thanks for suggesting this.  Three issues of note:
> 
> 1.  I too work on a Mac.  When I downloaded the last archived version (which has a .gz extension), OS X automatically unzipped the file and removed the .gz extension.  I was able to gzip the file so that I could execute your exact command.  However, I am curious whether you were able to download without OS X unzipping it.
> 

I use Firefox and had no trouble. I think Sarah has probably identified the difference in our workflow.

> 2.  When I executed your exact command, I received one warning message:
> 	SASxport.c:695:10: warning: unused variable 'dbl' [-Wunused-variable]
> I presume that this can be ignored.  Am I correct?

I'm not sure. It certainly sounds ignorable to me. I did not see such a warning.

> 
> 3.  Did you actually run the write.xport command?  I did so and it failed on a number of files (but worked on others).  Failures yielded the following error:
> 	Error in nchar(var) : invalid multibyte string 3157
> I traced the problem in this instance to the following text:
> 	DIARRH¸æéñåºA
> Other than editing the object to remove errant text, is there some general way to prevent this error?

No. I have never used SASxport. I was merely reporting (apparent) success in installing it from source on a Mac SL branch 3.2.1.

I get no error when I run the example on the help page:

> abc <- data.frame( x=c(1, 2, NA, NA ), y=c('a', 'B', NA, '*' ) )
> 
> ## look at it
> abc
   x    y
1  1    a
2  2    B
3 NA <NA>
4 NA    *
> 
> ## add a format specifier (not used by R)
> SASformat(abc$x) <- 'date7.'
> 
> ## add a variable label (not used by R)
> label(abc$y) <- 'character variable'
> 
> ## add a dataset label and type
> label(abc) <- 'Simple example'
> SAStype(abc) <- 'MYTYPE'
> 
> ## verify the additions
> str(abc)
'data.frame':	4 obs. of  2 variables:
 $ x: atomic  1 2 NA NA
  ..- attr(*, "SASformat")= chr "date7."
 $ y: Factor w/ 3 levels "*","a","B": 2 3 NA 1
  ..- attr(*, "label")= chr "character variable"
 - attr(*, "label")= chr "Simple example"
 - attr(*, "SAStype")= chr "MYTYPE"
> 
> # create a SAS XPORT file 
> write.xport( abc, file="xxx.dat" )


I think a minimal example would be needed. I'm wondering if one of those weird `ea`-ligatures might be tripping you up when spelling 'diarrhea'.

-- 
David.


> 
> Dennis
> 
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com
> 
> 
> 
>> On Sep 25, 2015, at 1:00 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>> 
>> I think it might be even simpler at least for now. The error checking done by CRAN can be more rigorous than that done when an installation is done locally. I don't see a report in the current package checks listing of what error was identified, but experimentation is always an option.  When I download the last archived version and install from source I get no error on R 3.2.2 (Mac-SL fork):
>> 
>> install.packages('~/Downloads/SASxport_1.5.0.tar.gz', repos = NULL , type="source")
>> 
>> Best;
>> David.
>> 
>> 
>> 
>> On Sep 25, 2015, at 8:08 AM, Jeff Newmiller wrote:
>> 
>>> Obtain the source package and fix it? Most errors are relatively minor adjustments that just require reading the updated "Writing R Extensions" document to figure out. You might be unlucky, but I think the odds are in your favor.
>>> ---------------------------------------------------------------------------
>>> Jeff Newmiller                        The     .....       .....  Go Live...
>>> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
>>>                                    Live:   OO#.. Dead: OO#..  Playing
>>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>>> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
>>> --------------------------------------------------------------------------- 
>>> Sent from my phone. Please excuse my brevity.
>>> 
>>> On September 25, 2015 7:25:33 AM PDT, Dennis Fisher <fisher at plessthan.com> wrote:
>>>> R 3.2.0
>>>> OS X
>>>> 
>>>> Colleagues,
>>>> 
>>>> In the past, I used a package:
>>>> 	SASxport
>>>> to output files to SAS’s XPT format.  This was useful because FDA
>>>> requests that data be submitted in that format (even though they
>>>> typically must reconvert to some other format before the data are
>>>> used).
>>>> 
>>>> It appears that the package is no longer available at CRAN:
>>>> 	Package ‘SASxport’ was removed from the CRAN repository.
>>>> 	Formerly available versions can be obtained from the archive.
>>>> 	Archived on 2015-06-09 as errors were not corrected despite reminders.
>>>> 
>>>> I have a previously-functioning version of the package on my computer. 
>>>> When I attempt to load it with:
>>>> 	require("SASxport", lib.loc=“/PATH/TOt/R-Packages")
>>>> R responds:
>>>> 	Loading required package: SASxport 
>>>> 	Failed with error: ‘package ‘SASxport’ was built before R 3.0.0:
>>>> please re-install it’ 
>>>> 
>>>> Other than reinstalling an old version of R (< 3.0.0), is there some
>>>> way that I can use the package?
>>>> 
>>>> Dennis
>>>> 
>>>> Dennis Fisher MD
>>>> P < (The "P Less Than" Company)
>>>> Phone: 1-866-PLessThan (1-866-753-7784)
>>>> Fax: 1-866-PLessThan (1-866-753-7784)
>>>> www.PLessThan.com
>>>> 
>>>> ______________________________________________
>>>> R-help at 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 at 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.
>> 
>> David Winsemius
>> Alameda, CA, USA
>> 
> 

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list