foreign/0000755000175100001440000000000014530675727011741 5ustar hornikusersforeign/NAMESPACE0000644000175100001440000000064213245463577013162 0ustar hornikusersuseDynLib(foreign, .registration = TRUE) export(data.restore, lookup.xport, read.arff, read.dbf, read.dta, read.epiinfo, read.mtp, read.octave, read.S, read.spss, read.ssd, read.systat, read.xport, write.arff, write.dbf, write.dta, write.foreign) # not exported: SModeNames writeForeignStata writeForeignSPSS importFrom(utils, download.file, read.table, write.table) importFrom(stats, na.omit) foreign/GPL-20000644000175100001440000004311713245463603012441 0ustar hornikusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. foreign/ChangeLog0000644000175100001440000012444014477110125013502 0ustar hornikusers2023-09-069 Brian Ripley * DESCRIPTION: Version is 0.8-85 * src/dbfopen.c: avoid (correct) compiler warning. 2022-12-06 Brian Ripley * DESCRIPTION: Version is 0.8-84 * src/R_systat.c: * src/Rdbfread.c: * src/dbfopen.c: * src/format.c: * src/stataread.c: sprintf -> snprintf 2022-09-23 Brian Ripley * DESCRIPTION: Version is 0.8-83 * src/sfm-read.c: use (void) for clang 15's sake * man/read.{octave,spss}.Rd: update URLs. 2022-01-12 Brian Ripley * DESCRIPTION: Version is 0.8-82. * src: use R_{Calloc,Free,Realloc}. * man/{lookup,read}.xport.Rd: update URL. 2021-02-12 Brian Ripley * po: update fr translations. 2020-12-22 Kurt Hornik * DESCRIPTION: Version is 0.8-81. * man/read.spss.Rd: Improve URL. 2020-08-03 Kurt Hornik * man/read.dbf.Rd: * man/read.dta.Rd: * man/read.epiinfo.Rd: * man/read.mtp.Rd: * man/read.octave.Rd: * man/write.dbf.Rd: * man/write.dta.Rd: Update URLs giving 301 moved permanently. 2020-05-13 Martin Maechler * DESCRIPTION (Version, Contact, MailingList): Version is 0.8-80; R-help (*not* R-core) 2020-04-26 Brian Ripley * DESCRIPTION: Version is 0.8-79 * po: add Italian translations from Daniele Medri, update others 2020-04-13 Brian Ripley * DESCRIPTION: Version is 0.8-78 * po/R-de.po, po/de.po: updated from Detlef Steuer * po/{R-,}foreign.pot: updated 2020-03-23 Brian Ripley * DESCRIPTION: Version is 0.8-77, depends on R (>= 4.0.0) * tests/{spss,stata}.Rout.save: update for change to str() in R-devel. 2020-03-03 Brian Ripley * DESCRIPTION: Version is 0.8-76 * src/sfm-read.c: avoid UBSAN warning. 2020-01-27 Brian Ripley * man/read.dta.Rd: memisc now supports Stata 13 and readstata13 now reads earlier versions. 'data(swiss)' is no longer needed. 2020-01-27 Martin Maechler * man/write.dta.Rd: typo PR#16546 2019-12-25 Brian Ripley * DESCRIPTION: Version is 0.8-75 * src/dbfopen.c: Disable long string fields, following shapelib (patch thanks to Tomas Kalibera). 2019-12-25 Brian Ripley * DESCRIPTION: Version is 0.8-74 * src/stataread.c: pacify some clang 10 warnings * src/pfm-read.c: strings may not be nul-terminated and gcc 10 warns. 2019-12-18 Brian Ripley * DESCRIPTION: Version is 0.8-73 2019-11-26 Brian Ripley * src/R_systat.c: Correct logic as spotted by clang 10.x 2019-08-02 Kurt Hornik * DESCRIPTION (Date): Release 0.8-72 on 2019-08-02. 2019-08-01 Kurt Hornik * tests/spss.R: * tests/xport.R: Robustify against using stringsAsFactors = FALSE by default. * R/xport.R: * man/read.xport.Rd: read.xport() gains a '...' argument for passing arguments to as.data.frame(). 2018-07-21 Martin Mächler * DESCRIPTION: Version is 0.8-72; new contributor Michael Nelson * R/writeForeignSAS.R: needed 'na.rm=TRUE' -- fixing PR#17256 * R/*.R: many changes from sapply() to vapply() 2018-07-20 Brian Ripley * DESCRIPTION: Version is 0.8-71 * src/spss.c: add comment. 2018-07-18 Brian Ripley * DESCRIPTION: Version is 0.8-70.1 (released for R-devel only) * BUGS: remove ancient file about one fixed bug. * src/{dbfopen,pfm-read,sfm-read,stataread}.c: tweaks to placate gcc 8. In dbfopen.c there was a possible truncation by one byte. 2017-11-28 Brian Ripley * DESCRIPTION: Version is 0.8-70 * tests/spss.Rout.save: update for R-pre-3.5.0 chanages to str() (and correct line endings) * tests/mval_bug.Rout.save: correct to CRLF line endings. 2017-06-21 Uwe Ligges * DESCRIPTION: Version is 0.8-69 * add more sophisticated test cases and new examples for read.spss 2017-06-20 Uwe Ligges * R/spss.R: - fix for R >= 3.4.0 not allowing duplicated factor labels, hence new arguments 'duplicated.value.labels' and 'duplicated.value.labels.infix' that control whether to make factor labels unique or to condence all levels with identical factor labels into one level - new argument 'add.undeclared.levels': Many files observed in the wild have variables with one or more value labels and further non-missing values that have no value label. We cann now sepcify whether the other levels should be appended or sorted into the declared labels, or not to convert to factor at all. This fixes several issues, e.g. that values without labels were regarded as NA values before. 2017-06-19 Uwe Ligges * R/spss.R: - allow to pass a "..." argument to as.data.frame, add argument "sub" for substituting invalid chars rather than returning NAs and allowing for back compatibility - now also auto-reencodes if R is ruinning in a latin-1 locale and sav file's encoding is not. * src/sfm-read.c: Update for format type 7 subtypes: - more comments and restructured - information from https://www.gnu.org/software/pspp/pspp-dev/html_node/System-File-Format.html#System-File-Format - no longer warns for subtypes 12, 17, 18, 19, 20, 24 as these can be safely ignored - more informative warning messages for subtypes 14, 21, 22 (long strings) 2017-06-12 Uwe Ligges * R/spss.R: use iconv(..., sub=".") so that character labels/names/values with invalid or non convertible chars are no longer silently coerced to NA 2017-06-09 Uwe Ligges * src/sfm-read.c: Do not evaluate the write field for the format type any more as this produces errors and given https://www.gnu.org/software/pspp/pspp-dev/html_node/Variable-Record.html#Variable-Record tells us on June 9, 2017: "A few system files have been observed in the wild with invalid write fields, in particular with value 0. Readers should probably treat invalid print or write fields as some default format. " 2017-05-04 Uwe Ligges * several bugfixes for writeForeignSPSS: add/correct declaration of factors and ordered factors (nominal, ordered); add/correct declaration of numeric (scale) variables; calculate length of character variables correctly, even if all entries are NA and there is no longer a 255 char limit (since SPSS 13); data files are typically encoded in the current locale and not always ASCII; variable name list must not exceed 251 chars for each line of code and had to be wrapped 2017-04-29 Uwe Ligges * add maxchars = 32L argument to writeForeignSPSS in order to allow for longer variable names for SPSS versions > 12 * bugfix in writeForeignSPSS for declaration of character variables by prefixed stars 2017-04-27 Uwe Ligges * writeForeignCode.R: SET DECIMAL=DOT. in SPSS required if it runs in a locale with DECIMAL=comma 2017-04-22 Uwe Ligges * DESCRIPTION: Version is 0.8-68 * src/sfm-read.c: no longer convert variable name characters to upper case nor give warnings (as this fails in multi byte encodings and seems not to be required) 2016-09-24 Brian Ripley * man/read.dta.Rd: mention package 'haven'. 2016-09-13 Kurt Hornik * DESCRIPTION: Version is 0.8-67 2016-01-25 Brian Ripley * src/*.c: include directly headers included via R.h. 2015-08-29 Brian Ripley * man/read.dbf.Rd: wotsit.org is unavailable and has been for weeks. 2015-08-18 Luke Tierney * DESCRIPTION: Version is 0.8-66 * src/spss.c: Moved install call to protect ScalarInteger result. 2015-07-02 Brian Ripley * DESCRIPTION: Version is 0.8-65 * R/read.dta.R: convert_dt_C used the wrong origin for leap seconds. * tests/stata.R[out]: set timezone. 2015-06-28 Kurt Hornik * DESCRIPTION: Version is 0.8-64 * NAMESPACE: add missing imports from stats and utils. 2015-02-13 Brian Ripley * DESCRIPTION: Version is 0.8-63 * man/read.dta.Rd: mention new CRAN package 'readstata13' * R/writeForeignSAS.R: use qmethod = "double" (PR#16199) * man/read.spss.Rd: clarifications, especially now download.file() has been enhanced. * R/spss.R: do not report re-encoding from 65001 to UTF-8. * src/stataread.c: cast to suppress conversion warning. 2015-01-09 Brian Ripley * man/{lookup.xport,read.arff,read.xport,write.arff}.Rd: update URLs. 2015-01-07 Brian Ripley * DESCRIPTION: Version is 0.8-62 * man/*.Rd: Add some explanation of the \dontrun sections. 2015-01-02 Brian Ripley * DESCRIPTION: Authors@R had a needless call to structure(). 2014-10-20 Brian Ripley * R/octave.R: remove unused assignments. 2014-03-28 Brian Ripley * DESCRIPTION: Version is 0.8-61 * R/dbf.R, po/*pl.pp: updates 2014-03-22 Brian Ripley * DESCRIPTION: Version is 0.8-60 * src/stataread.c: 'writeStataValueLabel' used wrong length, picked up by valgrind (on an instrumented build). As did writing expansion fields. * src/SASexport.c: 'exponent' needs to be signed for Raspbian (PR#15720). 2014-01-26 Brian Ripley * tests/spss.{R,Rout.save}: avoid partial match in all.equal(). 2014-01-24 Brian Ripley * man/write.dta.Rd: Add section with more explanation on date-times. * src/{R_systat,SASxport.c,dbfopen.c,swap_bytes.h},: add casts or correct types. * src/stataread.c: legibility. 2014-01-24 Brian Ripley * DESCRIPTION: Version is 0.8-59 * R/read.dta.R, man/read.dta.Rd: add support for Stata date-times, improve detection of date columns. * tests/stata.{R,Rout.save}, tests/xxx12.dta: add regression test. 2014-01-22 Brian Ripley * tests/download.R: remove defunct URL. * tests/sas.R: comment that URL was unresponsive. * src/{file.handle.c,minitab.c,pfm-read.c,sfm-read.c,spss.c,stataread.c}: add casts or correct types. 2014-01-21 Brian Ripley * DESCRIPTION: Version is 0.8-58 * R/read.dta.R, man/read.dta.Rd: attempt to convert Stata's newer %[-]t date formats if convert.dates = TRUE. (Wish of PR#15517.) 2013-12-05 Brian Ripley * R/writeForeignCode.R: correction to write.foreign(package = "SPSS") when writing data frames with character columns. (PR#15483) Also layout/legibility. * tests/writeForeignCode.{R,Rout.save}, tests/keep: regression test for above. 2013-11-27 Brian Ripley * man/read.ssd: Mention problems with long 'sectionnames' on Windows. (PR#15570) 2013-10-29 Martyn Plummer * DESCRIPTION: Version is 0.8-57 * src/stataread.c: Fix for PR#15477 2013-10-27 Brian Ripley * man/read.dta: Add comment on Stata's confusion about their v12 format. 2013-10-07 Brian Ripley * DESCRIPTION: Version is 0.8-56 * man/{read,write}.dta: Freeze Stata support. * man/read.{dbf,spss}.Rd: add comments on status to fend off non-bug reports. * inst/COPYRIGHTS, man/read.epiinfo.Rd, src/stataread.c: update. 2013-09-02 Brian Ripley * DESCRIPTION: Version is 0.8-55, depends on R (>= 3.0.0). 2013-07-15 Brian Ripley * src/SASxport.c, tests/testEmpty.R: fix for PR#15346 (empty datasets). * src/stataread.c: trap invalid empty strings (PR#15166) 2013-05-07 Brian Ripley * DESCRIPTION: Version is 0.8-54. * R/read.dta.R: avoid abbreviate() in write.dta() if not needed. 2013-04-28, 2013-05-06, 2013-09-02 Brian Ripley * src/stataread.c, man/{read,write}.dta.Rd: allow write.dta() to write value labels, and read.dta() to read all the labels (contributed by Brian Quistorff). * tests/stata.R, tests/stata.Rout.save, tests/MLLabelsWithNotesChar.dta, tests/OneVarTwoValLabels.dta: regression tests for above. 2013-03-20 Brian Ripley * DESCRIPTION: Version is 0.8-53. * src/avl.c: Free_fn had wrong number of arguments, reported by OS X's toolchain. 2013-03-03,10 Brian Ripley * LICENCE, inst/LICENCE: remove old files 2013-01-02 Brian Ripley * DESCRIPTION: Version is 0.8-52. * DESCRIPTION: move copyright info to 'Copyright' field, and for completeness arrange to install it. * COPYRIGHTS: update links to libavl and PSPP. * R/zzz.R: remove unused .First.lib * src/init.c: update test to R >= 3.0.0 * man/read.spss.Rd: use 'max.value.labels' consistently * R/spss.R: patch from contributed by Peggy Overcashier. * tests/mval_bug.{R,sav,Rout.save}: tests for above. 2012-12-14 Brian Ripley * DESCRIPTION: add 'Biarch' field 2012-10-08 Brian Ripley * DESCRIPTION: Version is 0.8-51. * R: work on translations * po: update translations 2012-09-01 Brian Ripley * po: add Polish translations. 2012-08-30 Brian Ripley * src/init.c: force use of registered symbols in R >= 2.16.0 2011-05-21 Brian Ripley * DESCRIPTION: Version is 0.8-50. 2012-05-08 Kurt Hornik * DESCRIPTION: Improve Authors@R 2012-02-10 Brian Ripley * DESCRIPTION: Version is 0.8-49. * R/read.dta.R, src/stataread: patch from PR#14799 * tests/spss.Rout.save: update output for R 2.15.0 2011-12-06 Brian Ripley * DESCRIPTION: Version is 0.8-48. 2011-12-03 Brian Ripley * src/writeForeignSAS.R, man/write.foreign.Rd: add 'libpath' argument contributed by Xiaobo Gu. 2011-11-23 Brian Ripley * src/var.h.in: this assumed values for sizes, ignoring those computed by configure. And we know sizeof(double) is always 8. * configure, configure.ac, src/Makevars.in, src/swap_bytes.h.in, cleanup: The header had always #undef-ed HAVE_GLIBC_SWAP, so remove never-used code branches. This means that 'long long' is never used and so no warning needs to be suppressed, so src/Makevars and all configuration are not needed. 2011-11-22 Kurt Hornik * R/arff.R: handle "Date" objects in addition to "POSIXt" ones. (Spotted by Xiaobo Gu .) 2011-11-08 Brian Ripley * DESCRIPTION: Version is 0.8-47, use Authors@R field 2011-10-15 Brian Ripley * R/read.dta.R, man/read.data.Rd, src/stataread.c: read Stata 12 files as if they were format_114: the description is unchanged. 2011-09-26 Brian Ripley * man/read.dta.Rd: refer to package 'memisc'. * man/read.spss.Rd: tweak wording, refer to package 'memisc'. 2011-09-23 Brian Ripley * DESCRIPTION: Version is 0.8-46 * R/writeForeignSAS.R: write out logicals (patch from Patrick McCormick). * R/writeForeignCode.R: give invisible return value. * man/write.foreign.Rd: update documentation. 2011-08-28 Brian Ripley * src/dbfopen.c: Use REprintf. 2011-07-12 Brian Ripley * DESCRIPTION: Version is 0.8-45 * COPYING: rename to GPL-2 * LICENCE: reflect that change. * COPYRIGHTS: library -> package 2011-05-04 Brian Ripley * src/file-handle.c: plug memory leaks in read.spss() 2011-04-10 Brian Ripley * DESCRIPTION: Version is 0.8-44 * src/R_systat.c: remove set-but-unused variable 2011-04-04 Brian Ripley * man/read.mtp.Rd: note not for current (>= 15) Minitab 2011-03-26 Brian Ripley * src/SASxport.c: remove set-but-unused variable 2011-03-05 Brian Ripley * DESCRIPTION: Version is 0.8-43, depends R >= 2.13.0 * tests/stata.Rout.save: update for R 2.13.0 2011-02-10 Brian Ripley * DESCRIPTION: Version is 0.8-42 2011-01-01 Brian Ripley * src/sfm-read.c: wrong index reported in error message. (PR#14465) * tests/stata.Rout.save: update for rounding of < 1970-01-01 dates. 2010-10-22 Brian Ripley * man/read.octave.Rd: Octave changed since 2004. (PR#14420) 2010-09-23 Brian Ripley * DESCRIPTION: Version is 0.8-41 * R/spss.R: Fix to PR#14382 2010-06-29 Brian Ripley * man/write.dta.Rd: Improve wording 2010-03-26 Brian Ripley * DESCRIPTION: Version is 0.8-40 * src/dbfopen.c: Remove the undocumented restriction of read.dbf() to extensions .dbf or .DBF. (And change DESCRIPTION to match.) * tests/octave.Rout.save: update for str() change (bugfix). 2010-01-03 Brian Ripley * DESCRIPTION: Version is 0.8-39 * R/read.dta.R, man/write.dta.Rd: Stata 11 uses the same format as Stata 10, so map 11 to 10. * po/R*: update. * tests/octave.Rout.save: update for str() change. 2009-12-18 Brian Ripley * DESCRIPTION: add BugReports field. * man/read.dta.Rd: Stata 11 uses the same format as Stata 10. 2009-10-12 Brian Ripley * po/R-de.po, po/de.po: update 2009-10-07 Brian Ripley * DESCRIPTION: Version is 0.8-38, for release with 2.10.0 2009-09-15 Brian Ripley * R/spss.R: 'latin-9' is more portable than 'latin9', as libiconv does not know about the latter. 2009-06-13 Brian Ripley * src/spss.c: uninitialized codepage in an example from multcomp's chfls1.Rnw 2009-06-13 Brian Ripley * DESCRIPTION: Version is 0.8-37, for release with 2.9.2 2009-06-09 Brian Ripley * src/stataread.c, man/write.dta.Rd: truncate character data in write.dta at 244 bytes. (PR##13820) * src/stataread.c: allow for up to 244 bytes in character string and check. Previously assumed up to 128 and did not check. 2009-06-09 Brian Ripley * DESCRIPTION: Version is 0.8-36 * po/de.po, po/R-de.po: updates 2009-05-28 Brian Ripley * po/de.po, po/R-de.po: first pass at German translations from Chris Leick * po/fr.po, po/R-fr.po: updates from Phillipe Grosjean 2009-05-11 Brian Ripley * man/read.dbf.Rd: update wotsit.org URL (thanks to Peter Konings). 2009-05-02 Brian Ripley * DESCRIPTION: Version is 0.8-35 * src/dbfopen.c: make a blank field valid as a NULL numeric type as per current dbfopen (if not per the spec). * src/Rdfopen.c: when promoting a column to numeric from integer, need to convert NA_INTEGER to NA_REAL, not to -2^31+1. And columns were promoted unnecessarily because of a typo. 2009-03-12 Brian Ripley * DESCRIPTION: Version is 0.8-34 * R/read.{dta,spss}.R: files specified as URLs are downloaded to a temporary file and then read. (Suggestion of Jeffrey Racine.) * tests/download.R: tests for download in read.dta and read.spss. * src/sfm-read.c: Remove some warnings that seem innocent (Windows codepages, record type 7 subtype 20). 2009-03-07 Brian Ripley * src/avl.[ch]: comment out/remove unused functions, make external symbols R_avl_* since Jeff Long managed to link against Solaris' libavl by a very non-standard build. Remove attempt to use inlining under gcc (since it was the GCC not C99 model). * src/{file-handle,pfm-read,sfm-read,spss}.c: use R_avl_ prefix. 2009-02-18 Brian Ripley * DESCRIPTION: Version is 0.8-33. * R/spss.R: improvements to interpreting codepages 2009-02-09 Brian Ripley * DESCRIPTION: Version is 0.8-32. * src/sfm-read.c: correct 'free' to 'Free' in contributed code. * R/spss.R: interpret more code pages. 2009-01-28 Brian Ripley * DESCRIPTION: Version is 0.8-31. * tests/{minitab,octave,spss}.Rout.save: update output 2009-01-04 Brian Ripley * R/writeforeignSAS: fix typo (PR#13425) 2008-12-19 Brian Ripley * DESCRIPTION: Version is 0.8-30. * R/*.R: more code cleanup. * man/read.ssd.R, man/read.xport.Rd: correct \email format 2008-12-15 Brian Ripley * R/*R: make more use of integer constants. * tests/stata.Rout.save: update for str() changes in R 2.8.0. * R/spss.R, man/read.spss.Rd, src/sfm-read.c: assume codepage 65001 is UTF-8, others >= 2000 are unknown to iconv(). 2008-08-21 Brian Ripley * R/read.dta.R, man/write.dta.Rd: allow arrays in write.dta with all dims but the first equal to one. * R/arff.R: improvements by Martin C. Martin (PR#12574), corrected. Use "wb" to open file (and so preserve eol on Windows). * man/{read,write}.arff.Rd: update URL 2008-08-07 Brian Ripley * R/read.ssd.R: allow long var names, PR#9631/2. 2008-08-07 Brian Ripley * DESCRIPTION: Version is 0.8-29. * R/read.dta.R: avoid as.Date() after https://stat.ethz.ch/pipermail/r-help/2008-August/170114.html * R/*.R: use L for integer constants. 2008-08-05 Brian Ripley * src/sfm-read.c, src/spss.c, man/read.spss.Rd: return information on user-defined missing values. * R/spss.R, man/read.spss.R: add argument 'use.missings'. * tests/spss.R*: don't record the previous locale in output, adapt for default mapping of missings with read.spss(to.data.frame=TRUE). * src/dbfopen.c, src/minitab.c, src/stataread.c: check return values from fread etc. 2008-07-29 Brian Ripley * DESCRIPTION: Version is 0.8-28. * src/sfm-read.c: endianness fix from https://stat.ethz.ch/pipermail/r-devel/2008-July/050194.html 2008-07-21 Brian Ripley * src/minitab.c, src/sfm-read.c: clean up last changes. 2008-07-16 Martin Maechler * DESCRIPTION (Version): 0.8-27. * src/sfm-read.c (sfm_read_long_var_names): added, from patch by Kurt Van Dijck * tests/spss_long.sav : added example for those by Ilse Laurijssen * tests/spss.R : add stringent tests; also testing the above. 2008-06-18 Brian Ripley * src/SASxport.c, src/minitab.c, src/spss.c, src/stataread.c: use sterrror(errno) to give reason for fopen failure. 2008-06-13 Brian Ripley * tests/sas.R: make optional, controlled by env variable. 2008-05-29 Brian Ripley * DESCRIPTION: Version is 0.8-26. * src/stataread.c: increase buffer size for version 10 files. The "label.table" list attribute now only contains as many elements as are present in the file, and is only present in the result if there are value labels in the file. Version numbers are now positive in returned attribute except for -7 (Stata 7SE). Reformatted for legibility. * R/read.dta.R: Reformatting for legibility, more support for Stata 10 files. Default format for write.dta is now 7 (not 6). write.dta converts class Date and not just POSIXt. Argument 'tz' of read.dta has been removed. Default for 'convert_underscore' is now FALSE. * man/read.dta.Rd: typo. More information on the attributes and how value labels are stored. Warnings on non-ASCII strings and large integer and numeric values. * tests/stata.Rout.save: update. [NB: will need updating for R 2.8.0] 2008-04-10 Brian Ripley * DESCRIPTION: Version is 0.8-25. * R/zzz.R: add .onUnload() to unload the DLL. 2008-04-04 Brian Ripley * tests/sas.R: precautionary use of binary mode -- needed to test under Windows in R < 2.7.0. 2008-03-27 Brian Ripley * DESCRIPTION: Version is 0.8-24. * src/SASxport.c: Patch from PD for case where record ends on card boundary (http://finzi.psych.upenn.edu/R/Rhelp02a/archive/57864.html, https://stat.ethz.ch/pipermail/r-help/2008-February/155272.html) * tests/sas.R: regression test. * src/pfm-read.c: Use R's NA_REAL, Inf etc to return error and overflow conditions. Allow widths up to 65535 bytes. * src/sfm-read.c: Increase the limit on variable labels to 65536 bytes (https://stat.ethz.ch/pipermail/r-help/2008-March/156950.html). Skip records of type 7 subtype 16. * R/spss.R, src/sfm-read.c, src/sfmP.h, pfm-read.c, man/read.spss.Rd: add 'reencode' argument to read.spss. 2008-03-22 Brian Ripley * src/dbfopen.c: Use R_atof where available, for locale-independence. 2008-03-18 Brian Ripley * R/read.dta.R, src/stataread.c, man/read.dta.Rd, man/write.dta.Rd. Add support for Stata 10 (aka 114) format. 2008-03-09 Duncan Murdoch * R/read.epiinfo.R: bad regexp for blanks fixed. 2008-01-23 Brian Ripley * src/minitab.c: force text-mode opening (embedded uses of R can change the default on Windows). 2007-09-17 Brian Ripley * DESCRIPTION: Version is 0.8-23, use approved license abbreviation. * R/spss.R, man/read.spss.Rd, tests/spss.Rout.save: New argument trim_values=TRUE to read.spss, as some examples have padding in the value labels table and not in the data. One example is in PR#9896. 2007-08-12 Brian Ripley * man/read.spss.Rd: Clarifications, including 'Unrecognized record type 7, subtype 16' message. Add URL for PSPP project. 2007-08-02 Brian Ripley * src/pfm-read.c, src/sfm-read.c: include headers conditionally provided via R.h. 2007-07-27 Brian Ripley * DESCRIPTION: Version is 0.8-22 * R/*.R, src/*.[ch]: Add licence statement, or update source for GPL. * man/*.Rd: Copy over copyright claims from COPYRIGHTS to files mentioned. * COPYRIGHTS: update some dates. * LICENCE: Clarify that this package is licensed under GPL >= 2. 2007-06-06 Brian Ripley * src/sfm-read.c: remove Solaris compiler warning. 2007-06-01 Brian Ripley * src/foreign.h: remove duplicate definition of R_ExpandFileName. * src/R_systat.c, src/Rdfread.c, src/SASexport.c, src/spss.c, src/stataread.c: issues with CHAR being made (const char *). * DESCRIPTION: Version is 0.8-21, depends on R >=2.6.0 2007-05-29 Brian Ripley * R/dbf.R, R/read.dta.R: comments on meaning of nchar() - probably always ASCII * tests/stata.Rout.save: update for R 2.6.x 2007-05-20 Brian Ripley * R/Sread.R, R/octave.R, tests/stata.*: partial matching issues, use seq.int. 2007-04-06 Kurt Hornik * DESCRIPTION: Version is 0.8-20 2007-04-06 Brian Ripley * src/sfm-read.c: warning not error on unknown character representation code. * man/read.spss.Rd: document this. 2007-03-26 Kurt Hornik * NAMESPACE: * R/arff.R: * man/read.arff.Rd: * man/write.arff.Rd: Add functionality for reading and writing Weka ARFF files. 2007-03-23 Brian Ripley * DESCRIPTION: Version is 0.8-19, depends on 2.5.0. * NAMESPACE: remove conditionality * man/read.ssd.Rd: add comments about alternatives. 2007-03-06 Thomas Lumley * R/read.dta.R: avoid as.data.frame.list, for efficiency 2006-12-22 Brian Ripley * man/read.epiinfo.Rd: spelling 2006-11-30 Brian Ripley * NAMESPACE: Conditional on R>=2.5.0, import write.table * DESCRIPTION: Declare imports from utils, although only needed for R>=2.5.0 2006-11-29 Brian Ripley * DESCRIPTION: Version is 0.8-18. 2006-11-04 Brian Ripley * man/read.S.Rd: several corrections, mainly re data.restore. 2006-09-06 Brian Ripley * DESCRIPTION: needs to depends on stats, for na.omit. It does use methods::as Version is 0.8-17 2006-08-31 Thomas Lumley * R/read.dta, src/stataread.c: return a list from C, much faster for wide files * man/read.dta.Rd, man/write.dta.Rd: update for Stata 9. * src/sfm-read.c: changes from PR#9074 * src/writeForeignCode.R: fixes for PR#8936, PR#8927, PR#9006 2006-08-31 Brian Ripley * DESCRIPTION: there are no imports, from methods or elsewhere. Version is 0.8-16. * R/Sread.R, R/dbf.R, R/octave.R: use seq_{along,len}. * src/minitab.c: only use Rinternals.h. 2006-08-11 Brian Ripley * tests/stata.Rout.save: update for str() change. 2006-06-17 Thomas Lumley * R/writeForeignSAS.R, COPYRIGHTS: Add Stephen Weigand's modifications 2006-05-26 Brian Ripley * R/dbf.R, man/writedbf.Rd: new argument max_nchar to write.dbf() to allow longer character fields. 2006-03-29 Brian Ripley * DESCRIPTION: version is 0.8-15 * src/R_systat.c: Don't try to parse comments. 2006-02-25 Brian Ripley * src/init.c: use const for tables. 2006-01-26 Brian Ripley * DESCRIPTION: version is 0.8-14 * src/pspp-format-def.h: rename from format.def to avoid confusion with Windows .def files. * R/zzz.R: update FSF address. 2005-12-30 Brian Ripley * DESCRIPTION: version is 0.8-13 * NAMESPACE, R/*.R: use registered symbols in .Call/.External calls. * COPYING: update FSF address 2005-12-19 Brian Ripley * src/SASxport.[ch]: better ways to avoid alignment problems. * src/sfmP.h, src/sfm-read.c: remove packing as it causes alignment problems on 64-bit platforms. 2005-12-14 Brian Ripley * DESCRIPTION: version is 0.8-12 * src/SASxport.c: force alignment of char *, as apparently gcc4's memcpy requires this. 2005-12-12 Brian Ripley * src/sfm-read.c, src/SASxport.h: use int not long. First is harmless, the second may not be on 64-bit platforms. * src/sfm-read.c: reading a structure from a file assumes that alignment is adding no padding, which is not the case on Sparc Solaris's native compilers. 2005-12-08 Brian Ripley * DESCRIPTION: version is 0.8-11 * po/R-fr.po, po/fr.po: add French translations. 2005-11-16 Brian Ripley * src/init.c: new file, add symbol registration. 2005-08-26 Brian Ripley * DESCRIPTION: version is 0.8-10 * src/pfm-read.c, src/sfm-read.c, src/spss.c: replace the abuse of casting an int to/from void *, which correctly warned on 64-bit platforms. 2005-08-19 Brian Ripley * src/Rdbfread.c, man/read.dbf.Rd: read over-wide numeric fields as doubles. 2005-08-15 Thomas Lumley * R/spss.R, man/read.spss.Rd: reverse the order of factor levels when creating factors from SPSS value labels 2005-07-13 Thomas Lumley * DESCRIPTION: version is 0.8-9 2005-07-13 Brian Ripley * R/writeForeignCode.R: * R/writeForeignSAS.R: replace use of dQuote() which gave UTF-8 quotes in a UTF-8 locale. 2005-07-07 Thomas Lumley * R/writeForeignSAS.R: add SAS to write.foreign() 2005-07-05 Thomas Lumley * R/writeForeignCode.R: extra punctuation in SPSS code files. 2005-06-08 Brian Ripley * src/dbfopen.c: suppress a couple of warnings on Solaris. 2005-06-07 Thomas Lumley * src/stataread.c: Writes of empty strings gave an error * DESCRIPTION: version is 0.8-8 2005-05-24 Thomas Lumley * R/read.dta.R, man/read.dta.Rd: by default don't use value labels unless there is a label for every value. * src/sfm-read.c, man/read.spss.Rd: Suppress the "Unrecognized record type 7, subtype 13" warning caused by long variable names in SPSS files. 2005-04-17 Brian Ripley * DESCRIPTION (Version): New version is 0.8-7. * R/dbf.R: further patch from Roger Bivand for all-NA fields. 2005-04-04 Brian Ripley * DESCRIPTION (Version): New version is 0.8-6. * R/dbf.R: patch from Roger Bivand for invalid value for the guess at the width of integer or numeric fields * src/pfm-read.c: match -> pfm_match to avoid warning. 2005-02-05 Brian Ripley * DESCRIPTION (Version): New version is 0.8-5. * R/dbf.R: * R/octave.R: * R/read.dta.R: * R/read.epiinfo.R: * R/read.ssd.R: * R/Sread.R: * R/writeForeignCode.R: * po/R-foreign.pot: * po/foreign.pot: * src/file-handle.c: * src/foreign.h: * src/format.c: * src/minitab.c: * src/pfm-read.c: * src/R_systat.c: * src/Rdbfread.c: * src/Rdbfwrite.c: * src/SASxport.c: * src/sfm-read.c: * src/spss.c: * src/stataread.c: mark error messages for gettext, improve messages. * tests/stata.Rout.save: update for str() changes in R-devel 2004-12-27 Kurt Hornik * DESCRIPTION (Version): New version is 0.8-4. * R/octave.R: New file, adding read.octave() for reading in files in Octave text data format (as generated by 'save -ascii'). * man/read.octave.Rd: New file, documenting the above. * tests/octave.R: * tests/octave.m: * tests/octave.dat: New files for testing read.octave(). 2004-12-27 Brian Ripley * test/stata.Rout.save: update for str() changes in R-devel 2004-12-14 Douglas Bates * src/minitab.c (read_mtp,MTB2SEXP): code for matrices contributed by Rajarshi Guha . 2004-12-02 Martin Maechler * tests/dumpdata: enhanced {logical; NA} * tests/create-dumpdata.S: new {only internal documentation} * tests/S3.R: add verbose=TRUE * DESCRIPTION: New version is 0.8-3. * DESCRIPTION (Imports): stats, methods * R/Sread.R (data.restore): handle "logical"s (with NAs!) correctly; handle NAs better in general, getting rid of extraneous coercion warning. 2004-12-01 Martin Maechler * R/Sread.R (data.restore): handle `ts()' objects properly 2004-11-24 Brian Ripley * DESCRIPTION: New version is 0.8-2. * src/SASxport.c Definition of numerical missing values was applied to character fields. (PR#7389) 2004-11-17 Brian Ripley * DESCRIPTION: New version is 0.8-1. * read.ssd.{R,Rd}: Make work under Windows and tidy up. 2004-11-8 Thomas Lumley * spss.R: Trim trailing spaces from SPSS value labels Don't create a factor when there are fewer labels than non-missing levels * read.spss.Rd: Mention the apparently harmless warning given for recent versions of SPSS files. 2004-10-28 Brian Ripley * DESCRIPTION: Mention read/write .dbf files 2004-10-25 Brian Ripley * DESCRIPTION: New version is 0.8-0. * Added read.systat contributed by Roger Bivand * Added read.dbf, write.dbf based on functions from package 'maptools'. * COPYRIGHTS: New file. 2004-09-02 Thomas Lumley * Add write.foreign for writing to foreign packages * use Date rather than POSIXt for read.dta * Update tests/stata.Rout.save for using Date rather than POSIXt * DESCRIPTION: New version is 0.7 2004-07-29 Thomas Lumley * DESCRIPTION: New version is 0.6-11 * Fix US-style dates in read.epiinfo * Add option to turn off some warnings in read.dta 2004-07-15 Kurt Hornik * DESCRIPTION (Version): New version is 0.6-10. * configure.ac: Protect against possible whitespace in R_HOME when calling R CMD config. 2004-05-22 Kurt Hornik * DESCRIPTION (Version): New version is 0.6-9. * INDEX: Removed. * src/SASxport.c (xport_info, xport_read): Make sure that R_ExpandFileName() is called on a valid string (PR#5049). 2004-04-28 Thomas Lumley * DESCRIPTION: version 0.6-8 * read.dta: 1-byte type was coming through unsigned * tests/: test file with 1-byte type 2004-04-22 Thomas Lumley * DESCRIPTION: version 0.6-7 * read.dta: add option to not convert _ to . in variable names * tests/ tests of the new option and more tests for stata 8. 2003-12-20 Brian Ripley * DESCRIPTION (Version): New version is 0.6-6. * NAMESPACE: New file. * man/read.S.R: Do not export nor document SModeNames. * src/zzz.R: Define .onLoad as well as .First.lib (the latter left in case NAMESPACE is removed for debugging). 2003-12-20 Kurt Hornik * DESCRIPTION (Version): New version is 0.6-5. * TITLE: Removed. * configure: * configure.in: * configure.ac: Upgrade to Autoconf 2.50 style. Header file 'src/vars.h' needs to be in AC_CONFIG_HEADERS (as we do not AC_SUBST() in it). Add testing code for a '-Wno-long-long' C compiler option to shut up warnings from gcc -pedantic in fact due to glibc's byteswap.h bswap_64 macro (which tries using __extension__, but fails ...). * src/Makevars.in: New file for possibly setting PKG_CFLAGS to '-Wno-long-long'. * src/sfm-read.c: Use __extension__ in GNUC version of REM_RND_UP macro. 2003-09-25 Saikat DebRoy * DESCRIPTION: Increased version to 0.6-4. * src/swap_bytes.h.in: The GNU libc header file byteswap.h only provides the bswap_64 macro when using gcc. Use suitable replacement when using another compiler like icc. 2003-09-25 Kurt Hornik * DESCRIPTION (Version): New version is 0.6-3. * man/read.epiinfo.Rd: Codoc mismatch. 2003-08-28 Thomas Lumley * read.spss.Rd: note that strings are padded on the right with spaces. * version is 0.6-2 2003-08-19 Thomas Lumley * read.dta: work around a Stata file that says it has value labels but doesn't. * version is 0.6-2 2003-05-21 Peter Dalgaard BSA * lookup.xport return SAS variable label and format. Slight change of logic for getting variable name (avoid strchr on things that aren't zero-terminated). * version is 0.6-1 2003-05-20 Thomas Lumley * read.dta/write.dta handle Stata 8.0 * version is 0.6 2003-05-08 Brian Ripley * src/* rename int32, flt64 and comment out int16 and flt32, to avoid conflicts on AIX 5.1. * DESCRIPTION: version is 0.5-13 2003-04-04 Duncan Murdoch * bug fix for data.restore (bad error message) 2003-03-01 Duncan Murdoch * bug fix for data.restore (wasn't reading NULL properly) 2002-11-04 Brian Ripley * configure.win didn't work with all toolsets * DESCRIPTION: version is 0.5-8 2002-11-02 Thomas Lumley * Fixed src/stataread.c for version 7/SE (thanks to examples sent by Jason Liao) * version is 0.5-7 2002-07-25 Brian Ripley * src/stataread.c: float NAs were being mapped to NaNs. (Fixed earlier in CVS by Martyn Plummer but not released.) * DESCRIPTION: Version is 0.5-6 2002-05-17 Thomas Lumley * Stata short ints were coming through unsigned * updated SPSS output in tests to follow 2002-04-29 changes * version is 0.5-5 2002-05-14 Thomas Lumley * Mark Myatt's fixes and extensions for read.epiinfo 2002-05-01 Kurt Hornik * DESCRIPTION (Version): New version is 0.5-4. * src/minitab.c: remove compatibility definitions for pre-1.2.0 as otherwise Rversion.h needs to be included explicitly for R 1.6.0. 2002-05-01 Brian Ripley * src/foreign.h: remove compatibility definitions for pre-1.2.0 as otherwise Rversion.h needs to be included explicitly for R 1.6.0. * DESCRIPTION: R >= 1.2.0 given the above change. 2002-04-29 Saikat DebRoy * src/spss.c, R/spss.R, man/read.spss.Rd: read.spss adds a "variable.labels" attribute to the result if any variable labels are present in the SPSS file. 2002-03-27 Douglas Bates * src/SASxport.c (IS_SASNA_CHAR): Silly typo (0x4l, not 0x41) caught by Peter. 2002-03-08 Thomas Lumley * Update stataread.c to read version 7/SE * Add support for Epi Info * SPSS: convert only some value labels to factor levels 2002-03-08 Brian Ripley * DESCRIPTION (Version): New version is 0.4-10. * minitab.c, pfm-read.c, spss.c: add casts as required. * configure.win: added to allow no-intervention installation on Windows. 2002-01-24 Kurt Hornik * DESCRIPTION (Version): New version is 0.4-9. 2002-01-11 Thomas Lumley read.spss reads factor levels, optionally coerces to data.frame 2001-12-13 Thomas Lumley . Typo in Stata date-handling provoked by gctorture() 2001-12-13 Kurt Hornik * src/sfm-read.c (bufread): Do not read in 0 bytes [fix by PD]. 2001-12-04 Kurt Hornik * DESCRIPTION (Version): New version is 0.4-8. 2001-11-13 Thomas Lumley revised factor reading in src/stataread.c, added factor writing for Stata, long names now abbreviate()d not truncated. Fixed various idiocies in writing strings. 2001-11-12 Thomas Lumley * src/stataread.c, R/read.dta.R, man/*.dta.Rd, tests/datefactor.dta, tests/stata.R: read factors, read and write dates in Stata. 2001-10-11 Thomas Lumley * src/stataread.c: use strlen(), not the field width, as the argument to allocString(). 2001-07-23 Saikat DebRoy * src/pfm-read.c, src/spss.c: Do not inline functions on non-gcc compilers. * src/sfmP.h: Don not use the __atribute__ keyword on non-gcc compilers. 2001-07-17 Brian Ripley * DESCRIPTION (Version): New version is 0.4-6. * src/sfm-read.c Use Free not free consistently. * src/spss.c (do_read_SPSS): Always open in binary mode. 2001-06-18 Kurt Hornik * DESCRIPTION (Version): New version is 0.4-5. * src/pfm-read.c (pfm_read_dictionary): Use Calloc() instead of R_alloc(). * src/sfm-read.c (sfm_read_dictionary): Use Calloc() instead of R_alloc(). * src/spss.c (do_read_SPSS): Check for null file pointer. 2001-06-09 Kurt Hornik * tests/*.R, tests/*.Rout.save: Remove `gctorture(TRUE)'. * R/*.R: Change name of filename argument to `file'. Add `PACKAGE' arg in FF calls where missing. Remove .First.lib() from stataread. * man/*.Rd: Change name of filename argument to `file', and be consistent about using keyword `file'. 2001-05-16 Saikat DebRoy * src/SASxport.c (next_xport_info): changed size of allocated array tmp - it must be at least 81. 2001-05-14 Saikat DebRoy * R/read.dta.R, src/stataread.c, man/read.dta.Rd, man/write.dta.Rd: Added Stata Version 7 support from Thomas Lumley 2001-04-09 Saikat DebRoy * src/SASxport.c (next_xport_info): initialized *tailpad to 0. Fixed value of *tailpad when end of file occurs while trying to get a new record (line 350). Fixed possible memory leaks in case of call to error. (xport_info): Fixed possible memory leaks in case of call to error. Removed most of the Calloc-ed arrays and replaced them with R objects. 2001-04-03 Saikat DebRoy * src/SASxport.c (next_xport_info): fixed computation of tailpad when restOfCard != 0. The earlier method used ftell which can give wrong results for long files. 2001-03-31 Brian Ripley * R/read.S.R, man/read.S.Rd: New files adapted from package Rstreams to read S3 objects and dumps. 2001-02-22 Saikat DebRoy * src/pfm-read.c: In read_version_data, added check for date and time with the first character of the field ' '. Removed check for second integer field in the Variable Count Record. Both of these changes are based on bug report by Akio Sone. 2001-02-06 Saikat DebRoy * src/SASxport.c: fixed problem with 8 character names in SAS XPORT format 2001-02-06 Saikat DebRoy * src/SASxport.c: fixed problem with 8 character names in SAS XPORT format 2001-01-24 Douglas Bates * src/SASxport.c: Fixing problem with calculation of the number of rows in SAS XPORT data sets when the rows are short 2001-01-24 Douglas Bates * src/SASxport.c (next_xport_info): Adding yet another rule to try to detect the number of rows in a SAS data set. 2000-12-14 Douglas Bates * cleanup: Added the cleanup script. * src/file-handle.h: Added declaration of fh_init_files to keep -Wall happy. * src/sfm-read.c (read_header): initialized skip_amt to keep -Wall happy. * tests/minitab.Rout.save: Added a missing blank line in this file and in others so they do not produce error reports during R CMD check. 1999-12-15 Douglas Bates * src/minitab.c (strtrim): Corrected the character count. (MTB2SEXP): Added the names of the columns, if they are given. 1999-12-16 Douglas Bates * DESCRIPTION (Package): Created a 0.1-1 release under the package name "foreign". * R/zzz.R: Added the copyright stuff. foreign/COPYRIGHTS0000644000175100001440000000504113245463577013357 0ustar hornikusersVarious files in this package have different copyrights. The DFB read/write facilities are based on code originally written by Nicholas Lewin-Koh and modified by Roger Bivand and Brian Ripley. R/dbf.R src/Rdbfread.c src/Rdbfwrite.c Copyright 2000-2001 (c) Nicholas Lewin-Koh Changes for the foreign package (C) 2004-7 R Core Team src/dbfopen.c src/shapefil.h Corrected versions of files from shapelib by Frank Warmerdam. The original files were (c) 1999, Frank Warmerdam. His code is available under the MIT or LGPL licence, and the latter is chosen here. man/read.dbf.Rd man/write.dbf.Rd Nicholas Lewin-Koh and Roger Bivand, Changes for the foreign package (C) 2004 R Core Team R/R_systat.R man/read.systat.Rd Copyright 2004 by Roger Bivand Changes for the foreign package (C) 2004 R Core Team src/R_systat.c Copyright (C) 1990-1992, 2004 Roger Bivand Patches (C) 2004 B. D. Ripley src/avl.c src/avl.h Copyright (C) 1998-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff (for libAVL: then , now ) Modified for R foreign package by Saikat DebRoy . The following files are based on an early version of PSPP (then , now ). src/file-handle.c src/file-handle.h src/format.c src/format.h src/pfm-read.c src/pfm-h src/sfm-read.c src/sfm.h src/sfmP.h Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign package by Saikat DebRoy and others. src/minitab.c src/SASxport.c Copyright 1999 Douglas M. Bates , Saikat DebRoy src/foreign.h src/spss.c Copyright 2000 Saikat DebRoy Thomas Lumley src/stata.c (c) 1999, 2000, 2001, 2002 Thomas Lumley. 2000 Saikat DebRoy man/read.dta.Rd man/write.dta.Rd man/write.foreign.Rd Thomas Lumley man/read.mtp.Rd Douglas M. Bates man/read.S.Rd Duncan Murdoch man/read.spss.Rd man/read.xport.Rd Saikat DebRoy R/read.ssd.R man/read.ssd.Rd (c) 2002 VJ Carey (c) 2002-7 R Core Team man/read.systat.Rd Roger Bivand R/read.epiinfo.R (c) 2002-4 Thomas Lumley Patches (c) 2002 Mark Myatt src/minitab.c Patches (c) 2004 Rajarshi Guha R/octave.R man/read.octave.Rd (c) 2004 Stephen Eglen Enhancements (c) 2004-7 R Core Team R/writeForeignSAS.R (c) 2004-5 R Core Team Enhancements (c) 2006 Stephen Weigand foreign/man/0000755000175100001440000000000014315047034012475 5ustar hornikusersforeign/man/read.S.Rd0000644000175100001440000000354113245463600014105 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{S3 read functions} \alias{data.restore} \alias{read.S} \title{Read an S3 Binary or data.dump File} \description{ Reads binary data files or \code{data.dump} files that were produced in S version 3. } \usage{ data.restore(file, print = FALSE, verbose = FALSE, env = .GlobalEnv) read.S(file) } \arguments{ \item{file}{the filename of the S-PLUS \code{data.dump} or binary file.} \item{print}{whether to print the name of each object as read from the file.} \item{verbose}{whether to print the name of every subitem within each object.} \item{env}{environment within which to create the restored object(s).} } \value{ For \code{read.S}, an R version of the S3 object. For \code{data.restore}, the name of the file. } \details{ \code{read.S} can read the binary files produced in some older versions of S-PLUS on either Windows (versions 3.x, 4.x, 2000) or Unix (version 3.x with 4 byte integers). It automatically detects whether the file was produced on a big- or little-endian machine and adapts itself accordingly. \code{data.restore} can read a similar range of files produced by \code{data.dump} and for newer versions of S-PLUS, those from \code{data.dump(....., oldStyle=TRUE)}. Not all S3 objects can be handled in the current version. The most frequently encountered exceptions are functions and expressions; you will also have trouble with objects that contain model formulas. In particular, comments will be lost from function bodies, and the argument lists of functions will often be changed. } \author{ Duncan Murdoch } \examples{## if you have an S-PLUS _Data file containing 'myobj' \dontrun{read.S(file.path("_Data", "myobj")) data.restore("dumpdata", print = TRUE) }} \keyword{data} \keyword{file} foreign/man/read.mtp.Rd0000644000175100001440000000150313712274705014504 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.mtp} \alias{read.mtp} \title{Read a Minitab Portable Worksheet} \description{ Return a list with the data stored in a file as a Minitab Portable Worksheet. } \usage{ read.mtp(file) } \arguments{ \item{file}{character variable with the name of the file to read. The file must be in Minitab Portable Worksheet format.} } \value{ A list with one component for each column, matrix, or constant stored in the Minitab worksheet. } \note{ This function was written around 1990 for the format current then. Later versions of Minitab appear to have added to the format. } \references{ \url{https://www.minitab.com/} } \author{Douglas M. Bates} \examples{ \dontrun{ read.mtp("ex1-10.mtp") } } \keyword{file} foreign/man/write.foreign.Rd0000644000175100001440000000511413245463572015561 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{write.foreign} \alias{write.foreign} \title{Write Text Files and Code to Read Them} \description{ This function exports simple data frames to other statistical packages by writing the data as free-format text and writing a separate file of instructions for the other package to read the data. } \usage{ write.foreign(df, datafile, codefile, package = c("SPSS", "Stata", "SAS"), ...) } \arguments{ \item{df}{A data frame} \item{datafile}{Name of file for data output} \item{codefile}{Name of file for code output} \item{package}{Name of package} \item{\dots}{Other arguments for the individual \code{writeForeign} functions} } \details{ The work for this function is done by \code{foreign:::writeForeignStata}, \code{foreign:::writeForeignSAS} and \code{foreign:::writeForeignSPSS}. To add support for another package, eg Systat, create a function \code{writeForeignSystat} with the same first three arguments as \code{write.foreign}. This will be called from \code{write.foreign} when \code{package="Systat"}. Numeric variables and factors are supported for all packages: dates and times (\code{Date}, \code{dates}, \code{date}, and \code{POSIXt} classes) and logical vectors are also supported for SAS and characters are supported for SPSS. For \code{package="SAS"} there are optional arguments \code{dataname = "rdata"} taking a string that will be the SAS data set name, \code{validvarname} taking either \code{"V6"} or \code{"V7"}, and \code{libpath = NULL} taking a string that will be the directory where the target SAS datset will be written when the generated SAS code been run. For \code{package="SPSS"} there is an optional argument \code{maxchars = 32L} taking an integer that causes the variable names (not variable labels) to be abbreviated to not more than \code{maxchars} chars. For compatibility with SPSS version 12 and before, change this to \code{maxchars = 8L}. In single byte locales with SPSS versions 13 or later, this can be set to \code{maxchars = 64L}. For \code{package="SPSS"}, as a side effect, the decimal indicator is always set by \code{SET DECIMAL=DOT.} which may override user settings of the indicator or its default derived from the current locale. } \value{ Invisible \code{NULL}. } \author{ Thomas Lumley and Stephen Weigand } \examples{\dontrun{ datafile <- tempfile() codefile <- tempfile() write.foreign(esoph, datafile, codefile, package="SPSS") file.show(datafile) file.show(codefile) unlink(datafile) unlink(codefile) }} \keyword{file} foreign/man/read.octave.Rd0000644000175100001440000000277414315041202015160 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later % Original copyright (c) 2004 Stephen Eglen % Changes copyright (c) 2004-10 R Development Core Team \name{read.octave} \alias{read.octave} \title{Read Octave Text Data Files} \description{ Read a file in Octave text data format into a list. } \usage{ read.octave(file) } \arguments{ \item{file}{a character string with the name of the file to read.} } \details{ This function is used to read in files in Octave text data format, as created by \code{save -text} in Octave. It knows about most of the common types of variables, including the standard atomic (real and complex scalars, matrices, and \eqn{N}-d arrays, strings, ranges, and boolean scalars and matrices) and recursive (structs, cells, and lists) ones, but has no guarantee to read all types. If a type is not recognized, a warning indicating the unknown type is issued, it is attempted to skip the unknown entry, and \code{NULL} is used as its value. Note that this will give incorrect results, and maybe even errors, in the case of unknown recursive data types. As Octave can read MATLAB binary files, one can make the contents of such files available to R by using Octave's load and save (as text) facilities as an intermediary step. } \value{ A list with one named component for each variable in the file. } \references{\url{https://octave.org/}} \author{Stephen Eglen \email{stephen@gnu.org} and Kurt Hornik} \keyword{file} foreign/man/read.epiinfo.Rd0000644000175100001440000000404213712274705015336 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.epiinfo} \alias{read.epiinfo} \title{Read Epi Info Data Files} \description{ Reads data files in the \code{.REC} format used by Epi Info versions 6 and earlier and by EpiData. Epi Info is a public domain database and statistics package produced by the US Centers for Disease Control and EpiData is a freely available data entry and validation system. } \usage{ read.epiinfo(file, read.deleted = FALSE, guess.broken.dates = FALSE, thisyear = NULL, lower.case.names = FALSE) } \arguments{ \item{file}{A filename, URL, or connection.} \item{read.deleted}{Deleted records are read if \code{TRUE}, omitted if \code{FALSE} or replaced with \code{NA} if \code{NA}.} \item{guess.broken.dates}{Attempt to convert dates with 0 or 2 digit year information (see \sQuote{Details}).} \item{thisyear}{A 4-digit year to use for dates with no year. Defaults to the current year.} \item{lower.case.names}{Convert variable names to lowercase?} } \details{ Epi Info allows dates to be specified with no year or with a 2 or 4 digits. Dates with four-digit years are always converted to \code{Date} class. With the \code{guess.broken.dates} option the function will attempt to convert two-digit years using the operating system's default method (see \link{Date}) and will use the current year or the \code{thisyear} argument for dates with no year information. If \code{read.deleted} is \code{TRUE} the \code{"deleted"} attribute of the data frame indicates the deleted records. } \note{ Some later versions of Epi Info use the Microsoft Access file format to store data. That may be readable with the \pkg{RODBC} package. } \value{ A data frame. } \references{ \url{https://www.cdc.gov/epiinfo/}, \url{http://www.epidata.dk} } \seealso{ \link{DateTimeClasses} } \examples{ \dontrun{## That file is not available read.epiinfo("oswego.rec", guess.broken.dates = TRUE, thisyear = "1972") } } \keyword{ file } foreign/man/lookup.xport.Rd0000644000175100001440000000200714167760261015460 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{lookup.xport} \alias{lookup.xport} \title{Lookup Information on a SAS XPORT Format Library} \description{ Scans a file as a SAS XPORT format library and returns a list containing information about the SAS library. } \usage{ lookup.xport(file) } \arguments{ \item{file}{character variable with the name of the file to read. The file must be in SAS XPORT format.} } \value{ A list with one component for each dataset in the XPORT format library. } \references{ SAS Technical Support document TS-140: \dQuote{The Record Layout of a Data Set in SAS Transport (XPORT) Format} available as \url{https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf} } \author{Saikat DebRoy} \seealso{ \code{\link{read.xport}} } \examples{ \dontrun{## no XPORT file is installed. lookup.xport("test.xpt") } } \keyword{file} foreign/man/read.arff.Rd0000644000175100001440000000162413620323201014606 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.arff} \alias{read.arff} \title{Read Data from ARFF Files} \description{ Reads data from Weka Attribute-Relation File Format (ARFF) files. } \usage{ read.arff(file) } \arguments{ \item{file}{a character string with the name of the ARFF file to read from, or a \code{\link{connection}} which will be opened if necessary, and if so closed at the end of the function call.} } \value{ A data frame containing the data from the ARFF file. } \references{ Attribute-Relation File Format \url{https://waikato.github.io/weka-wiki/formats_and_processing/arff/}. } \seealso{ \code{\link{write.arff}}; functions \code{write.arff} and \code{read.arff} in package \pkg{RWeka} which provide some support for logicals via conversion to or from factors. } \keyword{file} \keyword{connection} foreign/man/write.dbf.Rd0000644000175100001440000000642213712274705014663 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later % Original by Nicholas Lewin-Koh and Roger Bivand, % Changes for the foreign package (C) 2004-6 R Development Core Team \name{write.dbf} \alias{write.dbf} \title{Write a DBF File} \description{ The function tries to write a data frame to a DBF file. } \usage{ write.dbf(dataframe, file, factor2char = TRUE, max_nchar = 254) } \arguments{ \item{dataframe}{a data frame object.} \item{file}{a file name to be written to.} \item{factor2char}{logical, default \code{TRUE}, convert factor columns to character: otherwise they are written as the internal integer codes.} \item{max_nchar}{The maximum number of characters allowed in a character field. Strings which exceed this will be truncated with a warning. See Details.} } \details{ Dots in column names are replaced by underlines in the DBF file, and names are truncated to 11 characters. Only vector columns of classes \code{"logical"}, \code{"numeric"}, \code{"integer"}, \code{"character"}, \code{"factor"} and \code{"Date"} can be written. Other columns should be converted to one of these. Maximum precision (number of digits including minus sign and decimal sign) for numeric is 19 - scale (digits after the decimal sign) which is calculated internally based on the number of digits before the decimal sign. The original DBASE format limited character fields to 254 bytes. It is said that Clipper and FoxPro can read up to 32K, and it is possible to write a reader that could accept up to 65535 bytes. (The documentation suggests that only ASCII characters can be assumed to be supported.) Readers expecting the older standard (which includes Excel 2003, Access 2003 and OpenOffice 2.0) will truncate the field to the maximum width modulo 256, so increase \code{max_nchar} only if you are sure the intended reader supports wider character fields. } \value{ Invisible \code{NULL}. } \references{ \url{http://shapelib.maptools.org/} \url{https://www.clicketyclick.dk/databases/xbase/format/data_types.html} } \note{ Other applications have varying abilities to read the data types used here. Microsoft Access reads \code{"numeric"}, \code{"integer"}, \code{"character"} and \code{"Date"} fields, including recognizing missing values, but not \code{"logical"} (read as \code{0,-1}). Microsoft Excel understood all possible types but did not interpret missing values in character fields correctly (showing them as character nuls). } \author{ Nicholas J. Lewin-Koh, modified by Roger Bivand and Brian Ripley; shapelib by Frank Warmerdam. } \seealso{ \code{\link{read.dbf}} } \examples{ str(warpbreaks) try1 <- paste(tempfile(), ".dbf", sep = "") write.dbf(warpbreaks, try1, factor2char = FALSE) in1 <- read.dbf(try1) str(in1) try2 <- paste(tempfile(), ".dbf", sep = "") write.dbf(warpbreaks, try2, factor2char = TRUE) in2 <- read.dbf(try2) str(in2) unlink(c(try1, try2)) \dontshow{ DF <- data.frame(a=c(1:3, NA), b=c(NA, rep(pi, 3)), c=c(TRUE,NA, FALSE, TRUE), d=c("aa", "bb", NA, "dd"), e=I(c("a1", NA, NA, "a4"))) DF$f <- as.Date(c("2001-01-01", NA, NA, "2004-10-26")) str(DF) write.dbf(DF, try2) in2 <- read.dbf(try2) str(in2) unlink(try2) }} \keyword{file} foreign/man/read.spss.Rd0000644000175100001440000002416714315041235014675 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.spss} \alias{read.spss} \title{Read an SPSS Data File} \description{ \code{read.spss} reads a file stored by the SPSS \code{save} or \code{export} commands. This was orignally written in 2000 and has limited support for changes in SPSS formats since (which have not been many). } \usage{ read.spss(file, use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = Inf, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA, use.missings = to.data.frame, sub = ".", add.undeclared.levels = c("sort", "append", "no"), duplicated.value.labels = c("append", "condense"), duplicated.value.labels.infix = "_duplicated_", ...) } \arguments{ \item{file}{character string: the name of the file or URL to read.} \item{use.value.labels}{logical: convert variables with value labels into \R factors with those levels? This is only done if there are at least as many labels as values of the variable (when values without a matching label are returned as \code{NA}).} \item{to.data.frame}{logical: return a data frame?} \item{max.value.labels}{logical: only variables with value labels and at most this many unique values will be converted to factors if \code{TRUE}.} \item{trim.factor.names}{logical: trim trailing spaces from factor levels?} \item{trim_values}{logical: should values and value labels have trailing spaces ignored when matching for \code{use.value.labels = TRUE}?} \item{reencode}{logical: should character strings be re-encoded to the current locale. The default, \code{NA}, means to do so in UTF-8 or latin-1 locales, only. Alternatively a character string specifying an encoding to assume for the file.} \item{use.missings}{logical: should information on user-defined missing values be used to set the corresponding values to \code{NA}?} \item{sub}{character string: If not \code{NA} it is used by \code{\link{iconv}} to replace any non-convertible bytes in character/factor input. Default is \code{"."}. For back compatibility with \pkg{foreign} versions <= 0.8-68 use \code{sub=NA}.} \item{add.undeclared.levels}{character: specify how to handle variables with at least one value label and further non-missing values that have no value label (like a factor levels in R). For \code{"sort"} (the default) it adds undeclared factor levels to the already declared levels (and labels) and sort them according to level, for \code{"append"} it appends undeclared factor levels to declared levels (and labels) without sorting, and for \code{"no"} this does not convert to factor in case of numeric SPSS levels (not labels), and still converts to factor if the SPSS levels are characters and \code{to.data.frame=TRUE}. For back compatibility with \pkg{foreign} versions <= 0.8-68 use \code{add.undeclared.levels="no"} (not recommended as this may convert some values with missing corresponding value labels to \code{NA}).} \item{duplicated.value.labels}{character: what to do with duplicated value labels for different levels. For \code{"append"} (the default), the first original value label is kept while further duplicated labels are renamed to \code{paste0(label, duplicated.value.labels.infix, level)}, for \code{"condense"}, all levels with identical labels are condensed into exactly the first of these levels in R. Back compatibility with \pkg{foreign} versions <= 0.8-68 is not given as R versions >= 3.4.0 no longer support duplicated factor labels. } \item{duplicated.value.labels.infix}{character: the infix used for labels of factor levels with duplicated value labels in SPSS (default \code{"_duplicated_"}) if \code{duplicated.value.labels="append"}.} \item{...}{passed to \code{\link{as.data.frame}} if \code{to.data.frame = TRUE}.}} \value{ A list (or optionally a data frame) with one component for each variable in the saved data set. If what looks like a Windows codepage was recorded in the SPSS file, it is attached (as a number) as attribute \code{"codepage"} to the result. There may be attributes \code{"label.table"} and \code{"variable.labels"}. Attribute \code{"label.table"} is a named list of value labels with one element per variable, either \code{NULL} or a named character vector. Attribute \code{"variable.labels"} is a named character vector with names the short variable names and elements the long names. If there are user-defined missing values, there will be a attribute \code{"Missings"}. This is a named list with one list element per variable. Each element has an element \code{type}, a length-one character vector giving the type of missingness, and may also have an element \code{value} with the values corresponding to missingness. This is a complex subject (where the \R and C source code for \code{read.spss} is the main documentation), but the simplest cases are types \code{"one"}, \code{"two"} and \code{"three"} with a corresponding number of (real or string) values whose labels can be found from the \code{"label.table"} attribute. Other possibilities are a finite or semi-infinite range, possibly plus a single value. See also \url{http://www.gnu.org/software/pspp/manual/html_node/Missing-Observations.html#Missing-Observations}. } \details{ This uses modified code from the PSPP project (\url{http://www.gnu.org/software/pspp/} for reading the SPSS formats. If the filename appears to be a URL (of schemes \samp{http:}, \samp{ftp:} or \samp{https:}) the URL is first downloaded to a temporary file and then read. (\samp{https:} is supported where supported by \code{\link{download.file}} with its current default \code{method}.) Occasionally in SPSS, value labels will be added to some values of a continuous variable (e.g. to distinguish different types of missing data), and you will not want these variables converted to factors. By setting \code{max.value.labels} you can specify that variables with a large number of distinct values are not converted to factors even if they have value labels. If SPSS variable labels are present, they are returned as the \code{"variable.labels"} attribute of the answer. Fixed length strings (including value labels) are padded on the right with spaces by SPSS, and so are read that way by \R. The default argument \code{trim_values=TRUE} causes trailing spaces to be ignored when matching to value labels, as examples have been seen where the strings and the value labels had different amounts of padding. See the examples for \code{\link{sub}} for ways to remove trailing spaces in character data. URL \url{https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers} provides a list of translations from Windows codepage numbers to encoding names that \code{\link{iconv}} is likely to know about and so suitable values for \code{reencode}. Automatic re-encoding is attempted for apparent codepages of 200 or more in a UTF-8 or latin-1 locale: some other high-numbered codepages can be re-encoded on most systems, but the encoding names are platform-dependent (see \code{\link{iconvlist}}). } \note{ If SPSS value labels are converted to factors the underlying numerical codes will not in general be the same as the SPSS numerical values, since the numerical codes in R are always \eqn{1,2,3,\dots}. You may see warnings about the file encoding for SPSS \code{save} files: it is possible such files contain non-ASCII character data which need re-encoding. The most common occurrence is Windows codepage 1252, a superset of Latin-1. The encoding is recorded (as an integer) in attribute \code{"codepage"} of the result if it looks like a Windows codepage. Automatic re-encoding is done only in UTF-8 and latin-1 locales: see argument \code{reencode}. } \author{Saikat DebRoy and the R-core team} \seealso{ A different interface also based on the PSPP codebase is available in package \pkg{memisc}: see its help for \code{spss.system.file}. } \examples{ (sav <- system.file("files", "electric.sav", package = "foreign")) dat <- read.spss(file=sav) str(dat) # list structure with attributes dat <- read.spss(file=sav, to.data.frame=TRUE) str(dat) # now a data.frame ### Now we use an example file that is not very well structured and ### hence may need some special treatment with appropriate argument settings. ### Expect lots of warnings as value labels (corresponding to R factor labels) are uncomplete, ### and an unsupported long string variable is present in the data (sav <- system.file("files", "testdata.sav", package = "foreign")) ### Examples for add.undeclared.levels: ## add.undeclared.levels = "sort" (default): x.sort <- read.spss(file=sav, to.data.frame = TRUE) ## add.undeclared.levels = "append": x.append <- read.spss(file=sav, to.data.frame = TRUE, add.undeclared.levels = "append") ## add.undeclared.levels = "no": x.no <- read.spss(file=sav, to.data.frame = TRUE, add.undeclared.levels = "no") levels(x.sort$factor_n_undeclared) levels(x.append$factor_n_undeclared) str(x.no$factor_n_undeclared) ### Examples for duplicated.value.labels: ## duplicated.value.labels = "append" (default) x.append <- read.spss(file=sav, to.data.frame=TRUE) ## duplicated.value.labels = "condense" x.condense <- read.spss(file=sav, to.data.frame=TRUE, duplicated.value.labels = "condense") levels(x.append$factor_n_duplicated) levels(x.condense$factor_n_duplicated) as.numeric(x.append$factor_n_duplicated) as.numeric(x.condense$factor_n_duplicated) ## Long Strings (>255 chars) are imported in consecutive separate variables ## (see warning about subtype 14): x <- read.spss(file=sav, to.data.frame=TRUE, stringsAsFactors=FALSE) cat.long.string <- function(x, w=70) cat(paste(strwrap(x, width=w), "\n")) ## first part: x$string_500: cat.long.string(x$string_500) ## second part: x$STRIN0: cat.long.string(x$STRIN0) ## complete long string: long.string <- apply(x[,c("string_500", "STRIN0")], 1, paste, collapse="") cat.long.string(long.string) } \keyword{file} foreign/man/write.dta.Rd0000644000175100001440000001354113712274705014700 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{write.dta} \alias{write.dta} \title{Write Files in Stata Binary Format} \usage{ write.dta(dataframe, file, version = 7L, convert.dates = TRUE, tz = "GMT", convert.factors = c("labels", "string", "numeric", "codes")) } \arguments{ \item{dataframe}{a data frame.} \item{file}{character string giving filename.} \item{version}{integer: Stata version: 6, 7, 8 and 10 are supported, and 9 is mapped to 8, 11 to 10.} \item{convert.dates}{logical: convert \code{Date} and \code{POSIXct} objects: see section \sQuote{Dates}.} \item{tz}{timezone for date conversion.} \item{convert.factors}{how to handle factors.} } \description{ Writes the data frame to file in the Stata binary format. Does not write array variables unless they can be \code{\link{drop}}-ed to a vector. Frozen: will not support Stata formats after 10 (also used by Stata 11). } \details{ The major difference between supported file formats in Stata versions is that version 7.0 and later allow 32-character variable names (5 and 6 were restricted to 8-character names). The \code{abbreviate} function is used to trim variable names to the permitted length. A warning is given if this is needed and it is an error for the abbreviated names not to be unique. Each version of Stata is claimed to be able to read all earlier formats. The columns in the data frame become variables in the Stata data set. Missing values are handled correctly. There are four options for handling factors. The default is to use Stata \sQuote{value labels} for the factor levels. With \code{convert.factors = "string"}, the factor levels are written as strings (the name of the value label is taken from the \code{"val.labels"} attribute if it exists or the variable name otherwise). With \code{convert.factors = "numeric"} the numeric values of the levels are written, or \code{NA} if they cannot be coerced to numeric. Finally, \code{convert.factors = "codes"} writes the underlying integer codes of the factors. This last used to be the only available method and is provided largely for backwards compatibility. If the \code{"label.table"} attribute contains value labels with names not already attached to a variable (not the variable name or name from \code{"val.labels"}) then these will be written out as well. If the \code{"datalabel"} attribute contains a string, it is written out as the dataset label otherwise the dataset label is \code{"Written by R."}. If the \code{"expansion.table"} attribute exists expansion fields are written. This attribute should contain a \code{\link{list}} where each element is \code{\link{character}} vector of length three. The first vector element contains the name of a variable or "_dta" (meaning the dataset). The second element contains the characeristic name. The third contains the associated data. If the \code{"val.labels"} attribute contains a \code{\link{character}} vector with a string label for each value then this is written as the value labels. Otherwise the variable names are used. % ../src/stataread.c, l. 881 If the \code{"var.labels"} attribute contains a \code{\link{character}} vector with a string label for each variable then this is written as the variable labels. Otherwise the variable names are repeated as variable labels. For Stata 8 or later use the default \code{version = 7} -- the only advantage of Stata 8 format over 7 is that it can represent multiple different missing value types, and \R doesn't have them. Stata 10/11 allows longer format lists, but \R does not make use of them. Note that the Stata formats are documented to use ASCII strings -- \R does not enforce this, but use of non-ASCII character strings will not be portable as the encoding is not recorded. Up to 244 bytes are allowed in character data, and longer strings will be truncated with a warning. Stata uses some large numerical values to represent missing values. This function does not currently check, and hence integers greater than \code{2147483620} and doubles greater than \code{8.988e+307} may be misinterpreted by Stata. } \section{Dates}{ Unless disabled by argument \code{convert.dates = FALSE}, \R date and date-time objects (\code{POSIXt} classes) are converted into the Stata date format, the number of days since 1960-01-01. (For date-time objects this may lose information.) Stata can be told that these are dates by \preformatted{format xdate \%td;} It is possible to pass objects of class \code{POSIXct} to Stata to be treated as one of its versions of date-times. Stata uses the number of milliseconds since 1960-01-01, either excluding (format \code{\%tc}) or counting (format \code{\%tC}) leap seconds. So either an object of class \code{POSICct} can be passed to Stata with \code{convert.dates = FALSE} and converted in Stata, or \code{315619200} should be added and then multiplied by \code{1000} before passing to \code{write.dta} and assigning format \code{\%tc}. Stata's comments on the first route are at \url{https://www.stata.com/manuals13/ddatetime.pdf}, but at the time of writing were wrong: \R uses POSIX conventions and hence does not count leap seconds. } \value{ \code{NULL} } \references{ Stata 6.0 Users Manual, Stata 7.0 Programming manual, Stata online help (version 8 and later, also \url{https://www.stata.com/help.cgi?dta_114} and \url{https://www.stata.com/help.cgi?dta_113}) describe the file formats. } \author{ Thomas Lumley and R-core members: support for value labels by Brian Quistorff. } \seealso{ \code{\link{read.dta}}, \code{\link{attributes}}, \code{\link{DateTimeClasses}}, \code{\link{abbreviate}} } \examples{ write.dta(swiss, swissfile <- tempfile()) read.dta(swissfile) } \keyword{file} foreign/man/read.systat.Rd0000644000175100001440000000416313245463574015245 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later % Original copyright 2004 by Roger Bivand % Changes for the foreign package (C) 2004 R Development Core Team \name{read.systat} \alias{read.systat} \title{Obtain a Data Frame from a Systat File} \description{ \code{read.systat} reads a rectangular data file stored by the Systat \code{SAVE} command as (legacy) \code{*.sys} or more recently \code{*.syd} files. } \usage{ read.systat(file, to.data.frame = TRUE) } \arguments{ \item{file}{character variable with the name of the file to read} \item{to.data.frame}{return a data frame (otherwise a list)} } \details{ The function only reads those Systat files that are rectangular data files (\code{mtype = 1}), and warns when files have non-standard variable name codings. The files tested were produced on MS-DOS and Windows: files for the Mac version of Systat have a completely different format. The C code was originally written for an add-on module for Systat described in Bivand (1992 paper). Variable names retain the trailing dollar in the list returned when \code{to.data.frame} is \code{FALSE}, and in that case character variables are returned as is and filled up to 12 characters with blanks on the right. The original function was limited to reading Systat files with up to 256 variables (a Systat limitation); it will now read up to 8192 variables. If there is a user comment in the header this is returned as attribute \code{"comment"}. Such comments are always a multiple of 72 characters (with a maximum of 720 chars returned), normally padded with trailing spaces. } \value{ A data frame (or list) with one component for each variable in the saved data set. } \references{ Systat Manual, 1987, 1989\cr Bivand, R. S. (1992) SYSTAT-compatible software for modelling spatial dependence among observations. \emph{Computers and Geosciences} \bold{18}, 951--963. } \author{Roger Bivand} \examples{ summary(iris) iris.s <- read.systat(system.file("files/Iris.syd", package="foreign")[1]) str(iris.s) summary(iris.s) } \keyword{file} foreign/man/read.xport.Rd0000644000175100001440000000320414167760745015071 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.xport} \alias{read.xport} \title{Read a SAS XPORT Format Library} \description{ Reads a file as a SAS XPORT format library and returns a list of data.frames. } \usage{ read.xport(file, ...) } \arguments{ \item{file}{character variable with the name of the file to read. The file must be in SAS XPORT format.} \item{...}{passed to \code{\link{as.data.frame}} when creating the data frames.} } \value{ If there is a more than one dataset in the XPORT format library, a named list of data frames, otherwise a data frame. The columns of the data frames will be either numeric (corresponding to numeric in SAS) or factor (corresponding to character in SAS). All SAS numeric missing values (including special missing values represented by \code{._}, \code{.A} to \code{.Z} by SAS) are mapped to \R \code{NA}. Trailing blanks are removed from character columns before conversion to a factor. Some sources claim that character missing values in SAS are represented by \code{' '} or \code{''}: these are not treated as \R missing values. } \references{ SAS Technical Support document TS-140: ``The Record Layout of a Data Set in SAS Transport (XPORT) Format'' available at \url{https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf} } \author{Saikat DebRoy \email{saikat@stat.wisc.edu}} \seealso{ \code{\link{lookup.xport}} } \examples{ \dontrun{## no XPORT file is installed read.xport("test.xpt") } } \keyword{file} foreign/man/read.ssd.Rd0000644000175100001440000000566713245463572014517 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later % Original copyright (c) 2002 VJ Carey % Changes copyright (c) 2002-13 R Core Team \name{read.ssd} \alias{read.ssd} \title{Obtain a Data Frame from a SAS Permanent Dataset, via read.xport } \description{ Generates a SAS program to convert the ssd contents to SAS transport format and then uses \code{read.xport} to obtain a data frame. } \usage{ read.ssd(libname, sectionnames, tmpXport=tempfile(), tmpProgLoc=tempfile(), sascmd="sas") } \arguments{ \item{libname}{character string defining the SAS library (usually a directory reference)} \item{sectionnames}{character vector giving member names. These are files in the \code{libname} directory. They will usually have a \code{.ssd0x} or \code{.sas7bdat} extension, which should be omitted. Use of ASCII names of at most 8 characters is strongly recommended.} \item{tmpXport}{character string: location where temporary xport format archive should reside -- defaults to a randomly named file in the session temporary directory, which will be removed.} \item{tmpProgLoc}{character string: location where temporary conversion SAS program should reside -- defaults to a randomly named file in session temporary directory, which will be removed on successful operation.} \item{sascmd}{character string giving full path to SAS executable.} } \details{ Creates a SAS program and runs it. Error handling is primitive. } \value{ A data frame if all goes well, or \code{NULL} with warnings and some enduring side effects (log file for auditing) } \author{ For Unix: VJ Carey \email{stvjc@channing.harvard.edu} } \note{ \strong{This requires SAS to be available.} If you have a SAS dataset without access to SAS you will need another product to convert it to a format such as \code{.csv}, for example \sQuote{Stat/Transfer} or \sQuote{DBMS/Copy} or the \sQuote{SAS System Viewer} (Windows only). SAS requires section names to be no more than 8 characters. This is worked by the use of symbolic links: these are barely supported on Windows. } \seealso{\code{\link{read.xport}}} \examples{ ## if there were some files on the web we could get a real ## runnable example \dontrun{ R> list.files("trialdata") [1] "baseline.sas7bdat" "form11.sas7bdat" "form12.sas7bdat" [4] "form13.sas7bdat" "form22.sas7bdat" "form23.sas7bdat" [7] "form3.sas7bdat" "form4.sas7bdat" "form48.sas7bdat" [10] "form50.sas7bdat" "form51.sas7bdat" "form71.sas7bdat" [13] "form72.sas7bdat" "form8.sas7bdat" "form9.sas7bdat" [16] "form90.sas7bdat" "form91.sas7bdat" R> baseline <- read.ssd("trialdata", "baseline") R> form90 <- read.ssd("trialdata", "form90") ## Or for a Windows example sashome <- "/Program Files/SAS/SAS 9.1" read.ssd(file.path(sashome, "core", "sashelp"), "retail", sascmd = file.path(sashome, "sas.exe")) } } \keyword{file} foreign/man/read.dbf.Rd0000644000175100001440000000520013712274705014435 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later % Original by Nicholas Lewin-Koh and Roger Bivand, % Changes for the foreign package (C) 2004-15 R Core Team \name{read.dbf} \alias{read.dbf} \title{Read a DBF File} \description{ The function reads a DBF file into a data frame, converting character fields to factors, and trying to respect NULL fields. The DBF format is documented but not much adhered to. There is is no guarantee this will read all DBF files. } \usage{ read.dbf(file, as.is = FALSE) } \arguments{ \item{file}{name of input file} \item{as.is}{should character vectors not be converted to factors?} } \details{ DBF is the extension used for files written for the \sQuote{XBASE} family of database languages, \sQuote{covering the dBase, Clipper, FoxPro, and their Windows equivalents Visual dBase, Visual Objects, and Visual FoxPro, plus some older products} (\url{https://www.clicketyclick.dk/databases/xbase/format/}). Most of these follow the file structure used by Ashton-Tate's dBase II, III or 4 (later owned by Borland). \code{read.dbf} is based on C code from \url{http://shapelib.maptools.org/} which implements the \sQuote{XBASE} specification. It can convert fields of type \code{"L"} (logical), \code{"N"} and \code{"F"} (numeric and float) and \code{"D"} (dates): all other field types are read as-is as character vectors. A numeric field is read as an \R integer vector if it is encoded to have no decimals, otherwise as a numeric vector. However, if the numbers are too large to fit into an integer vector, it is changed to numeric. Note that is possible to read integers that cannot be represented exactly even as doubles: this sometimes occurs if IDs are incorrectly coded as numeric. } \value{ A data frame of data from the DBF file; note that the field names are adjusted to use in R using \code{\link{make.names}(unique=TRUE)}. There is an attribute \code{"data_type"} giving the single-character dBase types for each field. } \references{ \url{http://shapelib.maptools.org/}. % site is 'unavailable' in Aug 2015. % The Borland file specification \emph{via} \url{http://www.wotsit.org}, % currently at \url{http://www.wotsit.org/list.asp?fc=6}. } \author{ Nicholas Lewin-Koh and Roger Bivand; shapelib by Frank Warmerdam } \note{ Not to be able to read a particular \sQuote{DBF} file is not a bug: this is a convenience function especially for shapefiles. } \seealso{ \code{\link{write.dbf}} } \examples{ x <- read.dbf(system.file("files/sids.dbf", package="foreign")[1]) str(x) summary(x) } \keyword{file} foreign/man/write.arff.Rd0000644000175100001440000000273213620323201015026 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{write.arff} \alias{write.arff} \title{Write Data into ARFF Files} \description{ Writes data into Weka Attribute-Relation File Format (ARFF) files. } \usage{ write.arff(x, file, eol = "\n", relation = deparse(substitute(x))) } \arguments{ \item{x}{the data to be written, preferably a matrix or data frame. If not, coercion to a data frame is attempted.} \item{file}{either a character string naming a file, or a connection. \code{""} indicates output to the standard output connection.} \item{eol}{the character(s) to print at the end of each line (row).} \item{relation}{The name of the relation to be written in the file.} } \details{ \code{relation} will be passed through \code{\link{make.names}} before writing to the file, in an attempt to it them acceptable to Weka, and column names what do not start with an alphabetic character will have \code{X} prepended. However, the references say that ARFF files are ASCII files, and that encoding is not enforced. } \references{ Attribute-Relation File Format \url{https://waikato.github.io/weka-wiki/formats_and_processing/arff/}. } \seealso{ \code{\link{read.arff}}; functions \code{write.arff} and \code{read.arff} in package \pkg{RWeka} which provide some support for logicals via conversion to or from factors. } \examples{ write.arff(iris, file = "") } \keyword{print} \keyword{file} foreign/man/read.dta.Rd0000644000175100001440000001031413712274705014454 0ustar hornikusers% This file is part of the 'foreign' package for R % It is distributed under the GPL version 2 or later \name{read.dta} \alias{read.dta} \title{Read Stata Binary Files} \description{ Reads a file in Stata version 5--12 binary format into a data frame. Frozen: will not support Stata formats after 12. } \usage{ read.dta(file, convert.dates = TRUE, convert.factors = TRUE, missing.type = FALSE, convert.underscore = FALSE, warn.missing.labels = TRUE) } \arguments{ \item{file}{a filename or URL as a character string.} \item{convert.dates}{Convert Stata dates to \code{Date} class, and date-times to \code{POSIXct} class?} \item{convert.factors}{Use Stata value labels to create factors? (Version 6.0 or later).} \item{missing.type}{For version 8 or later, store information about different types of missing data?} \item{convert.underscore}{Convert \code{"_"} in Stata variable names to \code{"."} in R names?} \item{warn.missing.labels}{Warn if a variable is specified with value labels and those value labels are not present in the file.} } \details{ If the filename appears to be a URL (of schemes \samp{http:}, \samp{ftp:} or \samp{https:}) the URL is first downloaded to a temporary file and then read. (\samp{https:} is only supported on some platforms.) The variables in the Stata data set become the columns of the data frame. Missing values are correctly handled. The data label, variable labels, timestamp, and variable/dataset characteristics are stored as attributes of the data frame. By default Stata dates (\%d and \%td formats) are converted to \R's \code{Date} class, and variables with Stata value labels are converted to factors. Ordinarily, \code{read.dta} will not convert a variable to a factor unless a label is present for every level. Use \code{convert.factors = NA} to override this. In any case the value label and format information is stored as attributes on the returned data frame. Stata's date formats are sketchily documented: if necessary use \code{convert.dates = FALSE} and examine the attributes to work out how to post-process the dates. Stata 8 introduced a system of 27 different missing data values. If \code{missing.type} is \code{TRUE} a separate list is created with the same variable names as the loaded data. For string variables the list value is \code{NULL}. For other variables the value is \code{NA} where the observation is not missing and 0--26 when the observation is missing. This is attached as the \code{"missing"} attribute of the returned value. The default file format for Stata 13, \code{format-115}, is substantially different from those for Stata 5--12. } \value{ A data frame with attributes. These will include \code{"datalabel"}, \code{"time.stamp"}, \code{"formats"}, \code{"types"}, \code{"val.labels"}, \code{"var.labels"} and \code{"version"} and may include \code{"label.table"} and \code{"expansion.table"}. Possible versions are \code{5, 6, 7}, \code{-7} (Stata 7SE, \sQuote{format-111}), \code{8} (Stata 8 and 9, \sQuote{format-113}), \code{10} (Stata 10 and 11, \sQuote{format-114}). and \code{12} (Stata 12, \sQuote{format-115}). The value labels in attribute \code{"val.labels"} name a table for each variable, or are an empty string. The tables are elements of the named list attribute \code{"label.table"}: each is an integer vector with names. } \references{ Stata Users Manual (versions 5 & 6), Programming manual (version 7), or online help (version 8 and later) describe the format of the files. Or directly at \url{https://www.stata.com/help.cgi?dta_114} and \url{https://www.stata.com/help.cgi?dta_113}, but note that these have been changed since first published. } \author{ Thomas Lumley and R-core members: support for value labels by Brian Quistorff. } \seealso{ Different approaches are available in package \pkg{memisc} (see its help for \code{Stata.file}), function \code{read_dta} in package \pkg{haven} and package \pkg{readstata13}. \code{\link{write.dta}}, \code{\link{attributes}}, \code{\link{Date}}, \code{\link{factor}} } \examples{ write.dta(swiss,swissfile <- tempfile()) read.dta(swissfile) } \keyword{file} foreign/DESCRIPTION0000644000175100001440000000412214531305705013431 0ustar hornikusersPackage: foreign Priority: recommended Version: 0.8-86 Date: 2023-11-26 Title: Read Data Stored by 'Minitab', 'S', 'SAS', 'SPSS', 'Stata', 'Systat', 'Weka', 'dBase', ... Depends: R (>= 4.0.0) Imports: methods, utils, stats Authors@R: c( person("R Core Team", email = "R-core@R-project.org", role = c("aut", "cph", "cre")), person("Roger", "Bivand", role = c("ctb", "cph")), person(c("Vincent", "J."), "Carey", role = c("ctb", "cph")), person("Saikat", "DebRoy", role = c("ctb", "cph")), person("Stephen", "Eglen", role = c("ctb", "cph")), person("Rajarshi", "Guha", role = c("ctb", "cph")), person("Swetlana", "Herbrandt", role = "ctb"), person("Nicholas", "Lewin-Koh", role = c("ctb", "cph")), person("Mark", "Myatt", role = c("ctb", "cph")), person("Michael", "Nelson", role = "ctb"), person("Ben", "Pfaff", role = "ctb"), person("Brian", "Quistorff", role = "ctb"), person("Frank", "Warmerdam", role = c("ctb", "cph")), person("Stephen", "Weigand", role = c("ctb", "cph")), person("Free Software Foundation, Inc.", role = "cph")) Contact: see 'MailingList' Copyright: see file COPYRIGHTS Description: Reading and writing data stored by some versions of 'Epi Info', 'Minitab', 'S', 'SAS', 'SPSS', 'Stata', 'Systat', 'Weka', and for reading and writing some 'dBase' files. ByteCompile: yes Biarch: yes License: GPL (>= 2) BugReports: https://bugs.r-project.org MailingList: R-help@r-project.org URL: https://svn.r-project.org/R-packages/trunk/foreign/ NeedsCompilation: yes Packaged: 2023-11-26 16:54:35 UTC; ripley Author: R Core Team [aut, cph, cre], Roger Bivand [ctb, cph], Vincent J. Carey [ctb, cph], Saikat DebRoy [ctb, cph], Stephen Eglen [ctb, cph], Rajarshi Guha [ctb, cph], Swetlana Herbrandt [ctb], Nicholas Lewin-Koh [ctb, cph], Mark Myatt [ctb, cph], Michael Nelson [ctb], Ben Pfaff [ctb], Brian Quistorff [ctb], Frank Warmerdam [ctb, cph], Stephen Weigand [ctb, cph], Free Software Foundation, Inc. [cph] Maintainer: R Core Team Repository: CRAN Date/Publication: 2023-11-28 06:42:13 UTC foreign/tests/0000755000175100001440000000000013600604447013067 5ustar hornikusersforeign/tests/pc5.dta0000644000175100001440000017676513245463571014304 0ustar hornikusersiLS@LL|@14 Feb 1997 14:22ffffffffffffffffffffffffagealbalkphosascitesbilicholedemaxedemarxhepmegtimeplateeprotimesexsgotrsspidersstagecensrxgtrigrcopperidfirstlatet0 %9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0gDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4BDvC,A?4Bentry timeDvC,A?4B_dtaL_dtarLst_dtaLst_idid_dtaLst_dcens_dtaLst_t0t0_dtaLst_ttimekBff&@D?hAC???C>C33CA?3 C?@??,CC?aBz@fĚ?C?D]C)A?= B?@@?BXB@?aBz@fĚ?C?E]C)A?= B?@@?BXB@?D,%BR^@D33?0C??}DC@A33B@??\BRC@@`ZB\"@fNEff?tC???D7C$A?rB?@?BB@?`ZB\"@fNEff?tC???D7C$A?rB?@??BB@?DkBa@'DY@C?DCff.A?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C?D|B(|@?DjC8AC?|B(|@?XEjC8AC?DB)\O@ff?DAC?B)\O@ff?ؕEAC?DPBHZ@?DvC$ACDB)\@?D333AC?DB)\@?E333AC?DXBfff@?DAAC?XBfff@?EAA?C?D|BY@333?DC!A?CXBQh@`@DC$AC?XBQh@`@@DC$A?C?D8B c@ffF@?BCYA?CTB7@IA?@DDBCAC?xB\R@333?pE>CAC?DLBffF@333?DC)AC?LBffF@333?DC)AC?DPB)\O@?`DgC(AC0BQh@ADC33#A?CBףp@ @D}CffAC?Bףp@ @`D}CffAC?DpBg@ff??DaCffA?C|BR.@33S@??@D`C1A?CB\@9@DC(AC?B\@9@DC(AC?D$Bq=j@?DB0AC?$Bq=j@?`DB0AC?DLB%@`A]C>C9A?CB@@L??DB,AClBY@ff?DsC33AC?lBY@ff?DsC33AC?D\B;@333?DQC)AC?\B;@333?`DQC)AC?DXBQ@?D&CAC?XBQ@?D&CAC?DDB@@YA?DiCffAC?DB@@YA?DiCffAC?D B`@fff?DBff.AC? B`@fff?DBff.AC?DB C@333??D%C AC?B C@333??D%C AC?DBI@@@`D C AC$B333@?`DB0ACBA@>D-Cff.ACPBp=@333???ACCffA?CdBzD@@??DBAACBR~@33? DC0ACHBR^@?DC33#ACBi@?DC33#ACxB)\_@@D=Cff.AC(Bz4@ADACff&AC0BU@?DC)ACB(L@ff@iDB1A?CPBף@@L?kDC)ACBU@ @DC,AC Bfff@33@DCff&ACPBh@?DC)AC8B+@@/D[C8A?CXB(l@̌? D\C,ACLBHJ@33??D"C33+AC,BRn@333?`DVC,ACB s@?DC,ACLBzd@?DC)ACBe@? DtC,AC BRN@333?@wDC,ACBp=@?@*D.Cff.A?CBu@fff?D4C333ACdBHZ@?DCffAChBp@L?,DCff&ACTB\R@333?tDC)ACforeign/tests/xxx12.dta0000644000175100001440000000242613245463570014564 0ustar hornikuserss ǏTҶf'ff23 Jan 2014 20:44xexcnxbigcxdate%19s%9.0g%9.0g%9.0g%%tc1f%12.0gc%9.0ggc%tC1f%td0g(ƀ8K@'`~NiK8K(ƀ8K@'`~NiK8K(ƀ8K@'`~NiK8K(ƀ8K@'`~NiK8K2014-01-23 20:07:16XxB,^xB"M2014-01-23 20:07:17PXxBk^xB"M2014-01-23 20:07:18XxB^xB"M2014-01-23 20:07:19XxB^xB"M2014-01-23 20:07:20 YxB&_xB"M2014-01-23 20:07:21JYxBe_xB"M2014-01-23 20:07:22YxB_xB"M2014-01-23 20:07:23YxB_xB"M2014-01-23 20:07:24ZxB `xB"M2014-01-23 20:07:25DZxB_`xB"Mforeign/tests/pbc.sys0000644000175100001440000012207013245463571014403 0ustar hornikusers PCSPSS SYSTEM FILE. IBM PC DOS, SPSS for Windows &12/12/0013:01:50Written by SPSS for Windows  $CASENUM&$DATE &$WEIGHT &AGE &ALB &ALKPHOS &ASCITES &BILI &CHOL &EDEMA &EDTRT &HEPMEG &TIME &PLATELET&PROTIME &SEX &SGOT &SPIDERS &STAGE &STATUS &TRT &TRIG &COPPER &jjj12/12/00saM@@ؚ@-@jjjjPp@y@g@ffffff(@jmjjkfffff>a@e@c@ji12/12/007[ 9L@(\@@?r@iijj@k@333333%@zGa\@jlijl12/12/00jij"lxzQ@ףp= @ @ffffff?f@iuii?@b@fffffX@mjjmj@j@12/12/00ijt^K@RQ@@?n@?jjjm@f@$@q= ףPN@jjũnj12/12/00H} C@iiij= ףp= @@333333 @pq@jjli@%@I\@koj12/12/00jqP@ףp= @iiij@?o@@`tjiljkpj12/12/008mK@\(\@@ijiij t@@i@jilikffffff#@9N@j@qjmi12/12/0048EJ@33333+@iiit333333?q@D@Pw@jiljkzGa<@g@rji12/12/00AE@p= ף@ȡ@ @iiitj@@`o@jkjjsb@jj12/12/00AfգQ@Q@@333333)@i@jjijr@'@hb@jmjkt12/12/00jiiN@aJ@p= ף@@@ffffff?0p@ijujjd@ p@33333S@mjkuj12/12/00iiiuM@)\( @x@ @m@ijjms@333333+@T@jkvj12/12/00~:F@iiii@t@ffffff?q@jili@n@333333%@fffffV@kwj12/12/00\ AcL@)\(@j`jjj@?@tiimjkc@`xj12/12/00|гY)P@(\@ffff@iiii?l@@pr@tjiljj= ףp_@yjie@12/12/00T㥛8D@HzG @h@iiiffffff?i@@h@%@jilikfffff6R@zji12/12/00 yJ@333333 @@@iijj q@@l@%@imjk{33333s]@c@ji12/12/00^)J@ffffff@@&@@f@jjjjq@(@̈q@jmjj|i@`@12/12/00jiiH@{Gz @d@ffffff?`m@jtji?@ j@lij}j12/12/00iii5^I M@Gz @@ffffff@`w@jvjim0@ t@̜^@jk~j12/12/00 P@iiijp= ף@X@333333?o@ijmi@u@&@fffffFP@kj12/12/00Zd#L@ ףp= @iiii@333333 @p@@jjmjje@333333'@9^@j}@12/12/00K@Q@̰@jjjjffffff1@x@p@j@jjmjkffffff'@zGal@g@jmip@12/12/00BF@W@iij@|@ޯ@#@iikjj\(k@l@ji12/12/00^F@ffffff@@ffffff?iiijr@@@t@&@ikik̼Z@ji12/12/00&J@q= ףp @8@@@iijj@Pz@#@33333d@jljkd@12/12/00jjjcZB>8K@{Gz @@5@e@jujj? ףp=zY@mjkje@k@12/12/00jjj[ AyF@ףp= @ܞ@3333331@k@jvjjm(@33333g@jkj`h@ j@12/12/00~:O@iiii= ףp=@ɶ@ffffff? w@jiki@`x@333333%@RaR@kj12/12/00oTD@RQ@iiijm@ @@p@t@tjjmjkq= ףP^@jc@e@12/12/00' D@Q @f@iiij@r@@`h@jikjkΚ$@i@ۉji12/12/00 yJ@Q @m@iij?`p@@q@333333%@jimikΤp= ףT@c@ji12/12/00#J{/I@Q @@?iiiuj@j@Ĩ@f@iljkڻQk@ji12/12/003J@ @@?v@iiij@q@%@Pe@ikij12/12/00jiia4OH@ @fffff@333333?s@iiji>@z@333333%@(\R@ljkjb@ i@12/12/00iii;Nё4L@Q @p@333333?e@ijik6@ps@333333%@33333Q@ik{j12/12/00H.!N@jjjjGz@33333@ffffff@t@ujimjk@33333f@jj12/12/00K7APB@= ףp= @iiijH@ffffff @w@X@tjjmjk@m@fffff>a@ϐjl12/12/003K@fffff@iiijffffff?q@@@jimjj333333%@(\R@ji12/12/001UG@Q @L@`iiit?s@`v@jimij`ҏ(\Z@ji12/12/00K7@@Gz @@333333@`iijj@@l@ffffff'@imjj`ɓb@ji`12/12/00C@@RQ @%@@iijtje@u@zGaL@jmik`12/12/00jiiooH@Q @333336@?v@iiji̱@`i@333333%@QP@kijj12/12/00ijj(\B@ffffff @@ffffff @r@jjjlȪ@h@ffffff'@fffff]@jkj12/12/00ZڊD@i`iiiq= ףp@@333333?jikir@}@%@33333Q@k`|j12/12/00?F@Q@iiij@@ ~@@jiljj0@ffffff)@Hza@jd@ d@12/12/00I&¶G@333333 @К@iiii?s@ @@v@jilik#@qg@ji12/12/00hoH@ @fffffN@iiitffffff?0p@K@j@iilik{Gg@@f@q@ji12/12/00OeN@(\@0@?`iijtj @ m@imjk`iX@ji12/12/00p_J@zG @@?p@iijjL@333333%@̼Z@imjj12/12/00jiiz6 J@ @@?@q@iiji@q@333333%@QX@kjkj12/12/00ioii>yX5EI@ @fffffܳ@0@iiij@v@333333%@i@jjjc@12/12/00RI&P@i`iij@333338@@tjimj@@j@zGaL@j`ǟj12/12/00 QC@333333 @jjjj33333o@?r@h@tjjmjjo@RaR@j`p@12/12/00DpP@Q@@iiii?z@@@j@tiiljjQS@`k@ji12/12/00,Ԛ@@ffffff@33333@iij? @ܜ@v@333333%@jjkjk= ףpW@s@ji12/12/00x&J@q= ףp @@ffffff@jjj@p@?@k@(@iljjRqZ@l@ji12/12/007A`HF@RQ@@ffffff?@n@iii`ik@333333%@zGaL@ijij߲12/12/00jii h"lx2D@ @ƽ@?t@ijjj`@t@333333%@{G_@ljj嚥j12/12/00iii+e0M@333333 @`@?@ijil @l@$@33333Q@ijj12/12/00%uE@iiiiQ@Ȃ@333333?k@viiji@`j@9N@kjg@12/12/00|PkZN@@jiii̗@?r@$@jimjkt@ffffff*@33333E@٣j12/12/00 h"lPG@(\@@ijji6@ @؊@d@jjljk333333'@̜n@ȩji12/12/00<,tO@ @@iijt@Pw@<@@f@jiljk33333b@g@ji12/12/00D@ @@333333?iiisjp@0@z@ijijճa@ji12/12/00H.9G@ @ԝ@ffffff?z@iijti_@f@iljjҬ`e@12/12/00jiiZӼI@HzG@@? }@iisji@Pp@t@ljkj g@12/12/00iiiQIN@@\(\@@ffffff?e@ijil@`i@333333%@33333Q@ijj12/12/00Ac]H@i}ijGz @@`@?jjljH@`l@(@fffffj@jjg@c@12/12/00 ^)3L@(\@i`iiiЄ@333333?@jikijp@333333%@ K@`}j12/12/00?5^IlH@(\ @2@iiij333333? p@d@y@jimik'@9^@ji12/12/00?@@RQ @l@iiis?t@X@ l@jilik̜^@ji12/12/00sA?C@ @pz@ffffff?iiitj^@p@ijikzH@ji12/12/00KY8I@Q@8@ @p@iijtj@`q@yV@jmjjPs@q@12/12/00jjj_QE@= ףp=@<@1@@jjj?@p@'@f@mjjj@i@12/12/00ijq= ףI@p= ף@@ffffff(@x@?jjjmd@333333'@`c@jjضj`n@12/12/00H@ijjHzG @l@ffffff@n@?jjlj`t@333333(@Pe@kjh@12/12/00HPG@)\(@iiij@333333@@{@h@jimjjm@333333%@Pe@Ѵj12/12/00BG@(\@@iiij?s@@z@jilij%@Pe@vji12/12/00d`TP@(\ @\@iij@n@Ћ@v@ffffff&@iimjkffffff@p@ji12/12/00}?5^O@333333 @@,@iijj|@أ@x@ffffff'@jmjj9N@s@ji12/12/00VP@\(\@@@}@iiij@y@333333&@33333s]@iljjq@@c@12/12/00jijDL@ @ȑ@?@o@jji?@)@33333Q@mij͙j12/12/00iii58EGK@Gz@@?pp@ijil@f@ffffff&@fffff>a@ikj12/12/00ƛG@iiijףp= @@@`p@jimj<@ l@'@yV@kj12/12/00N@aJ@Gz @iniij@@@jjljjf@%@T@je@12/12/002U0*B@@@iiii?u@h@{@jiljjffffff%@Qk@ji12/12/00Q|aD@= ףp=@ @jiu333333?r@?(@{@jilikfffff&T@jik12/12/00T㥛8J@333333 @@iijjy@4@i@&@ikjj˛33333[@ji12/12/00ZӼ@@zG@@?@iiiti@u@b@ikjj`c@12/12/00jinjhsF@(\ @8@Pt@jjj?|@z@'@fffffn@mjkj12/12/00jjjea-S@ ףp= @h@ffffff?i@ijim@x@ffffff(@33333U@jjj12/12/00ΪVDB@iiii\(\ @ܟ@?v@jiki@w@333333&@m@jj12/12/00Zd;OJ@zG@iiij@ @ i@p@jjmjjg@'@c@j@f@12/12/001G@Q@x@j`jjjffffff1@y@jjkjk`ffffff'@fffff]@jif@12/12/00?5^IlH@ @@j`iii@ u@$@jilij`X@jik12/12/00a2U0*Q@Gz @@jji@z@?@u@&@iljkħ`S@jij12/12/00Q|a<@)\(@T@m@iiijޭ@s@ffffff$@iX@ijijζ12/12/00jii]C;H@ @@?|@iiiiح@e@ffffff$@ [@kikj12/12/00liiiJI@P@ffffff@@f@juiim@@Hf@jkj12/12/00yF@iiii @d@?y@jili@pt@$@d@kjd@12/12/007A`HL@(\@iiii0@?o@6@jijij333333$@je@12/12/00ޓZ{H@\(\ @@jjjj@g@jjmjk333333&@fffff]@ji12/12/00|a2U0E@Q @x@iii?r@@u@333333&@jikjj}`@ji12/12/00[ӼA@@@?iijj}@(@u@$@ilikϏb@jj`12/12/00ǘ Q@333333@@@iijj,@333333%@fffffY@ikjj`12/12/00jiiBO@Q@@@333333?j@iijix@s@1@33333Q@jiksj12/12/00iii/n-I@ @@?ijik.@t@$@H@jjwj12/12/00MbF@iiiizG @ @?jili@p@333333%@33333[@kj12/12/00?ܵtC@RQ @iiijp@ffffff?`~@r@jjljj%@ [@ֳj12/12/00OeD@Q@Ȣ@iiii@@\@0}@jilijffffff%@e@ji12/12/00QkwK@\(\ @@kiijp@@'@jjmjk33333h@ji12/12/00vq I@Q @@@iijj`w@@p@333333&@jmjj`@ji12/12/00*iJ@333333@@@ @0p@iiii@p@ffffff'@33333[@iljkj@12/12/00jii*QE@(\@@ffffff?r@iijj@0s@$@fffff[@likjc@12/12/00ilj/$N@ ףp= @И@|@?ijjl@`{@#@̼Z@ijjw@12/12/00JH@iiijzG@@@@tjjmj@ v@Pe@jj12/12/00!lVmH@ffffff @iiijp@ @`x@@jiljji@ffffff$@fffff>a@Ƭj12/12/00T㥛 K@p= ף@@iiii333333?@@ s@jjljj#@iX@ji12/12/00Ac]A@ףp= @@iii @Pt@ğ@u@333333%@iilijfffffF`@@j@{@jj12/12/00/L P@p= ף@`@?jjjib@g@j@ffffff*@imjk@G@ji12/12/00+ηK@Q@@333333?r@iiij©@p@ffffff%@fffffFP@ilij12/12/00ji`j镲 F@ףp= @@ffffff@jjvjjX@yf@mjj`{j12/12/00iiieqJ@333333@H@333333?`o@jiim@f@%@̬L@ijԂj12/12/00H}8G@iiijGz @(@?s@sjimiH@m@hb@kj12/12/00TJ@(\@jiij@333333?p@@jjmjjd@333333&@33333d@`j12/12/00Zd;O F@RQ@X@iiii?p@n@P|@sjikik33333U@rji12/12/00 D@Q@@`iij3333330@4@333333)@jjmjj`fffffr@ji12/12/00;OO@(\@@?iij`j@z@N@ffffff#@ilij̬L@m@ji12/12/00[ӼF@q= ףp @"@ffffff1@@iijj@ z@'@33333d@jljki@12/12/00jiiq -O@ffffff@0@ffffff@@n@ijjj@ffffff*@ a@mjkѳj12/12/00iiiX9FD@p= ף@p@ffffff?|@ijil@f@#@fffff_@ijje@12/12/00:pΈRO@iiii@@?t@iimjإ@d@333333$@`@kvj12/12/00 c*E@\(\ @iiii$@ffffff?@@jikikz@ffffff%@fffff_@Ҍj12/12/00Έ{E@(\ @ @iiii?pp@@{@tjikij⚙R@ji12/12/00HPK@ @@iii?pp@4@i@#@jikij]@ji12/12/00JY8nO@ @ @?iiijx@\@u@333333$@ikij`c@c@ji12/12/009EGrI@q= ףp@@333333@z@iijiD@o@%@fffff6b@iljj@k@`p@12/12/00jiiaG@{Gz @@?t@ijjit@333333'@33333W@mikjc@12/12/00iiiı.n K@\(\@@? r@jsjil@s@@g@ijj12/12/00"lxzG@iiii)\(@Ј@?u@jikiԧ@u@333333%@33333c_@jj12/12/00w-!K@ףp= @ijiij@v@@jikjkq@#@33333`@}j12/12/00L F% G@ @P@iiij333333@t@@Pq@tjimjk33333`@ji12/12/00$J@Gz @p@ijs`@?x@t@jiljkh@`e@c@ji12/12/00lI@Q@Њ@ffffff?iiijPs@@@o@&@jlikD@ji`12/12/00-@@Q@@333333?iij?n@m@"@33333e@ilik`12/12/00jij( R@(\ @@333333?r@iji?f@j@ffffff%@̬L@kijۉj12/12/00iiiH.!>@Gz @@@@jjilL@t@#@h@jkjq@n@12/12/00N@iljjRQ@@p@?ijmjЇ@#@33333Y@jj r@12/12/00uV~A@ ףp= @ij`iii@@sjjjik m@33333`@`jb@12/12/00|гYK@= ףp=@@iiii?|@l@r@jikij"@PU@e@jic@12/12/00~:|Q@Gz@ȡ@iijffffff@P@@0u@%@iiljj̬\@`n@ji c@12/12/00٬\H@@P|@?iiij k@^@p@333333&@ijij K@@c@ji12/12/00 h"XQ@{Gz@@333333@e@jjii333333,@9^@jljj l@`c@12/12/00jiiZd;E@ @P@333333?k@jjj?Ԥ@ps@ffffff&@fffff.c@mikjc@12/12/00iii:MM@)\( @H@9@`v@jjik@b@'@0i@jkji@`k@c@12/12/00N@aH@iiii\(\ @0@333333?q@sjiki&@p~@`S@kji@c@12/12/00?B@(\ @iiii@333333 @ |@V@jikijs@ffffff&@]@߉jc@12/12/00oTF@Gz @P@iiii@s@@i@iiljk333333$@fffffF`@ji k@d@12/12/00+ݓL@(\ @y@iii333333? k@@l@%@jilikvR@ji d@12/12/00St$_E@{Gz @ @ffffff@iiij`@ڥ@p@333333#@ikikm9^@f@@d@ji12/12/00F%uhM@Q @x@ @@p@iijuj@g@d@fffff_@jmjk`d@12/12/00jii>W[J@RQ@p@333333? m@iiji@`v@#@P@ljj}jd@12/12/00i`i:E@Q @P@!@?jjjmp@*@33333f@jk`j d@d@12/12/00I +J@imiij @@h@iimjԐ@j@&@`@jjd@12/12/00ŏ1wD@Gz @iiij@@ @B@jikikj@#@|@սjd@12/12/00{/LzN@zG@@iiij?w@H@m@iimjj$@T@@c@jii@e@12/12/00!uG@ffffff@P@iij`?p@2@ffffff"@jikikוiX@ji e@12/12/00;pΈҾA@zG@@?iiijy@@pr@333333$@iljk33333a@@e@ji12/12/000*TH@zG @@333333?`x@iiirj@pp@fffffV@ilij`e@12/12/00ji`i/$UJ@Gz@@?iiji@v@333333$@R@lij`je@12/12/00iii(\H@Q @@?i@ijjl@ k@#@V@ikje@12/12/00ׁsF>@iliij\(\ @@m@jjki¤@~@#@yV@jje@12/12/00 -K@@i`iii@?@jijijps@ffffff#@33333S@`je@12/12/00=UJ@ffffff@p@iiii?q@@@u@jilik333333$@ [@e@jic@f@12/12/00K4D@{Gz @@`iij @P@333333$@jjmjj`pa@ji f@12/12/00ZB>K@ ףp= @x@?iiij p@b@Pq@$@ikik33333E@@f@ji`12/12/00xz,CQ@RQ@Ȅ@333333?iiij(@Pt@ffffff$@R@imij``f@12/12/00jiiq= ףE@p= ף@Ƞ@?x@ijji@`q@#@33333Y@mikjf@12/12/00iiim4HE@Q@t@@}@ijil@e@$@̤m@ikjf@12/12/007A`HF@iiijp= ף @P@ffffff?o@jjmi@$@R@jӨjf@12/12/00xL@Q @i`iij@333333?@jikij؀@#@Y:@`j d@f@12/12/00EJ!D@ףp= @@iiii? i@@{@jikik333333$@ K@jig@12/12/00hsB@ffffff @آ@tiij@p@p}@#@jiljkd@`v@ji g@12/12/00 cZB.H@RQ @@?iiijp@@h@%@ilijǓR@@g@jik12/12/00ݓQ@= ףp= @(@ l@iij?@i@ffffff)@pQ@jljj`g@12/12/00jiwi٬\A@q= ףp @l@@@ijji@p@'@fffff.c@ljkj`o@g@12/12/00iiiV/OO@ףp= @p@ffffff?`g@jtjim8@d@9^@ij˒jg@12/12/00{GRI@iiij ףp= @P@?v@jili0@p@#@iX@kjd@g@12/12/00~jtCK@q= ףp@i`iii@ffffff@@jjkijpt@ffffff$@`@`jg@12/12/008dXJ@ @8@jiij8@@k@x@jjmjkffffff.@hb@{@ji m@h@12/12/00<,\J@Q @@iij?@s@@u@#@jimijά33333I@ji h@12/12/00<,bL@Q @@%@iiij @@w@$@imjkfffff&d@c@p@@h@ji12/12/00A`2F@333333@x@?Pr@iiij"@u@333333"@33333c_@ikij`h@12/12/00jiiu=@333333@@ @u@ijji4@'@̴k@mijõjh@12/12/00iiia+L@zG @P@ffffff?@l@jjjmv@333333'@fffff6R@ijvjh@12/12/00K7APF@iiii(\@0@333333?p@jikiz@ i@333333$@33333Y@jςjh@12/12/00K4A@333333@iiiip@ffffff?q@j@jjkikw@333333#@a@Ïjh@12/12/00ݵ|[D@q= ףp @̕@iiii@x@@t@jilijffffff$@fffffg@@h@jii@12/12/00@@ffffff @@iii@m@@t@#@jjlikfffff>a@ji i@12/12/00@aӋD@ @x@333333?iijj`m@@l@%@imik̼Z@@i@ji12/12/00RN@ffffff@P@?k@iiisj@@fffff&T@ikijx`i@12/12/00jii48EB@)\(@@?ijjiZ@d@#@YJ@kikj`l@i@12/12/00iiiJO@Q @@ffffff?o@ijilT@q@ffffff$@`S@jkji@12/12/00"uq}H@jiiiffffff @@@w@jiljB@$@fffffm@j`ji@12/12/00\mN@HzG@iiii@333333?j@@tjijijn@̬L@uji@12/12/00vOj1R@p= ף @@i`ji333333??@0p@jimij`333333$@PU@wjij@12/12/00(\¥N@ @@iijs333333@x@@@c@jimjjfffff.c@ji j@12/12/00OJ@ ףp= @@ffffff?iijjo@P@Ps@#@jkiktfffff6R@@j@ji12/12/00R'H@(\ @(@?u@iijsi`@r@̜^@ikikú`j@12/12/00ji`i0' uJ@Gz@@?iiji&@$@0Y@lik`jj@12/12/00iii}?5^G@ףp= @Ȑ@333333?m@ijil@k@#@0Y@iktjj@12/12/00'1I@iiii333333 @@?y@jjli@@v@ffffff$@fffffX@jrjj@12/12/00|?5VQ@q= ףp @iiij(@?@y@@jiljkm@#@33333S@jl@j@12/12/00vD@@В@iiii@@@k@jiljkffffff%@ai@c@jik@12/12/00QM@q= ףp @@`iii?@$@jilij`}fffffK@ji k@12/12/00y) B@{Gz @@&@iijj@@r@%@imjkb@@j@@k@ji`12/12/00NbX9LA@Q@@?iiij@pz@333333$@P@ijij``k@12/12/00jii9#J[E@Gz@@@?j@iijiڠ@f@333333#@33333`@likjk@12/12/00iii{O@(\ @8@ffffff@z@ijjkL@l@333333%@Yj@jjjk@12/12/00F%uPL@iiij333333 @@?v@jimi@p@ffffff#@33333W@kj@c@k@12/12/006;N!G@ ףp= @iiij @@@w@@jiljkn@(@d@j`l@k@12/12/00vN@q= ףp@@jjjj333333,@|@t@@j@tjimjj`c@jil@12/12/00o_OC@HzG @@jiiiPs@d@Ps@ffffff#@jilijά33333c@ji l@12/12/00{/LbC@HzG @@ffffff?iiij q@@`o@333333$@ikijfffffV@@l@ji12/12/00YL@ @@?k@iijj@l@333333#@R@ilikѐ`l@12/12/00jii yyM@ @@ffffff@s@iiii8@x@ffffff#@yf@kjjje@l@12/12/00iiiuvB@ @(@ffffff?j@ijil@d@333333#@ikjl@12/12/000*5O@jjjffffff@@@g@?jimju@&@e@jji@l@12/12/00\CMA@HzG @iiij`s@ffffff @r@@jjmik'@T@jl@12/12/00 c*M@\(\?@iiij333333 @0@4@g@jjmjkffffff%@ai@jim@12/12/00M OI@)\(@H@iij?p@|@p@333333%@jilij`@ji m@12/12/00d]KWE@{Gz@|@?iijj@0@q@#@jmijYZ@y@@m@ji12/12/00TR'0A@ @@?@iiij@ t@ffffff&@]@ikik f@`m@12/12/00jiviڊe@@p= ף@l@@ijjih@ u@'@(j@likذjm@12/12/00iii+e0C@RQ@p@?o@jjjlН@Pu@ffffff#@pa@ijӬjm@12/12/00 M@iiij@@?{@jilih@f@333333$@PU@jjm@12/12/00|?5^P@ @iii@333333?q@?H@jikikpr@#@`@`jm@12/12/00"uqeG@Q@@iiij?r@@s@jjmjjffffff&@fffffF`@jil@n@12/12/00y) L@(\ @w@iii?m@@`t@333333$@jilij33333I@ji n@12/12/00VD@(\ @|@@iijjs@(@q@#@jmik̬\@ t@@s@@n@ji12/12/00[$P@(\@D@ffffff? v@iijjH@Pq@#@33333h@ilijc@`n@12/12/00jiqiZd;P@{Gz@d@@}@ijsji@ m@h@mjkjn@12/12/00iii|a2U0jF@(\ @Г@333333@u@ijjlh@p@333333#@ q@jjjl@n@12/12/0046W[A@@ }@iiijffffff? h@@c@jjlikߚ$@jip@12/12/00Xq?@Q @@iii?u@@@n@ffffff#@jilijՙjip@12/12/006;N!M@Q@w@?iiijq@8@`l@333333%@ikij p@ji12/12/00X9vI@Q @X@?y@iiij@p@333333#@ijij0p@12/12/00jii1%M@(\@X@@Pq@ijji<@k@#@likj@p@12/12/00iiiR!R@Q @@ffffff@m@jiim@o@%@ikjg@Pp@12/12/00<,Ԛ.J@iiijQ @Ȋ@ @pw@jjli4@pw@#@k`j`p@12/12/00?W[dE@{Gz@iiij@ffffff@ t@@jilikl@#@j j@pp@12/12/00j+oA@(\ @@iij?{@?T@o@jjmik&@g@jip@12/12/00BiF@(\@ܝ@iij333333 @@v@@s@ffffff&@jjlikg@jip@12/12/00+e0G@ @P@ @iijsju@@r@imikp@ji12/12/00Pk'L@(\ @(@?s@iiij8@pq@ffffff$@ilij@p@p@12/12/00jjj`vOQ@p= ף@`@ffffff@k@jjjj`f@`h@333333(@mjjjp@12/12/00ji_LK@@@@u@?jtjim@jjyj`f@p@12/12/00_)NJF@iiii @P@ @`w@jikiL@b@333333$@g@kjp@12/12/00St$G:@Q @ijiij@|@@jjlijl@ffffff$@jp@12/12/00MSt@{Gz @@?q@iiji@u@%@kikj@s@12/12/00iiiڊeN@p= ף @@?n@jjik@r@$@ijځjPs@12/12/00_&M@iiii@8@?@p@jiki@l@%@kj`s@12/12/00&S*O@ @iiiiĚ@333333? {@X@jikij@m@ffffff$@`e@͐jps@12/12/00B@HzG @h@ikiiin@8@t@jikij%@jis@12/12/00Oe@@RQ@@iii@@@i@%@jjkik@g@j``s@12/12/00333333 @ffffff?`ii`t`@w@```i```s@j```12/12/00RQ@ffffff?j```?ҫ@t@333333(@``j```s@12/12/00j```iQ@ffffff?i````8@@l@#@`i```js@12/12/00```iGz@ffffff??``````.@&@j```js@12/12/00```ii`ףp= @?s````i@q@```js@12/12/00q= ףp @```ii`ffffff?@@````i` s@#@``j`s@12/12/00q= ףp@`n`ji`@p@````j``$@`j``t@12/12/00{Gz@`i`??Ƣ@@l@%@````i```j``t@12/12/00HzG @?`j``?H@0p@%@```i``` t@j```12/12/00Q @?ii```l@%@``j```0t@12/12/00j```i)\(@333333?i````@ffffff&@`i```j@t@12/12/00```iiQ@333333?`````@@m@'@i```jPt@12/12/00```ii`Q @?`{````i@```j`t@12/12/00\(\ @```ii`?P@````i`n@$@``j`pt@12/12/00Q@``ii``333333?v@````i``ffffff&@`j``t@12/12/00 @j`ii``~@333333(@````j```j``t@12/12/00333333 @ffffff?`ii``ؖ@0w@333333$@```j```t@j```12/12/00 ףp= @ @ii```H@Pt@$@``j```t@12/12/00j```i{Gz @@````?333333+@`j```jt@12/12/00```ji(\@333333)@`````@'@j```jt@12/12/00```ii`\(\@ffffff@`````j@333333%@```jt@12/12/00Gz @```ii`ffffff@ }@````j`@'@``j`t@12/12/00@``ii`333333?@q@````i``333333$@`j``u@12/12/00Q @`ii`@@`c@333333$@````i```j``u@12/12/00Q @?`ii`s`ܡ@```j``` u@j``y`12/12/00\(\ @ii```@}@+@``j```0u@12/12/00j```iQ@333333?i````H@p@333333%@`i```j@u@12/12/00```ii(\@@`````N@ffffff&@i```jPu@12/12/00``r`ji`RQ @````jq@333333*@```j`u@12/12/00 ףp= @```ii`?>@````i`n@%@``j`pu@12/12/00Q@``ii``333333&@@````j``ffffff(@`j``u@12/12/00Gz@`ii`!@@ j@333333%@````i```j``u@12/12/00Gz@?`ii``@@x@333333$@```i```u@j```12/12/00{Gz@333333?j`t``?x@d@``j```u@12/12/00j```i\(\@333333 @i`````@"@`j```ju@12/12/00```iiQ @?`````$@g@(@i```ju@12/12/00```ii`(\@ffffff?````iN@ o@$@```ju@12/12/00ffffff@```ii`@@r````j`i@``j`u@12/12/00333333 @`x`ii`@````j``333333&@`j``v@12/12/00(\@`ii`333333?8@t@#@````i```j``v@12/12/00333333 @?`ii``@d@333333%@```i``` v@j```12/12/00(\@?ii```@333333#@``j```0v@12/12/00j```i@?i````D@$@`i```j@v@12/12/00```jGz @@?`````@@`e@333333&@j```jPv@12/12/00``l`ii`Gz @````i@$@```j`v@12/12/00Q @```ii`?ң@````i`s@$@``j`pv@12/12/00Q@``ii`?̣@0z@````i``%@`j``v@12/12/00333333 @`ii`?P@f@$@````j```j``v@12/12/00{Gz@@`ii``H@(@$@```i```v@j``{`12/12/00RQ@ii```@{@ffffff#@``i```v@12/12/00j```i @333333?i````@#@`i```jv@12/12/00```ii @@`````pv@'@j```jv@12/12/00```ii`p= ף @?s````i@l@```jv@12/12/00Gz@```ii`? o@````j`k@ffffff%@``j`v@12/12/00Q @``ii`?4@d@````i``#@`j``w@12/12/00)\(@`ji`+@@x@= ףp=&@````j```j``w@12/12/00Gz@@`ii``@%@```j``` w@j``y`12/12/00zG @ii`s``@x@``j```0w@12/12/00j```j)\( @333333@````?~@p@333333&@`j```j@w@12/12/00```iiffffff @333333?`````ʠ@o@$@i```jPw@12/12/00```ii`RQ @ffffff?````in@g@#@```j`w@12/12/00@```ii`ffffff?@````i` q@333333%@``j`pw@12/12/00Q @``ii`333333? @l@````i``%@`j``w@12/12/00 ףp= @`ii`#@@@r@ffffff$@````j```j``w@12/12/00Gz@@`ii`` @o@#@```i```w@j```12/12/00(\ @?i```?@@ l@#@``j```w@12/12/00j```jףp= @ffffff @````?@l@333333&@`j```jw@12/12/00```iiRQ@333333@`````@ z@%@i```jw@12/12/00```ii`HzG @333333?t````i@```jw@12/12/00p= ף@``w`ii`k@````j`g@333333'@``jl`w@12/12/00``i`??@````i``%@`j``x@12/12/00333333 @`ii`?@`n@ffffff#@````i```j``x@12/12/00q= ףp@ffffff?`ii``@ j@333333%@```i``` x@j```12/12/00 ףp= @333333?ii```ؙ@d@#@``i```0x@12/12/00jl```i333333+@````?ԙ@ m@#@`i```j@x@12/12/00```ii @?``````@%@i```jPx@12/12/00```ji`{Gz@ffffff?s````i@d@```j`x@12/12/00333333 @``l`ii`,@s````i```j`px@12/12/00ffffff@``ii`333333?@t````i```j``x@12/12/00= ףp=@`ii`?`@e@%@````i```j``x@12/12/00Gz@ffffff?`j``? h@s@#@```j```x@j``k`12/12/00(\@j```?\@333333(@``i```x@12/12/00j```iףp= @ffffff?i`t```Ĕ@ y@`i```jx@12/12/00```iiףp= @?`````@Pq@ffffff$@i```jx@12/12/00```ii`333333 @?````i@z@ffffff$@```jx@12/12/00Q @```ii`333333@|@````i`g@%@``j`x@12/12/00(\@``ii`333333 @@ h@````i``$@`j``y@12/12/00Q @`ii`?@ p@333333%@````i```j``y@12/12/00Q @@`ii``8@333333&@```j``` y@j```12/12/00Gz@?ii```x@p@333333%@``i```0y@12/12/00j```ip= ף @@i````ԑ@p@%@`i```j@y@12/12/00```ii @ffffff@`````@u@$@i```jPy@12/12/00``j`ii`Q @````i@@u@333333%@```j`y@12/12/00q= ףp@```ii`@@````j``k@'@``j`py@12/12/00Q @``ii`?@k@````i``%@`j``y@12/12/00\(\ @`i`ffffff??@@d@ffffff%@````i```j``y@12/12/00ףp= @ffffff?`ii``@j@%@```i```y@j```12/12/00{Gz@?ii```@o@%@``i```y@12/12/00j```i(\ @333333?i````|@q@333333%@`i```jy@12/12/00``j`iip= ף @`````$@n@%@i```jy@12/12/00```ii`ףp= @ffffff?````i@s@%@```jy@12/12/00Gz@```ii`333333?H@````j`e@%@``j`y@12/12/00p= ף@``ii`?<@f@````i``ffffff&@`j``z@12/12/00\(\ @`ii`?|@#@````i```j``z@12/12/00@?`ii``@p@$@```i``` z@j```12/12/00RQ @ffffff?ii```@u@333333%@``i```foreign/tests/mval_bug.R0000644000175100001440000000140613245463570015014 0ustar hornikuserslibrary(foreign) mydata <- suppressMessages(read.spss("mval_bug.sav", use.value.labels = TRUE, to.data.frame = TRUE, use.missings = TRUE)) levels(mydata$Q1_MISSING_NONE) table(mydata$Q1_MISSING_NONE) levels(mydata$Q1_MISSING_1) table(mydata$Q1_MISSING_1) levels(mydata$Q1_MISSING_2) table(mydata$Q1_MISSING_2) levels(mydata$Q1_MISSING_3) table(mydata$Q1_MISSING_3) levels(mydata$Q1_MISSING_RANGE) table(mydata$Q1_MISSING_RANGE) levels(mydata$Q1_MISSING_LOW) table(mydata$Q1_MISSING_LOW) levels(mydata$Q1_MISSING_HIGH) table(mydata$Q1_MISSING_HIGH) levels(mydata$Q1_MISSING_RANGE_1) table(mydata$Q1_MISSING_RANGE_1) levels(mydata$Q1_MISSING_LOW_1) table(mydata$Q1_MISSING_LOW_1) levels(mydata$Q1_MISSING_HIGH_1) table(mydata$Q1_MISSING_HIGH_1) foreign/tests/stata.Rout.save0000644000175100001440000005012113636570103016012 0ustar hornikusers R Under development (unstable) (2020-03-24 r78051) -- "Unsuffered Consequences" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin19.3.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > pc5 <- read.dta("pc5.dta") Warning message: In read.dta("pc5.dta") : cannot read factor labels from Stata 5 files > summary(pc5) age alb alkphos ascites Min. :26.28 Min. :1.960 Min. : -9 Min. :-9.000 1st Qu.:42.71 1st Qu.:3.330 1st Qu.: 423 1st Qu.: 0.000 Median :50.47 Median :3.570 Median : 1009 Median : 0.000 Mean :50.45 Mean :3.543 Mean : 1525 Mean :-2.074 3rd Qu.:56.99 3rd Qu.:3.820 3rd Qu.: 1677 3rd Qu.: 0.000 Max. :78.44 Max. :4.640 Max. :13862 Max. : 1.000 bili chol edema edemarx Min. : 0.300 Min. : -9.0 Min. :0.00000 Min. :0.00000 1st Qu.: 0.700 1st Qu.: -9.0 1st Qu.:0.00000 1st Qu.:0.00000 Median : 1.200 Median : 256.0 Median :0.00000 Median :0.00000 Mean : 2.688 Mean : 245.8 Mean :0.09256 Mean :0.07815 3rd Qu.: 3.000 3rd Qu.: 346.0 3rd Qu.:0.00000 3rd Qu.:0.00000 Max. :28.000 Max. :1775.0 Max. :1.00000 Max. :1.00000 hepmeg time plate protime sex Min. :-9.00 Min. : 41 Min. : -9 Min. : 9.00 Min. :-9.000 1st Qu.: 0.00 1st Qu.:1434 1st Qu.:181 1st Qu.:10.00 1st Qu.: 0.000 Median : 0.00 Median :1487 Median :249 Median :10.60 Median : 1.000 Mean :-1.75 Mean :1760 Mean :252 Mean :10.67 Mean :-1.434 3rd Qu.: 1.00 3rd Qu.:2153 3rd Qu.:321 3rd Qu.:11.00 3rd Qu.: 1.000 Max. : 1.00 Max. :4795 Max. :721 Max. :18.00 Max. : 1.000 sgot spiders stage cens Min. : -9.00 Min. :-9.000 Min. :-9.0000 Min. :0.0000 1st Qu.: 44.20 1st Qu.: 0.000 1st Qu.: 1.0000 1st Qu.:0.0000 Median : 88.35 Median : 0.000 Median : 3.0000 Median :0.0000 Mean : 88.22 Mean :-1.914 Mean : 0.1351 Mean :0.2443 3rd Qu.:130.20 3rd Qu.: 0.000 3rd Qu.: 3.0000 3rd Qu.:0.0000 Max. :457.25 Max. : 1.000 Max. : 4.0000 Max. :1.0000 rx trig copper id Min. :-9.0000 Min. : -9.00 Min. : -9.00 Min. : 1.0 1st Qu.: 1.0000 1st Qu.: -9.00 1st Qu.: 10.00 1st Qu.: 99.5 Median : 1.0000 Median : 85.00 Median : 48.00 Median :195.0 Mean :-0.9788 Mean : 81.44 Mean : 65.26 Mean :199.6 3rd Qu.: 2.0000 3rd Qu.:126.00 3rd Qu.: 88.00 3rd Qu.:302.5 Max. : 2.0000 Max. :598.00 Max. :588.00 Max. :418.0 first late t0 Min. :0.0000 Min. :0.0000 Min. : 0.0 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.: 0.0 Median :0.0000 Median :0.0000 Median : 0.0 Mean :0.3657 Mean :0.3657 Mean : 543.8 3rd Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.:1487.0 Max. :1.0000 Max. :1.0000 Max. :1487.0 > str(pc5) 'data.frame': 659 obs. of 24 variables: $ age : num 58.8 56.4 56.4 70.1 54.7 ... $ alb : num 2.6 4.14 4.14 3.48 2.54 ... $ alkphos: num 1718 7395 7395 516 6122 ... $ ascites: num 1 0 0 0 0 0 0 0 0 0 ... $ bili : num 14.5 1.1 1.1 1.4 1.8 ... $ chol : num 261 302 302 176 244 244 279 279 248 248 ... $ edema : num 1 0 0 1 1 1 0 0 0 0 ... $ edemarx: num 1 0 0 0.5 0.5 0.5 0 0 0 0 ... $ hepmeg : num 1 1 1 0 1 1 1 1 1 1 ... $ time : num 400 1487 4500 1012 1487 ... $ plate : num 190 221 221 151 183 183 136 136 -9 -9 ... $ protime: num 12.2 10.6 10.6 12 10.3 ... $ sex : num 1 1 1 0 1 1 1 1 1 1 ... $ sgot : num 137.9 113.5 113.5 96.1 60.6 ... $ spiders: num 1 1 1 0 1 1 1 1 0 0 ... $ stage : num 4 3 3 4 4 4 3 3 3 3 ... $ cens : num 1 0 0 1 0 1 0 0 0 1 ... $ rx : num 1 1 1 1 1 1 2 2 2 2 ... $ trig : num 172 88 88 55 92 92 72 72 63 63 ... $ copper : num 156 54 54 210 64 64 143 143 50 50 ... $ id : num 1 2 2 3 4 4 5 5 6 6 ... $ first : num 0 1 0 0 1 0 1 0 1 0 ... $ late : num 0 0 1 0 0 1 0 1 0 1 ... $ t0 : num 0 0 1487 0 0 ... - attr(*, "datalabel")= chr "" - attr(*, "time.stamp")= chr "14 Feb 1997 14:22" - attr(*, "formats")= chr [1:24] "%9.0g" "%9.0g" "%9.0g" "%9.0g" ... - attr(*, "types")= int [1:24] 102 102 102 102 102 102 102 102 102 102 ... - attr(*, "val.labels")= chr [1:24] "" "" "" "" ... - attr(*, "var.labels")= chr [1:24] "" "" "" "" ... - attr(*, "version")= int 5 > compressed <- read.dta("compressed.dta") > summary(compressed) age alb alkphos ascites Min. :26.28 Min. :1.960 Min. : -9 Min. :-9.000 1st Qu.:42.71 1st Qu.:3.330 1st Qu.: 423 1st Qu.: 0.000 Median :50.47 Median :3.570 Median : 1009 Median : 0.000 Mean :50.45 Mean :3.543 Mean : 1525 Mean :-2.074 3rd Qu.:56.99 3rd Qu.:3.820 3rd Qu.: 1677 3rd Qu.: 0.000 Max. :78.44 Max. :4.640 Max. :13862 Max. : 1.000 bili chol edema edemarx Min. : 0.300 Min. : -9.0 Min. :0.00000 Min. :0.00000 1st Qu.: 0.700 1st Qu.: -9.0 1st Qu.:0.00000 1st Qu.:0.00000 Median : 1.200 Median : 256.0 Median :0.00000 Median :0.00000 Mean : 2.688 Mean : 245.8 Mean :0.09256 Mean :0.07815 3rd Qu.: 3.000 3rd Qu.: 346.0 3rd Qu.:0.00000 3rd Qu.:0.00000 Max. :28.000 Max. :1775.0 Max. :1.00000 Max. :1.00000 hepmeg time plate protime sex Min. :-9.00 Min. : 41 Min. : -9 Min. : 9.00 Min. :-9.000 1st Qu.: 0.00 1st Qu.:1434 1st Qu.:181 1st Qu.:10.00 1st Qu.: 0.000 Median : 0.00 Median :1487 Median :249 Median :10.60 Median : 1.000 Mean :-1.75 Mean :1760 Mean :252 Mean :10.67 Mean :-1.434 3rd Qu.: 1.00 3rd Qu.:2153 3rd Qu.:321 3rd Qu.:11.00 3rd Qu.: 1.000 Max. : 1.00 Max. :4795 Max. :721 Max. :18.00 Max. : 1.000 sgot spiders stage cens Min. : -9.00 Min. :-9.000 Min. :-9.0000 Min. :0.0000 1st Qu.: 44.20 1st Qu.: 0.000 1st Qu.: 1.0000 1st Qu.:0.0000 Median : 88.35 Median : 0.000 Median : 3.0000 Median :0.0000 Mean : 88.22 Mean :-1.914 Mean : 0.1351 Mean :0.2443 3rd Qu.:130.20 3rd Qu.: 0.000 3rd Qu.: 3.0000 3rd Qu.:0.0000 Max. :457.25 Max. : 1.000 Max. : 4.0000 Max. :1.0000 rx trig copper id Min. :-9.0000 Min. : -9.00 Min. : -9.00 Min. : 1.0 1st Qu.: 1.0000 1st Qu.: -9.00 1st Qu.: 10.00 1st Qu.: 99.5 Median : 1.0000 Median : 85.00 Median : 48.00 Median :195.0 Mean :-0.9788 Mean : 81.44 Mean : 65.26 Mean :199.6 3rd Qu.: 2.0000 3rd Qu.:126.00 3rd Qu.: 88.00 3rd Qu.:302.5 Max. : 2.0000 Max. :598.00 Max. :588.00 Max. :418.0 first late t0 Min. :0.0000 Min. :0.0000 Min. : 0.0 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.: 0.0 Median :0.0000 Median :0.0000 Median : 0.0 Mean :0.3657 Mean :0.3657 Mean : 543.8 3rd Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.:1487.0 Max. :1.0000 Max. :1.0000 Max. :1487.0 > all.equal(summary(pc5), summary(compressed)) [1] TRUE > sun6 <- read.dta("sun6.dta") > summary(sun6) age alb alkphos ascites Min. :26.28 Min. :1.960 Min. : -9 Min. :-9.000 1st Qu.:42.71 1st Qu.:3.330 1st Qu.: 423 1st Qu.: 0.000 Median :50.47 Median :3.570 Median : 1009 Median : 0.000 Mean :50.45 Mean :3.543 Mean : 1525 Mean :-2.074 3rd Qu.:56.99 3rd Qu.:3.820 3rd Qu.: 1677 3rd Qu.: 0.000 Max. :78.44 Max. :4.640 Max. :13862 Max. : 1.000 bili chol edema edemarx Min. : 0.300 Min. : -9.0 Min. :0.00000 Min. :0.00000 1st Qu.: 0.700 1st Qu.: -9.0 1st Qu.:0.00000 1st Qu.:0.00000 Median : 1.200 Median : 256.0 Median :0.00000 Median :0.00000 Mean : 2.688 Mean : 245.8 Mean :0.09256 Mean :0.07815 3rd Qu.: 3.000 3rd Qu.: 346.0 3rd Qu.:0.00000 3rd Qu.:0.00000 Max. :28.000 Max. :1775.0 Max. :1.00000 Max. :1.00000 hepmeg time plate protime sex Min. :-9.00 Min. : 41 Min. : -9 Min. : 9.00 Min. :-9.000 1st Qu.: 0.00 1st Qu.:1434 1st Qu.:181 1st Qu.:10.00 1st Qu.: 0.000 Median : 0.00 Median :1487 Median :249 Median :10.60 Median : 1.000 Mean :-1.75 Mean :1760 Mean :252 Mean :10.67 Mean :-1.434 3rd Qu.: 1.00 3rd Qu.:2153 3rd Qu.:321 3rd Qu.:11.00 3rd Qu.: 1.000 Max. : 1.00 Max. :4795 Max. :721 Max. :18.00 Max. : 1.000 sgot spiders stage cens Min. : -9.00 Min. :-9.000 Min. :-9.0000 Min. :0.0000 1st Qu.: 44.20 1st Qu.: 0.000 1st Qu.: 1.0000 1st Qu.:0.0000 Median : 88.35 Median : 0.000 Median : 3.0000 Median :0.0000 Mean : 88.22 Mean :-1.914 Mean : 0.1351 Mean :0.2443 3rd Qu.:130.20 3rd Qu.: 0.000 3rd Qu.: 3.0000 3rd Qu.:0.0000 Max. :457.25 Max. : 1.000 Max. : 4.0000 Max. :1.0000 rx trig copper id Min. :-9.0000 Min. : -9.00 Min. : -9.00 Min. : 1.0 1st Qu.: 1.0000 1st Qu.: -9.00 1st Qu.: 10.00 1st Qu.: 99.5 Median : 1.0000 Median : 85.00 Median : 48.00 Median :195.0 Mean :-0.9788 Mean : 81.44 Mean : 65.26 Mean :199.6 3rd Qu.: 2.0000 3rd Qu.:126.00 3rd Qu.: 88.00 3rd Qu.:302.5 Max. : 2.0000 Max. :598.00 Max. :588.00 Max. :418.0 first late t0 Min. :0.0000 Min. :0.0000 Min. : 0.0 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.: 0.0 Median :0.0000 Median :0.0000 Median : 0.0 Mean :0.3657 Mean :0.3657 Mean : 543.8 3rd Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.:1487.0 Max. :1.0000 Max. :1.0000 Max. :1487.0 > str(sun6) 'data.frame': 659 obs. of 24 variables: $ age : num 58.8 56.4 56.4 70.1 54.7 ... $ alb : num 2.6 4.14 4.14 3.48 2.54 ... $ alkphos: num 1718 7395 7395 516 6122 ... $ ascites: int 1 0 0 0 0 0 0 0 0 0 ... $ bili : num 14.5 1.1 1.1 1.4 1.8 ... $ chol : int 261 302 302 176 244 244 279 279 248 248 ... $ edema : int 1 0 0 1 1 1 0 0 0 0 ... $ edemarx: num 1 0 0 0.5 0.5 0.5 0 0 0 0 ... $ hepmeg : int 1 1 1 0 1 1 1 1 1 1 ... $ time : int 400 1487 4500 1012 1487 1925 1487 1504 1487 2503 ... $ plate : int 190 221 221 151 183 183 136 136 -9 -9 ... $ protime: num 12.2 10.6 10.6 12 10.3 ... $ sex : int 1 1 1 0 1 1 1 1 1 1 ... $ sgot : num 137.9 113.5 113.5 96.1 60.6 ... $ spiders: int 1 1 1 0 1 1 1 1 0 0 ... $ stage : int 4 3 3 4 4 4 3 3 3 3 ... $ cens : int 1 0 0 1 0 1 0 0 0 1 ... $ rx : int 1 1 1 1 1 1 2 2 2 2 ... $ trig : int 172 88 88 55 92 92 72 72 63 63 ... $ copper : int 156 54 54 210 64 64 143 143 50 50 ... $ id : int 1 2 2 3 4 4 5 5 6 6 ... $ first : int 0 1 0 0 1 0 1 0 1 0 ... $ late : int 0 0 1 0 0 1 0 1 0 1 ... $ t0 : int 0 0 1487 0 0 1487 0 1487 0 1487 ... - attr(*, "datalabel")= chr "" - attr(*, "time.stamp")= chr "14 Sep 2000 10:40" - attr(*, "formats")= chr [1:24] "%9.0g" "%9.0g" "%9.0g" "%9.0g" ... - attr(*, "types")= int [1:24] 102 102 102 98 102 105 98 102 98 105 ... - attr(*, "val.labels")= chr [1:24] "" "" "" "" ... - attr(*, "var.labels")= chr [1:24] "" "" "" "" ... - attr(*, "version")= int 6 > all.equal(summary(sun6),summary(pc5)) [1] TRUE > df <- read.dta("datefactor.dta") > summary(df) hlth159 id adate EXCELLENT: 0 Min. : 1.00 Min. :1960-01-02 VERY GOOD: 6 1st Qu.: 8.25 1st Qu.:1960-01-09 GOOD : 8 Median :15.50 Median :1960-01-16 FAIR : 4 Mean :15.50 Mean :1960-01-16 POOR : 1 3rd Qu.:22.75 3rd Qu.:1960-01-23 NA's :11 Max. :30.00 Max. :1960-01-31 > data(esoph) > write.dta(esoph,esophile <- tempfile()) > esoph2 <- read.dta(esophile) > all.equal(ordered(esoph2$alcgp),esoph$alcgp) [1] TRUE > write.dta(esoph,esophile,convert.factors="string") > esoph2 <- read.dta(esophile) > all.equal(as.character(esoph$alcgp),esoph2$alcgp) [1] TRUE > write.dta(esoph,esophile,convert.factors="code") > esoph2 <- read.dta(esophile) > all.equal(as.numeric(esoph$alcgp),as.numeric(esoph2$alcgp)) [1] TRUE > > se <- read.dta("stata7se.dta") > print(se) race number 1 white 2 2 asian 5 3 hispanic 5 4 white 4 5 black 5 6 white 6 7 black 7 > v8 <- read.dta("stata8mac.dta") > print(v8) race number 1 white 2 2 asian 5 3 hispanic 5 4 white 4 5 black 5 6 white 6 7 black 7 > > stata8 <- read.dta("auto8.dta",missing.type=TRUE,convert.underscore=FALSE) > str(stata8) 'data.frame': 74 obs. of 13 variables: $ make : chr "AMC Concord" "AMC Pacer" "AMC Spirit" "Buick Century" ... $ price : int 4099 4749 3799 4816 7827 5788 4453 5189 10372 4082 ... $ mpg : int 22 17 22 20 15 18 26 20 16 19 ... $ rep78 : int 3 3 NA 3 4 3 NA 3 3 3 ... $ headroom : num 2.5 3 3 4.5 4 4 3 2 3.5 3.5 ... $ trunk : int 11 11 12 16 20 21 10 16 17 13 ... $ weight : int 2930 3350 2640 3250 4080 3670 2230 3280 3880 3400 ... $ length : int 186 173 168 196 222 218 170 200 207 200 ... $ turn : int 40 40 35 40 43 43 34 42 43 42 ... $ displacement: int 121 258 121 196 350 231 304 196 231 231 ... $ gear_ratio : num 3.58 2.53 3.08 2.93 2.41 ... $ foreign : Factor w/ 2 levels "Domestic","Foreign": 1 1 1 1 1 1 1 1 1 1 ... $ testmiss : num NA NA NA NA NA NA NA NA NA NA ... - attr(*, "datalabel")= chr "1978 Automobile Data" - attr(*, "time.stamp")= chr "20 May 2003 14:39" - attr(*, "formats")= chr [1:13] "%-18s" "%8.0gc" "%8.0g" "%8.0g" ... - attr(*, "types")= int [1:13] 18 252 252 252 254 252 252 252 252 252 ... - attr(*, "val.labels")= chr [1:13] "" "" "" "" ... - attr(*, "var.labels")= chr [1:13] "Make and Model" "Price" "Mileage (mpg)" "Repair Record 1978" ... - attr(*, "version")= int 8 - attr(*, "label.table")=List of 1 ..$ origin: Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "Domestic" "Foreign" - attr(*, "missing")=List of 13 ..$ make : NULL ..$ price : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ mpg : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ rep78 : num [1:74] NA NA 0 NA NA NA 0 NA NA NA ... ..$ headroom : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ trunk : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ weight : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ length : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ turn : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ displacement: num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ gear_ratio : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ foreign : num [1:74] NA NA NA NA NA NA NA NA NA NA ... ..$ testmiss : num [1:74] 18 18 18 18 18 18 18 18 18 18 ... > > bq <- read.dta("MLLabelsWithNotesChar.dta") > str(bq) 'data.frame': 0 obs. of 1 variable: $ female: Factor w/ 2 levels "No","Yes": - attr(*, "datalabel")= chr "datalabelBQ" - attr(*, "time.stamp")= chr "27 Apr 2013 16:16" - attr(*, "formats")= chr "%8.0g" - attr(*, "types")= int 251 - attr(*, "val.labels")= chr "female_lbl_def" - attr(*, "var.labels")= chr "Is it female" - attr(*, "expansion.fields")=List of 11 ..$ : chr [1:3] "female" "question" "Are you Female?" ..$ : chr [1:3] "_dta" "_lang_c" "default" ..$ : chr [1:3] "_dta" "_lang_v_spanish" "etiqdataBQ" ..$ : chr [1:3] "female" "_lang_l_spanish" "female_lbl_es" ..$ : chr [1:3] "female" "_lang_v_spanish" "Femenino" ..$ : chr [1:3] "_dta" "note1" "datasetNoteTxt" ..$ : chr [1:3] "_dta" "note0" "1" ..$ : chr [1:3] "female" "note2" "FemaleNote2Txt" ..$ : chr [1:3] "female" "note0" "2" ..$ : chr [1:3] "female" "note1" "FemaleNoteTxt" ..$ : chr [1:3] "_dta" "_lang_list" "default spanish" - attr(*, "version")= int 12 - attr(*, "label.table")=List of 2 ..$ female_lbl_es : Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "No" "Si" ..$ female_lbl_def: Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "No" "Yes" > write.dta(bq, "bq.dta", version = 12) > str(read.dta('bq.dta')) 'data.frame': 0 obs. of 1 variable: $ female: Factor w/ 2 levels "No","Yes": - attr(*, "datalabel")= chr "datalabelBQ" - attr(*, "time.stamp")= chr "" - attr(*, "formats")= chr "%9.0g" - attr(*, "types")= int 253 - attr(*, "val.labels")= chr "female_lbl_def" - attr(*, "var.labels")= chr "Is it female" - attr(*, "expansion.fields")=List of 11 ..$ : chr [1:3] "female" "question" "Are you Female?" ..$ : chr [1:3] "_dta" "_lang_c" "default" ..$ : chr [1:3] "_dta" "_lang_v_spanish" "etiqdataBQ" ..$ : chr [1:3] "female" "_lang_l_spanish" "female_lbl_es" ..$ : chr [1:3] "female" "_lang_v_spanish" "Femenino" ..$ : chr [1:3] "_dta" "note1" "datasetNoteTxt" ..$ : chr [1:3] "_dta" "note0" "1" ..$ : chr [1:3] "female" "note2" "FemaleNote2Txt" ..$ : chr [1:3] "female" "note0" "2" ..$ : chr [1:3] "female" "note1" "FemaleNoteTxt" ..$ : chr [1:3] "_dta" "_lang_list" "default spanish" - attr(*, "version")= int 12 - attr(*, "label.table")=List of 2 ..$ female_lbl_def: Named int [1:2] 1 2 .. ..- attr(*, "names")= chr [1:2] "No" "Yes" ..$ female_lbl_es : Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "No" "Si" > unlink("bq.dta") > > ## PR#15290 > bq <- read.dta("OneVarTwoValLabels.dta") > str(bq) 'data.frame': 0 obs. of 1 variable: $ female: Factor w/ 2 levels "Male","Female": - attr(*, "datalabel")= chr "" - attr(*, "time.stamp")= chr "25 Apr 2013 21:40" - attr(*, "formats")= chr "%9.0g" - attr(*, "types")= int 251 - attr(*, "val.labels")= chr "fem_lbl_val_en" - attr(*, "var.labels")= chr "" - attr(*, "expansion.fields")=List of 3 ..$ : chr [1:3] "_dta" "_lang_c" "default" ..$ : chr [1:3] "female" "_lang_l_spanish" "fem_lbl_val_es" ..$ : chr [1:3] "_dta" "_lang_list" "default spanish" - attr(*, "version")= int 12 - attr(*, "label.table")=List of 2 ..$ fem_lbl_val_es: Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "Masculino" "Femenino" ..$ fem_lbl_val_en: Named int [1:2] 0 1 .. ..- attr(*, "names")= chr [1:2] "Male" "Female" > > ## Dates and date-times in Stata12 > Sys.setenv(TZ = "UTC") # avoid timezone differences: cannot unset so must be last > read.dta("xxx12.dta") x xc xbigc xdate 1 2014-01-23 20:07:16 2014-01-23 20:07:16 2014-01-23 20:07:16 2014-01-23 2 2014-01-23 20:07:17 2014-01-23 20:07:17 2014-01-23 20:07:17 2014-01-23 3 2014-01-23 20:07:18 2014-01-23 20:07:18 2014-01-23 20:07:18 2014-01-23 4 2014-01-23 20:07:19 2014-01-23 20:07:19 2014-01-23 20:07:19 2014-01-23 5 2014-01-23 20:07:20 2014-01-23 20:07:20 2014-01-23 20:07:20 2014-01-23 6 2014-01-23 20:07:21 2014-01-23 20:07:21 2014-01-23 20:07:21 2014-01-23 7 2014-01-23 20:07:22 2014-01-23 20:07:22 2014-01-23 20:07:22 2014-01-23 8 2014-01-23 20:07:23 2014-01-23 20:07:23 2014-01-23 20:07:23 2014-01-23 9 2014-01-23 20:07:24 2014-01-23 20:07:24 2014-01-23 20:07:24 2014-01-23 10 2014-01-23 20:07:25 2014-01-23 20:07:25 2014-01-23 20:07:25 2014-01-23 > > q() > proc.time() user system elapsed 0.377 0.063 0.430 foreign/tests/stata.R0000644000175100001440000000227513245463571014342 0ustar hornikuserslibrary(foreign) pc5 <- read.dta("pc5.dta") summary(pc5) str(pc5) compressed <- read.dta("compressed.dta") summary(compressed) all.equal(summary(pc5), summary(compressed)) sun6 <- read.dta("sun6.dta") summary(sun6) str(sun6) all.equal(summary(sun6),summary(pc5)) df <- read.dta("datefactor.dta") summary(df) data(esoph) write.dta(esoph,esophile <- tempfile()) esoph2 <- read.dta(esophile) all.equal(ordered(esoph2$alcgp),esoph$alcgp) write.dta(esoph,esophile,convert.factors="string") esoph2 <- read.dta(esophile) all.equal(as.character(esoph$alcgp),esoph2$alcgp) write.dta(esoph,esophile,convert.factors="code") esoph2 <- read.dta(esophile) all.equal(as.numeric(esoph$alcgp),as.numeric(esoph2$alcgp)) se <- read.dta("stata7se.dta") print(se) v8 <- read.dta("stata8mac.dta") print(v8) stata8 <- read.dta("auto8.dta",missing.type=TRUE,convert.underscore=FALSE) str(stata8) bq <- read.dta("MLLabelsWithNotesChar.dta") str(bq) write.dta(bq, "bq.dta", version = 12) str(read.dta('bq.dta')) unlink("bq.dta") ## PR#15290 bq <- read.dta("OneVarTwoValLabels.dta") str(bq) ## Dates and date-times in Stata12 Sys.setenv(TZ = "UTC") # avoid timezone differences: cannot unset so must be last read.dta("xxx12.dta") q() foreign/tests/octave.R0000644000175100001440000000011613245463571014477 0ustar hornikuserslibrary("foreign") otd <- read.octave("octave.dat") summary(otd) str(otd) q() foreign/tests/create-dumpdata.S0000644000175100001440000000040513245463577016266 0ustar hornikusers## file ./dumpdata was created by these (S-PLUS 6.2.1 for Linux): myobj <- data.frame(factor = factor(1:3, labels=c("a", "bc", "def")), ints = 1:3, floats = 1+(1:3)/10, logs= c(T,NA,F)) myobj[1,2] <- NA data.dump("myobj",file="dumpdata", oldStyle=TRUE) foreign/tests/spss.R0000644000175100001440000000730713600604447014211 0ustar hornikuserslibrary(foreign) sample100 <- read.spss("sample100.sav",FALSE) summary(sample100) str(sample100) d.sample100 <- data.frame(sample100,stringsAsFactors=TRUE) summary(d.sample100) s100 <- sample100 sample100 <- read.spss("sample100.por",FALSE) stopifnot(identical(s100, sample100)) # no need for further summary() etc pbc <- read.spss("pbc.sav",FALSE) summary(pbc) str(pbc) d.pbc <- data.frame(pbc) summary(d.pbc) pbco <- read.spss("pbcold.sav",FALSE) stopifnot(identical(pbc, pbco)) ## summary(pbco) ## str(pbco) ## d.pbco <- data.frame(pbco) ## summary(d.pbco) pbc. <- read.spss("pbc.por",FALSE) summary(pbc.) str(pbc.) # has variable.labels stopifnot(all.equal(d.pbc, data.frame(pbc.), tolerance = 1e-15)) electric.s <- read.spss(system.file("files", "electric.sav", package = "foreign"), TRUE, TRUE) electric.p <- read.spss("electric.por",TRUE,TRUE) electric.s4 <- read.spss(system.file("files", "electric.sav", package = "foreign"), TRUE, TRUE, max.value.labels = 4) summary(electric.s) ii <- c(2,10) vl <- list(FIRSTCHD = c("OTHER CHD"= 6, "FATAL MI"= 5, "NONFATALMI"= 3, "SUDDEN DEATH" = 2, "NO CHD" = 1), DAYOFWK = c(SATURDAY=7, FRIDAY=6, THURSDAY=5, WEDNSDAY=4, TUESDAY=3, MONDAY=2, SUNDAY=1)) stopifnot(identical(electric.s, electric.p), identical(electric.s[-ii], electric.s4[-ii]), identical(vl, lapply(electric.s4[ii], attr, "value.labels")), identical(lapply(vl, names), lapply(electric.s[ii], function(.) rev(levels(.))))) ## after "long label patch": invisible(Sys.setlocale (locale="C")) ## to resolve locale problem ldat <- read.spss("spss_long.sav", to.data.frame=TRUE) ldat nnms <- nms <- names(ldat) names(nnms) <- nms stopifnot(identical(nms, c("variable1", "variable2")), identical(nnms, attr(ldat, "variable.labels"))) ## some new arkward testcases for problems found in foreign <= 0.8-68 and duplicated value labels in general: ## Expect lots of warnings as value labels (corresponding to R factor labels) are uncomplete, ## and an unsupported long string variable is present in the data setwd(system.file("files", package = "foreign")) sav <- "testdata.sav" x.nodat <- read.spss(file=sav, to.data.frame = FALSE, reencode="UTF-8") str(x.nodat) x.sort <- read.spss(file=sav, to.data.frame = TRUE, reencode="UTF-8", stringsAsFactors=TRUE) str(x.sort) x.append <- read.spss(file=sav, to.data.frame = TRUE, add.undeclared.levels = "append", reencode="UTF-8") x.no <- read.spss(file=sav, to.data.frame = TRUE, add.undeclared.levels = "no", reencode="UTF-8") levels(x.sort$factor_n_undeclared) levels(x.append$factor_n_undeclared) str(x.no$factor_n_undeclared) ### Examples for duplicated.value.labels: ## duplicated.value.labels = "append" (default) x.append <- read.spss(file=sav, to.data.frame=TRUE, reencode="UTF-8") ## duplicated.value.labels = "condense" x.condense <- read.spss(file=sav, to.data.frame=TRUE, duplicated.value.labels = "condense", reencode="UTF-8") levels(x.append$factor_n_duplicated) levels(x.condense$factor_n_duplicated) as.numeric(x.append$factor_n_duplicated) as.numeric(x.condense$factor_n_duplicated) ### ToDo: ## Long Strings (>255 chars) are imported in consecutive separate variables ## (see warning about subtype 14) ## we should get that right in the import function in future versions x <- read.spss(file=sav, to.data.frame=TRUE, stringsAsFactors=FALSE, reencode="UTF-8") cat.long.string <- function(x, w=70) cat(paste(strwrap(x, width=w), "\n")) ## first part: x$string_500: cat.long.string(x$string_500) ## second part: x$STRIN0: cat.long.string(x$STRIN0) ## complete long string: long.string <- apply(x[,c("string_500", "STRIN0")], 1, paste, collapse="") cat.long.string(long.string) foreign/tests/Alfalfa.xpt0000644000175100001440000000670013245463577015171 0ustar hornikusersHEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 7.00 OSF1 10DEC99:15:56:3010DEC99:15:56:30 HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*******DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SPEC SASDATA 7.00 OSF1 10DEC99:15:56:3010DEC99:15:56:30 HEADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000600000000000000000000 POP SAMPLE REP SEEDWT HARV1 HARV2 ( HEADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 min AB@B33330BLmin AAB6B333330B33330min A AB(BBmin A0AB-BfffffhB333330min A@AB@B|BMAX APABKBBLMAX A`AB-BLBffffhMAX ApAB?B33330BMAX AABABffffhBMAX AAB;BB333330min A B;BB33330min AA B.B33330Bmin A A B*BxBmin A0A B&BBfffffhmin A@A B6BBMAX APA B;BfffffhBffffhMAX A`A B<BLBMAX ApA B?BffffhBMAX AA BFBB333330MAX AA B>BB33330min A0B<BffffhBffffhmin AA0B*BLBmin A A0B#B|LBfffffhmin A0A0B/BBmin A@A0B;BBLMAX APA0B9BfffffhBMAX A`A0B<B33330BMAX ApA0B;BB33330MAX AA0B;BfffffhBMAX AA0BFB333330Bmin A@B=BfffffhBmin AA@B4BffffhBmin A A@B+B333330Bmin A0A@B1BBLmin A@A@B<BBMAX APA@B;BB333330MAX A`A@B0BBMAX ApA@B=B33330B33330MAX AA@B@BfffffhBfffffhMAX AA@BGBBforeign/tests/mval_bug.sav0000644000175100001440000002437013245463577015420 0ustar hornikusers$FL2@(#) IBM SPSS STATISTICS DATA FILE 64-bit MS Windows 19.0.1  XY@15 Oct 1211:00:17 Q1_MISSI*Q.1 Opinion of president's job performance V2_A *Q.1 Opinion of president's job performance V3_A *Q.1 Opinion of president's job performance V4_A *Q.1 Opinion of president's job performance V5_A *Q.1 Opinion of president's job performance V6_A *Q.1 Opinion of president's job performance V7_A *Q.1 Opinion of president's job performance @X@V8_A *Q.1 Opinion of president's job performance X@V9_A *Q.1 Opinion of president's job performance X@V10_A *Q.1 Opinion of president's job performance @X@ (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error (-1) Coding error ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLY@X@ (97) Refused X@(98) Don't knowX@ (99) Missing  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-3) Missing (-2) Don't know (-1) Refused ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLYX@(99) Coding error  (-1) Coding error ?(1) Approve STRONGLY @(2) Approve SOMEWHAT @(3) Disapprove SOMEWHAT@(4) Disapprove STRONGLY@X@ (97) Refused X@(98) Don't knowX@ (99) Missing  o  Q1_MISSI=Q1_MISSING_NONE V2_A=Q1_MISSING_1 V3_A=Q1_MISSING_2 V4_A=Q1_MISSING_3 V5_A=Q1_MISSING_RANGE V6_A=Q1_MISSING_LOW V7_A=Q1_MISSING_HIGH V8_A=Q1_MISSING_RANGE_1 V9_A=Q1_MISSING_LOW_1 V10_A=Q1_MISSING_HIGH_1XQ1_MISSING_NONE:$@Role('0' )/Q1_MISSING_1:$@Role('0' )/Q1_MISSING_2:$@Role('0' )/Q1_MISSING_3:$@Role('0' )/Q1_MISSING_RANGE:$@Role('0' )/Q1_MISSING_LOW:$@Role('0' )/Q1_MISSING_HIGH:$@Role('0' )/Q1_MISSING_RANGE_1:$@Role('0' )/Q1_MISSING_LOW_1:$@Role('0' )/Q1_MISSING_HIGH_1:$@Role('0' )ISO_8859-1:1987cceeeeeeeeeeccffffffffffeeeeeeeeeeaaaaaaaacceeeeeeeeeehhhhhhhhhheeeeeeeeeeaaaaaaaahhhhhhhhhheeeeeeeeeeggggggggggbbbbbbbbhhhhhhhhhhffffffffffffffffffffbbbbbbbbhhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhhggggggggggeeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhbbbbbbbbeeeeeeeeeehhhhhhhhhhhhhhhhhhhhffffffffffffffffffffhhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhffffffffffffffffffffgggggggggggggggggggghhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhgggggggggghhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhheeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhbbbbbbbbhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhggggggggggeeeeeeeeeehhhhhhhhhhggggggggggffffffffffhhhhhhhhhhggggggggggeeeeeeeeeehhhhhhhhhhffffffffffhhhhhhhhhhaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhhbbbbbbbbffffffffffhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeeffffffffffggggggggggffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeebbbbbbbbhhhhhhhhhhffffffffffffffffffffffffffffffhhhhhhhhhhhhhhhhhhhhgggggggggggggggggggghhhhhhhhhhffffffffffhhhhhhhhhhggggggggggeeeeeeeeeeeeeeeeeeeehhhhhhhhhhffffffffffhhhhhhhhhhggggggggggeeeeeeeeeehhhhhhhhhhgggggggggghhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhggggggggggeeeeeeeeeeeeeeeeeeeeffffffffffeeeeeeeeeegggggggggghhhhhhhhhhffffffffffffffffffffffffffffffhhhhhhhhhhhhhhhhhhhhggggggggggffffffffffeeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeeeeeeeeeeeeffffffffffbbbbbbbbffffffffffggggggggggggggggggggffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffffffffffffeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhgggggggggghhhhhhhhhhffffffffffggggggggggeeeeeeeeeeggggggggggeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhgggggggggggggggggggghhhhhhhhhhhhhhhhhhhheeeeeeeeeeaaaaaaaagggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhgggggggggghhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffeeeeeeeeeeeeeeeeeeeeffffffffffeeeeeeeeeehhhhhhhhhhffffffffffggggggggggeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffeeeeeeeeeehhhhhhhhhhffffffffffeeeeeeeeeeggggggggggeeeeeeeeeeffffffffffffffffffffeeeeeeeeeeffffffffffeeeeeeeeeeaaaaaaaaggggggggggffffffffffffffffffffhhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeegggggggggghhhhhhhhhhgggggggggghhhhhhhhhheeeeeeeeeeaaaaaaaahhhhhhhhhhaaaaaaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhggggggggggffffffffffcccccccceeeeeeeeeehhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhhaaaaaaaahhhhhhhhhhhhhhhhhhhhgggggggggggggggggggghhhhhhhhhhffffffffffffffffffffhhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhggggggggggffffffffffeeeeeeeeeeggggggggggeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhffffffffffcccccccceeeeeeeeeehhhhhhhhhhhhhhhhhhhhggggggggggeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffffffffffffeeeeeeeeeehhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhhcccccccchhhhhhhhhhaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeehhhhhhhhhhffffffffffeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffeeeeeeeeeeeeeeeeeeeeffffffffffeeeeeeeeeehhhhhhhhhhffffffffffggggggggggggggggggggeeeeeeeeeeggggggggggeeeeeeeeeehhhhhhhhhheeeeeeeeeeggggggggggffffffffffffffffffffhhhhhhhhhheeeeeeeeeeccccccccgggggggggghhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhhhhhhhhhhhggggggggggffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhffffffffffeeeeeeeeeeffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeeaaaaaaaaggggggggggffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffggggggggggggggggggggffffffffffaaaaaaaahhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhheeeeeeeeeeffffffffffffffffffffffffffffffffffffffffeeeeeeeeeehhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffffffffffffffffffffffgggggggggghhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhheeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhaaaaaaaahhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffhhhhhhhhhhhhhhhhhhhhffffffffffeeeeeeeeeehhhhhhhhhhffffffffffhhhhhhhhhhffffffffffffffffffffhhhhhhhhhheeeeeeeeeeggggggggggggggggggggffffffffffhhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeaaaaaaaahhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffaaaaaaaahhhhhhhhhhffffffffffhhhhhhhhhhggggggggggeeeeeeeeeehhhhhhhhhhhhhhhhhhhhgggggggggghhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhheeeeeeeeeeffffffffffeeeeeeeeeehhhhhhhhhheeeeeeeeeeggggggggggggggggggggeeeeeeeeeehhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhggggggggggffffffffffggggggggggggggggggggffffffffffaaaaaaaagggggggggghhhhhhhhhhhhhhhhhhhhgggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffffffffhhhhhhhhhhffffffffffgggggggggghhhhhhhhhheeeeeeeeeeggggggggggeeeeeeeeeecccccccchhhhhhhhhheeeeeeeeeeffffffffffffffffffffeeeeeeeeeehhhhhhhhhhgggggggggggggggggggghhhhhhhhhheeeeeeeeeeeeeeeeeeeeggggggggggforeign/tests/sample100.por0000644000175100001440000002061213245463572015323 0ustar hornikusers@@@@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE 00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000 0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000 00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200012126/151 333112/SPSS for MS WINDOWS Release 10.04B/5B/70/4/YEAR5/4/0/5/4/0/CM/YEAR OF ADM INISTRATION70/8/DISTRICT5/6/0/5/6/0/CM/COUNTY DISTRICT NUMBER70/6/CAMPUS5/9/0/5/ 9/0/CT/COUNTY DISTRICT CAMPUS NUMBER7F/5/DNAME1/F/0/1/F/0/CD/DISTRICT NAME7F/5/C NAME1/F/0/1/F/0/CB/CAMPUS NAME71/3/SEX1/1/0/1/1/0/CE/SEX OF STUDENT73/7/DISADVG1 /3/0/1/3/0/CQ/ECONOMICALLY DISADVANTAGED78/8/ETHNICTY1/8/0/1/8/0/C9/ETHNICITY79/ 5/STUID1/9/0/1/9/0/CK/SCRAMBLED STUDENT ID70/6/TLIMTH5/F/0/5/F/0/C10/TEXAS LEARN ING INDEX - MATHEM70/5/GRADE5/1/0/5/1/0/CH/GRADE DESIGNATIONF39/24AE/2BESS5/C/M ESQUITE ISDE/A C NEW MIDDLE1/F2/NO5/WHITE9/00614371S30/8/34/24AE/2BET06/C/MESQUI TE ISDC/MCWHORTER EL1/F2/NO5/WHITE9/00614372S2Q/3/34/24AE/2BET0A/C/MESQUITE ISDD /RUTHERFORD EL1/ 1/ 1/ 9/00614373S27/3/35/24AE/2BET0N/C/MESQUITE ISDE/JOEY M PIR RUNG1/F2/NO8/HISPANIC9/00614373S2H/4/36/24AE/2BET0H/C/MESQUITE ISD9/PORTER EL1/ 1/ 1/ 9/00614373S2H/5/37/24AE/2BET0H/C/MESQUITE ISD9/PORTER EL1/ 1/ 1/ 9/0061437 3S2J/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO8/HISPANIC9/00614373 S2Q/7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO8/HISPANIC9/00614373S 2R/8/34/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F2/NO5/WHITE9/00614375S2T/3/3 5/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614375S2P/4/34/24AE/2BE T0N/C/MESQUITE ISDE/JOEY M PIRRUNG1/M2/NO5/WHITE9/00614378S2Q/3/35/24AE/2BET0N/C /MESQUITE ISDE/JOEY M PIRRUNG1/M2/NO5/WHITE9/00614378S2N/4/36/24AE/2BET0R/C/MESQ UITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/00614378S2R/5/37/24AE/2BET0R/C/MESQUITE ISD B/THOMPSON EL1/M2/NO5/WHITE9/00614378S2R/6/38/24AE/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1/M2/NO5/WHITE9/00614378S2Q/7/39/24AE/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1 /M2/NO5/WHITE9/00614378S2N/8/35/24AE/2BET0N/C/MESQUITE ISDE/JOEY M PIRRUNG1/M2/N O5/WHITE9/00614379S2A/3/36/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE 9/00614379S2S/4/37/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/006143 79S2Q/5/38/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/00614379S2P/6/ 39/24AE/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1/M2/NO5/WHITE9/00614379S2P/7/26K/24A E/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1/M2/NO5/WHITE9/00614379S32/8/34/24AE/2BET0 5/C/MESQUITE ISD9/HODGES EL1/M2/NO5/WHITE9/00614382S28/4/35/24AE/2BET05/C/MESQUI TE ISD9/HODGES EL1/M2/NO5/WHITE9/00614382S1R/5/36/24AE/2BESS5/C/MESQUITE ISDE/A C NEW MIDDLE1/M2/NO5/WHITE9/00614382S2A/6/34/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/NO5/WHITE9/00614384S2O/4/35/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRIC E EL1/F2/NO5/WHITE9/00614384S2G/5/36/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL 1/F2/NO5/WHITE9/00614384S2P/6/37/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/ NO5/WHITE9/00614384S2J/7/38/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/NO5/W HITE9/00614384S2E/8/34/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9 /00614389S2K/3/35/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9/0061 4389S2N/4/36/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9/00614389S 2B/5/37/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F3/YES5/WHITE9/00614389S2G/ 6/38/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614389S2J/7/39 /24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614389S2O/8/34/24A 5/2BEJ0Q/A/DALLAS ISDA/CENTRAL EL1/F3/YES5/WHITE9/00614390S2T/4/34/24AE/2BET0B/C /MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614391S22/5/37/24AE/2BET0I/C/MESQUITE ISDB/MCKENZIE EL1/ 1/ 1/ 9/00614392S2C/6/38/24AE/2BESS4/C/MESQUITE ISDF/MCDONALD MIDDLE1/M2/NO5/OTHER9/00614392S2E/7/39/24AE/2BESS4/C/MESQUITE ISDF/MCDONALD MID DLE1/M2/NO5/OTHER9/00614392S2B/8/35/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1 /F2/NO5/WHITE9/00614393S1R/3/36/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/ NO5/WHITE9/00614393S2P/4/37/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/NO5/ WHITE9/00614393S2B/5/38/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/NO5/WHIT E9/00614393S2L/6/39/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/NO5/WHITE9/00 614393S2K/7/34/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614396S25/ 3/35/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614396S24/4/34/24AE/ 2BET0M/C/MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2O/3/35/24AE/2BET 0M/C/MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2T/4/36/24AE/2BET0M/C /MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2S/5/37/24AE/2BET0M/C/MES QUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2S/6/38/24AE/2BESS6/C/MESQUIT E ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614397S2T/7/39/24AE/2BESS6/C/MESQUITE IS DF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614397S31/8/35/8GGP/9F216L/B/HARMONY ISDE/JA MES POOLE EL1/M2/NO5/WHITE9/00614402S2J/4/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUS TIN EL1/F2/NO5/WHITE9/00614403S2M/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL 1/F2/NO5/WHITE9/00614403S2P/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/N O5/WHITE9/00614403S2Q/5/37/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHI TE9/00614403S2Q/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/ 00614403S30/7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/0061 4403S2Q/8/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S1 O/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S2F/4/36 /24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S27/5/37/24AE/ 2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S2C/6/38/24AE/2BESS6 /C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614406S2G/7/39/24AE/2BESS6/C/M ESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614406S2P/8/34/24AE/2BET0C/C/MESQU ITE ISDB/TISINGER EL1/M2/NO5/WHITE9/00614414S2A/3/35/24AE/2BET0C/C/MESQUITE ISDB /TISINGER EL1/M2/NO5/WHITE9/00614414S23/4/36/24AE/2BET0C/C/MESQUITE ISDB/TISINGE R EL1/M2/NO5/WHITE9/00614414S27/5/37/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL 1/M2/NO5/WHITE9/00614414S24/6/38/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/M2 /NO5/WHITE9/00614414S2E/7/39/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/M2/NO5 /WHITE9/00614414S2H/8/34/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/ 00614416S23/3/35/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/00614416 S26/4/36/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/00614416S26/5/37 /24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614416S29/6/38/24A E/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F3/YES5/WHITE9/00614416S2N/7/39/24AE/2 BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614416S2M/8/34/24AE/2BET0 P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2Q/3/35/24AE/2BET0P/C/ME SQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2T/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2R/5/37/24AE/2BET0P/C/MESQUITE ISDD/ J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2S/6/38/24AJ/2BF4GL/D/SUNNYVALE ISDC/SUNNY VALE EL1/M2/NO5/WHITE9/00614417S2R/7/39/24AJ/2BF4GL/D/SUNNYVALE ISDC/SUNNYVALE E L1/M2/NO5/WHITE9/00614417S2M/8/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/ NO5/WHITE9/00614420S2T/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WH ITE9/00614420S2S/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/0 0614420S2R/5/37/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/0061442 0S32/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614420S33 /7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614420S31/8/3 4/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2I/3/35/24AE /2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2T/4/36/24AE/2BET0 P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2Q/5/37/24AE/2BET0P/C/ME SQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2Q/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614421S31/7/39/24AE/2BESS6/C/MESQUITE ISD F/R S KIMBROUGH M1/F2/NO5/WHITE9/00614421S30/8/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614423S2T/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUST IN EL1/M2/NO5/WHITE9/00614423S2S/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1 /M2/NO5/WHITE9/00614423S2Q/5/ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ foreign/tests/ex1-51.mtp0000644000175100001440000000227713245463572014550 0ustar hornikusersMinitab Portable Worksheet P1.1 1994 522 Release 9.1 . % 3 1 26 0 control . 1.202599976E+03 8.300999756E+02 3.723999939E+02 3.454999695E+02 3.211999817E+02 2.442999878E+02 1.629999847E+02 1.477999878E+02 9.499999237E+01 8.699999237E+01 8.119999695E+01 6.849999237E+01 4.729999924E+01 4.109999847E+01 3.659999847E+01 2.899999809E+01 2.859999847E+01 2.629999924E+01 2.609999847E+01 2.439999962E+01 2.169999886E+01 1.729999924E+01 1.149999905E+01 4.899999619E+00 4.899999619E+00 0.999999940E+00 . % 3 2 26 0 seeded . 2.745599854E+03 1.697799927E+03 1.655999878E+03 9.779999390E+02 7.033999634E+02 4.890999756E+02 4.299999695E+02 3.340999756E+02 3.027999878E+02 2.746999817E+02 2.746999817E+02 2.549999847E+02 2.424999847E+02 2.006999969E+02 1.985999908E+02 1.295999908E+02 1.189999924E+02 1.182999954E+02 1.152999954E+02 9.239999390E+01 4.059999847E+01 3.269999695E+01 3.139999962E+01 1.749999809E+01 7.699999809E+00 4.099999905E+00 . foreign/tests/testEmpty.R0000644000175100001440000000123313245463571015215 0ustar hornikusers## regression test for PR#15346 library(foreign) ## The testEmpty.xpt dataset was created using the following code: ## library(SASxport) ## data(iris) ## write.xport(Iris1=iris[1:2,], # two row dataset ## empty=data.frame(), # empty dataset ## Iris2=iris[3:4,], # two row dataset ## file="testEmpty.xpt", ## autogen.formats=FALSE # prevent autocreation of FORMATS dataset ## ) ## Test that lookup.xport retrieves all three datsets empty.f <- lookup.xport(file="testEmpty.xpt") empty.f stopifnot(length(empty.f) == 3L) dat.f <- read.xport(file="testEmpty.xpt") dat.f stopifnot(length(dat.f)==3) foreign/tests/download.R0000644000175100001440000000045613245463570015033 0ustar hornikuserslibrary(foreign) if(!nzchar(Sys.getenv("R_FOREIGN_FULL_TEST"))) q("no") read.dta("http://www.principlesofeconometrics.com/stata/airline.dta") ## no longer exists, Jan 2014 ##str(read.spss("http://psyweb.psy.ox.ac.uk/dapweb/teaching/graduate/data/crime.sav", ## to.data.frame=TRUE)) q() foreign/tests/octave.m0000644000175100001440000000136713245463571014543 0ustar hornikusers## Run this through (a recent enough version of) Octave to (re)create ## 'octave.dat', using 'octave < octave.m'. a_scalar = 1; a_complex_scalar = i; a_matrix = [1, 2; 3, 4]; a_complex_matrix = [1+2i, 3-4i; 5, -6]; a_range = 1 : 5; a_string = [ "foo"; "bar" ]; a_3_d_array = zeros(2, 2, 2); a_3_d_array(:,:,1) = a_matrix; a_3_d_array(:,:,2) = a_matrix + 4; a_complex_3_d_array = a_3_d_array; a_complex_3_d_array(:,:,1) = a_complex_3_d_array(:,:,1) + i; a_complex_3_d_array(:,:,2) = a_complex_3_d_array(:,:,2) - i; a_struct = struct("a", a_scalar, "b", a_matrix, "c", "foo"); a_list = list(a_scalar, a_matrix, "foo"); a_cell = { a_scalar, a_matrix; "foo", "bar" }; a_bool = false; a_bool_matrix = [ true, false ; false, true ]; save -ascii "octave.dat" a_*; foreign/tests/test.xpt0000644000175100001440000000240013245463571014605 0ustar hornikusersHEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 8.1 WIN_PRO 23JAN01:14:03:0823JAN01:14:03:08 HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*******DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS TEST SASDATA 8.1 WIN_PRO 23JAN01:14:03:0823JAN01:14:03:08 HEADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000200000000000000000000 I K  HEADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 AAAA AA0A AA A A A0A0AA0A A0A0A@AA@A A@A0 foreign/tests/arff.Rout.save0000644000175100001440000000275413245463571015633 0ustar hornikusers R version 2.5.0 Under development (unstable) (2007-03-25 r40887) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("foreign") > df <- read.arff("contact-lenses.arff") > summary(df) age spectacle-prescrip astigmatism tear-prod-rate pre-presbyopic:8 hypermetrope:12 no :12 normal :12 presbyopic :8 myope :12 yes:12 reduced:12 young :8 contact-lenses hard: 4 none:15 soft: 5 > str(df) 'data.frame': 24 obs. of 5 variables: $ age : Factor w/ 3 levels "pre-presbyopic",..: 3 3 3 3 3 3 3 3 1 1 ... $ spectacle-prescrip: Factor w/ 2 levels "hypermetrope",..: 2 2 2 2 1 1 1 1 2 2 ... $ astigmatism : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... $ tear-prod-rate : Factor w/ 2 levels "normal","reduced": 2 1 2 1 2 1 2 1 2 1 ... $ contact-lenses : Factor w/ 3 levels "hard","none",..: 2 3 2 1 2 3 2 1 2 3 ... > q() foreign/tests/sun6.dta0000644000175100001440000011057213245463571014470 0ustar hornikusersl('%(nglu0lnoall14 Sep 2000 10:40fffbfibfbiifbfbbbbiiibbiagealbalkphosascitesbilicholedemaxedemarxhepmegtimeplateeprotimesexsgotrsspidersstagecensrxgtrigrcopperidstfirstlatet0e %9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?@;D(?ABhUB@;D(?entry time?ABhUB@;D(?_dtaLst_ttime_dtaLst_t0t0_dtaLst_dcens_dtaLst_idid_dtaL_dtarLstBk@&ffDAh?AC33C 3Ba@zEf?.A)B =X6Ba@zEf?.A)B =X6B%,@^RD?33?A@B337BZ`@"\ENf?ff?A$Br\@BZ`@"\ENf?ff?A$Br\@Bk@aD'@YA.ffBLHBk@aD'@YA.ffBLHBt@~RDl?LA0B?2Bt@~R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B+@dzDQ> NA0By{B_@VffD̀?LABEB_@VffD̀?L ABEB{q@fffEY?XA!COB{q@fffEY? XA!COBL@{E@陚A(C3B; @S D?HA9BB; @S D?H:A9BBXM@HE?">A C:&BXM@HE?" >A C:&B<%,@qGDF?fffZPA)B8;B<%,@qGDF?fffZ PA)B8;B^@^RD4?lAffCٚXB^@^RD4?l sAffCٚXB8i*@fffD@9LA0CٚgVBQ&f@PEsA,?OA CFffBLP@uDV?3335A6ffB'ffj`BLP@uDV?3335 A6ffB'ffj`Bu?@xD??AffC-:Bu?@xD?? 7AffC-:B@WDE? ?A+33Beffr B@WDE? ? A+33Beffr A@PEo@ffJACFffBw7@r\D@@?AffB̙p"B @hQD?A Cٚ9B @hQD? KA Cٚ9B\*@AD4@?fff-AffB9B\*@AD4@?fff 6-AffB9B@@E@@33JSA.ffBff~BFj@vffC?A1BYDDBFj@vffC? /A1BYDDB@# D@?lAaBKB.9@VffDʀ??7A333Cs3P9B.9@VffDʀ?? j7A333Cs3P9Bmh@aGE@AfUA8CIBC@ZHD?A B"BC@ZHD? A B"B@WD@Y9A333Bv B@WD@Y 9A333Bv B7 @]pD2@ =A!C33B7 @]pD2@ =A!C33Be|@gC?A(Bfw Be|@gC? A(Bfw B*$@c Dq@33 ABB*$@c Dq@33  ABBkD@L(DK@LA@B33e[BU@\D>fAffBLDBU@\D>fAffBLDB- @UDA?XATC5YBU9X@\E@5A4CLPB%k@PD@ffAClTB%k@PD@ff AClTBs2@w =D}?fffxA$BffBs2@w =D}?fffxA$BffB?@s33DR>A33BLn,B?@s33DR> A33BLn,B @ =D`?ff'A!CCBB@g =D?AB34 BB@g =D? AB34 BR@DD?iA!BBR@DD? iA!BBGz@UD?ffABf~ABGz@UD?ffABf~AA3@ZHD`@@ABVLA3@ZHD`@@ aABVLB^E@vffD%?7A33B?B^E@vffD%? T7A33B?BP@s33D3?LTA!BBP@s33D3?L @TA!BB&p@c D@LA!C MB&p@c D@LA!C MB]B@QD ?fffA&ffB-1B]B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\A0}BL@%A`A9~B@@?L?LA,Bl@Y?ffA33Bl@Y?ffgA33B\@;?333A)B\@;?333cA)BX@Q?ٙABX@Q?ٙvABD@@AY?AffBD@@AY?uAffB @`?fffuA.ffB @`?fffuA.ffB@C ?333A B@C ?333-A B@I@@A B$@333?xA0B@A>XA.ffBP@=p?333??AffBd@Dz@?WPAAB@~R?331A0BH@^R??A#33B@i?0A#33Bx@_\)@陚_A.ffB(@4zAA&ffB0@U?A)B@L(@ffxA1BP@@?LA)B@U@ uA,B @fff@33DQA&ffBP@h?~TA)B8@+@A8BX@l(?iA,BL@JH?33?>A+33B,@nR?333+A,B@s ?0A,BL@dz?_A)B@e?IA,B @NR?3338A,B@=p?A.ffB@u?fffOA333Bd@ZH?AffBh@p?L A&ffBT@R\?333^A)foreign/tests/datefactor.dta0000644000175100001440000000226513245463572015711 0ustar hornikusersnhad@":@eY#Dh@"tsave8|saveW12 Nov 2001 15:19dffhlth159idh159adatee%10.2f%9.0g%d0ghlth159lth159YOUR HEALTH IN GENERAL @{XA@Y@@}XA@X@@XAOUR HEALTH IN GENERAL @{XA@Y@@}XA@X@@XAOUR HEALTH IN GENERAL @{XA@Y@@}XA@X@@XA@??@@@@@@@@@@@@@@@@@AA@AA A A0A0A@@A@A@PAPA@`A`ApApAAA@AA@AAAA@AA@AA@AA@AA@AA@AAAA@AAAA@AA@AAShlth1594XXX# EXCELLENTVERY GOODGOODFAIRPOORforeign/tests/OneVarTwoValLabels.dta0000644000175100001440000000132613245463570017242 0ustar hornikuserssC:\Users\bquistorff\Documents\decode dta files\temp.dta25 Apr 2013 21:40female%9.0gfem_lbl_val_env @- kJ_dtaefault","val")>0)ulino" 1 _lang_c_lang_l_default`BdefaultQfemaleault","val")>0)ulino" 1 _lang_l_spanishBݎg@fem_lbl_val_esR_dtaeault","val")>0)ulino" 1 _lang_listYdefault spanish+fem_lbl_val_esBB MasculinoFemenino$fem_lbl_val_enBB MaleFemaleforeign/tests/S3.Rout.save0000644000175100001440000000377013245463571015201 0ustar hornikusers R : Copyright 2004, The R Foundation for Statistical Computing Version 2.1.0 Under development (unstable) (2004-12-02), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > read.S("mySobj") factor ints floats 1 a 1 1.1 2 bc 2 1.2 3 def 3 1.3 > data.restore("dumpdata", print = TRUE) "myobj": structure [1] "dumpdata" > print(myobj) factor ints floats logs 1 a NA 1.1 TRUE 2 bc 2 1.2 NA 3 def 3 1.3 FALSE > data.restore("tsdumpdata", print = TRUE, verbose = TRUE) "sunspot": structure sunspot structure 3 .Data numeric 37 .Tsp numeric 3 class character 2 "carbon.dioxide": structure carbon.dioxide structure 3 .Data numeric 384 .Tsp numeric 3 class character 2 [1] "tsdumpdata" > sunspot Time Series: Start = 1936 End = 1972 Frequency = 1 [1] 40 115 100 80 60 40 23 10 10 25 75 145 130 130 80 65 20 10 5 [20] 10 60 190 180 175 120 50 35 20 10 15 30 60 105 105 105 80 65 > utils::str(carbon.dioxide) Time-Series [1:384] from 1959 to 1991: 315 316 316 318 318 ... > carbon.dioxide[1:60] [1] 315.42 316.32 316.49 317.56 318.13 318.00 316.39 314.66 313.68 313.18 [11] 314.66 315.43 316.27 316.81 317.42 318.87 319.87 319.43 318.01 315.75 [21] 314.00 313.68 314.84 316.03 316.73 317.54 318.38 319.31 320.42 319.61 [31] 318.42 316.64 314.83 315.15 315.95 316.85 317.78 318.40 319.53 320.41 [41] 320.85 320.45 319.44 317.25 316.12 315.27 316.53 317.53 318.58 318.92 [51] 319.70 321.22 322.08 321.31 319.58 317.61 316.05 315.83 316.91 318.20 > q() foreign/tests/dumpdata0000644000175100001440000000045013245463571014616 0ustar hornikusersmyobj structure 4 .Data list 4 factor structure 3 .Data integer 3 1 2 3 .Label character 3 a bc def class character 1 factor ints integer 3 N 2 3 floats numeric 3 1.1 1.2 1.3 logs logical 3 1 N 0 .Names character 4 factor ints floats logs row.names character 3 1 2 3 class character 1 data.frame foreign/tests/pbcold.sav0000644000175100001440000010464013245463572015061 0ustar hornikusers$FL2@(#) SPSS DATA FILE MS Windows Release 10.0.5 spssio32.dll Y@12 Dec 0013:02:21 AGE ALB ALKPHOS ASCITES BILI CHOL EDEMA EDTRT HEPMEG TIME PLATELETPROTIME SEX SGOT SPIDERS STAGE STATUS TRT TRIG COPPER   <eeesaM@@ؚ@-@Pp@eeehy@g@ffffff(@fffff>a@eede@c@7[ 9L@(\@@dde?r@@k@333333%@eegdezGa\@de"lxzQ@ףp= @ @ffffff?f@?dpddh@fffffX@eed@j@t^K@RQ@@ee?n@?@f@$@eeheeq= ףPN@dddH} C@= ףp= @@333333 @pq@eeeg@%@I\@dfdjqP@ףp= @@dde[o?o@@edgefdedd8mK@\(\@@ t@eedg@i@ffffff#@9N@dfhdj@48EJ@33333+@dddo333333?q@D@Pw@edgefzGa<@g@dddAE@p= ף@ȡ@ @@doeef@`o@b@eeeAfգQ@Q@@eed333333)@i@r@'@eehefhb@dddN@aJ@p= ף@@@ffffff?0p@epeehd@ p@33333S@efduM@)\( @x@ddd @m@s@333333+@eehefšT@ddd~:F@@t@ffffff?q@dedg@n@333333%@fffffV@dfe\ AcL@)\(@@[eeeo?@c@ddhef[ddd|гY)P@(\@ffff@?l@doedg@pr@= ףp_@eede@T㥛8D@HzG @h@dddffffff?i@@h@%@edgdffffff6R@ddd yJ@333333 @@@ q@eedh@l@%@33333s]@efdc@^)J@ffffff@@eee&@@f@q@(@eeheëq@i@`@ddH@{Gz @d@ffffff?`m@?eoedg@ j@deߋd5^I M@Gz @@ddeqffffff@`w@0@ t@edhef̜^@ddd P@p= ף@X@333333?o@edeh@u@&@fffffFP@dfdZd#L@ ףp= @@ddd333333 @p@@e@333333'@eehee9^@}@eeeK@Q@̰@ffffff1@x@eeehp@j@ffffff'@zGal@efhdg@p@BF@W@dde@|@ޯ@#@ddfee\(k@l@ddd^F@ffffff@@ffffff?r@dedf@@t@&@̼Z@dfd&J@q= ףp @8@dde@@@Pz@#@eegef33333d@d@eecZB>8K@{Gz @@5@e@?epeeh ףp=zY@efee@k@[ AyF@ףp= @ܞ@eeeq3333331@k@(@eehef33333g@`h@ j@ddd~:O@= ףp=@ɶ@ffffff? w@dedf@`x@333333%@RaR@df|doTD@RQ@m@ddeo @@p@t@eehefq= ףP^@c@e@ddd' D@Q @f@@r@eedf@`h@$@i@efd yJ@Q @m@dde?`p@@q@333333%@edhdfɤp= ףT@c@ddd#J{/I@Q @@?@j@dpedgĨ@f@Qk@efնd3J@ @@ddd?v@@q@%@edfdePe@ddda4OH@ @fffff@333333?s@dedg>@z@333333%@(\R@efd i@;Nё4L@Q @p@ddd333333?e@6@ps@333333%@edfdfv33333Q@eeeH.!N@Gz@33333@ffffff@t@epedhk@33333f@eedK7APB@= ףp= @H@ddeoffffff @w@X@@m@eeheffffff>a@gddd3K@fffff@ffffff?q@eedh@@333333%@(\R@eeӘd1UG@Q @L@[dddo?s@`v@edhde[͏(\Z@d[ddK7@@Gz @@333333@eedh@@l@ffffff'@b@ee[dC@@RQ @%@[ddeo@e@u@eehdf[zGaL@dddooH@Q @333336@?v@dedf̱@`i@333333%@QP@ded(\B@ffffff @@eeeffffff @r@Ȫ@h@ffffff'@eegeffffff]@d[ddZڊD@q= ףp@@333333?dedfr@}@%@33333Q@df[wd?F@Q@@dde@ ~@@0@ffffff)@edgeeHza@d@ d@dddI&¶G@333333 @К@?s@dedg @@v@#@qg@dfdhoH@ @fffffN@dddoffffff?0p@K@j@ddgdf{Gg@@f@q@d[ddOeN@(\@0@?eoedh @ m@iX@ef[dp_J@zG @@dde?p@L@333333%@edhee̼Z@dddz6 J@ @@?@q@dedf@q@333333%@QX@efd>yX5EI@ @fffffܳ@jddd0@@v@333333%@ddeeei@c@d[ddRI&P@@333338@@eoedh@@j@zGaL@ee[e QC@333333 @33333o@eeeo?r@h@o@eeheeRaR@`p@dddDpP@Q@@?z@doddg@@j@QS@eed`k@,Ԛ@@ffffff@33333@dde? @ܜ@v@333333%@eefef= ףpW@s@dex&J@q= ףp @@ffffff@@p@?eedg@k@(@RqZ@eedl@7A`HF@RQ@@ddd[ffffff?@n@k@333333%@ddedeڭzGaL@ddd h"lx2D@ @ƽ@?t@eeeg`@t@333333%@{G_@eed+e0M@333333 @`@ddd?@ @l@$@edgde33333Q@ddd%uE@Q@Ȃ@333333?k@dqdde@`j@9N@dfeg@|PkZN@@̗@ddd?r@$@t@ffffff*@edhefԞ33333E@dee h"lPG@(\@@6@ @deeg؊@d@333333'@̜n@efd<,tO@ @@ddeo@Pw@<@@f@edgef33333b@g@dddD@ @@333333?p@dnede0@z@a@deЮdH.9G@ @ԝ@ddeoffffff?z@_@ddgeef@`e@dddZӼI@HzG@@? }@dnedg@Pp@t@efd g@QIN@@\(\@@dddffffff?e@@`i@333333%@edgde33333Q@dxdAc]H@Gz @@`@?eeegH@`l@(@fffffj@eedg@c@ ^)3L@(\@Є@[ddd333333?@p@333333%@edfde[x K@ddd?5^IlH@(\ @2@333333? p@eedhd@y@'@9^@dfd?@@RQ @l@dddn?t@X@ l@edgdf̜^@dddsA?C@ @pz@ffffff?doede^@p@H@dfudKY8I@Q@8@ddeo @p@@`q@eeheeyV@Ps@q@ee_QE@= ףp=@<@1@@?eeeh@p@'@f@eed@i@q= ףI@p= ף@@eeffffff(@x@?d@333333'@eehee`c@`n@deH@HzG @l@ffffff@n@?eeeg`t@333333(@Pe@efdh@HPG@)\(@@dde333333@@{@h@m@333333%@edhee̯Pe@dddBG@(\@@?s@eedg@z@%@Pe@deqdd`TP@(\ @\@dde@n@Ћ@v@ffffff&@ddhefffffff@p@ddd}?5^O@333333 @@,@|@eeehأ@x@ffffff'@9N@eeds@VP@\(\@@ddd@}@@y@333333&@edgee33333s]@q@@c@deDL@ @ȑ@?@o@?eedh@)@33333Q@deȔd58EGK@Gz@@ddd?pp@@f@ffffff&@edgdffffff>a@dddƛG@ףp= @@@`p@eedh<@ l@'@yV@efdN@aJ@Gz @@idde@@f@%@eegeeT@e@ddd2U0*B@@@?u@dedgh@{@ffffff%@Qk@eedQ|aD@= ףp=@ @edp333333?r@?(@{@edgdffffff&T@dfddT㥛8J@333333 @@y@eedf4@i@&@33333[@eeƖdZӼ@@zG@@dddo?@@u@ddfeeb@`c@diehsF@(\ @8@Pt@?eeeh|@z@'@fffffn@efeea-S@ ףp= @h@eedffffff?i@@x@ffffff(@edhee33333U@dddΪVDB@\(\ @ܟ@?v@dedf@w@333333&@m@dedZd;OJ@zG@@dde @ i@p@g@'@eeheec@@f@e[ee1G@Q@x@ffffff1@eeefy@ffffff'@fffff]@ef[df@?5^IlH@ @@e[ddd@ u@$@edgde[X@dfea2U0*Q@Gz @@@z@?eddg@u@&@`S@efdQ|a<@)\(@T@edddm@ޭ@s@ffffff$@ededeɱiX@ddd]C;H@ @@?|@dddfح@e@ffffff$@ [@dfgdJI@P@ddepffffff@@f@@@ddhefHf@dddyF@ @d@?y@dedg@pt@$@d@dfdd@7A`HL@(\@0@ddd?o@6@333333$@ededee@eeeޓZ{H@\(\ @@@g@eeeh333333&@fffff]@efʝd|a2U0E@Q @x@ddd?r@@u@333333&@edfeex`@ddd[ӼA@@@?}@eedg(@u@$@b@dfʊeǘ Q@333333@@[dde@,@333333%@edfee[fffffY@dddBO@Q@@@333333?j@dedex@s@1@33333Q@dfnd/n-I@ @@ddd?.@t@$@edfeerH@dddMbF@zG @ @?dedg@p@333333%@33333[@dfd?ܵtC@RQ @p@ddeffffff?`~@r@%@eegeeѮ [@dddOeD@Q@Ȣ@@@dedg\@0}@ffffff%@e@dedQkwK@\(\ @@fddep@@'@eehef33333h@dddvq I@Q @@@`w@eeeh@p@333333&@`@eed*iJ@333333@@@ddd @0p@@p@ffffff'@ddgef33333[@j@ddd*QE@(\@@ffffff?r@deeg@0s@$@fffff[@dfdc@/$N@ ףp= @И@ged|@?@`{@#@eegde̼Z@w@dddJH@zG@@@@eoeeh@ v@Pe@eed!lVmH@ffffff @p@dde @`x@@i@ffffff$@edgeefffff>a@dddT㥛 K@p= ף@@333333?@deeg@ s@#@iX@eedAc]A@ףp= @@ddd @Pt@ğ@u@333333%@ddgdefffffF`@@j@{@eee/L P@p= ף@`@?eddhg@j@ffffff*@@G@efd+ηK@Q@@ddd333333?r@©@p@ffffff%@edgdefffffFP@d[ee镲 F@ףp= @@ffffff@eqeehX@yf@ee[vdeqJ@333333@H@dde333333?`o@@f@%@ddhde}̬L@dddH}8G@Gz @(@?s@enedhH@m@hb@dfeTJ@(\@@dde333333?p@@d@333333&@eehee[33333d@dddZd;O F@RQ@X@?p@dnedfn@P|@33333U@dfmd D@Q@@[dde3333330@4@333333)@eehee[fffffr@ddd;OO@(\@@?@z@e[edgN@ffffff#@̬L@dedm@[ӼF@q= ףp @"@ddeffffff1@@@ z@'@eegef33333d@i@dddq -O@ffffff@0@ffffff@@n@eeeh@ffffff*@ a@ef̮dX9FD@p= ף@p@dddffffff?|@@f@#@edgdefffff_@e@ddd:pΈRO@@@?t@dddhإ@d@333333$@`@efqd c*E@\(\ @$@dddffffff?@@z@ffffff%@edfdf͇fffff_@dddΈ{E@(\ @ @?pp@doedf@{@R@dedHPK@ @@ddd?pp@4@i@#@edfde]@dddJY8nO@ @ @?x@dedf\@u@333333$@`c@dedc@9EGrI@q= ףp@@dde333333@z@D@o@%@ddgeefffff6b@@k@`p@dddaG@{Gz @@?t@eedht@333333'@33333W@dfdc@ı.n K@\(\@@dden? r@@s@edgde@g@ddd"lxzG@)\(@Ј@?u@dedfԧ@u@333333%@33333c_@dedw-!K@ףp= @@eddev@@q@#@edfefx33333`@dddL F% G@ @P@333333@t@eoedh@Pq@33333`@ef˺d$J@Gz @p@den`@?x@t@edgefh@`e@c@dddlI@Q@Њ@ffffff?Ps@deeg@@o@&@D@dfd-@@Q@@[dd333333??n@m@"@edgdf[33333e@de( R@(\ @@333333?r@?dedff@j@ffffff%@̬L@deքdH.!>@Gz @@dde@@L@t@#@edgefh@q@n@dgeN@RQ@@p@?edehЇ@#@33333Y@eed r@uV~A@ ףp= @@e[dddn@ m@eeedf[33333`@ddd|гYK@= ףp=@@?|@dedfl@r@"@PU@dede@~:|Q@Gz@ȡ@ddeffffff@P@@0u@%@ddgee̬\@`n@ddd٬\H@@P|@? k@dede^@p@333333&@ K@ded h"XQ@{Gz@@eed333333@e@333333,@degee9^@ l@ddZd;E@ @P@333333?k@?eeehԤ@ps@ffffff&@fffff.c@dfd:MM@)\( @H@dde9@`v@@'@edfef0i@i@`k@dddN@aH@\(\ @0@333333?q@dnedf&@p~@`S@dfdi@?B@(\ @@ddd333333 @ |@V@s@ffffff&@edfdeڄ]@dddoTF@Gz @P@@s@dddg@i@333333$@fffffF`@efd k@+ݓL@(\ @y@ddd333333? k@@l@%@edgdfqR@dddSt$_E@{Gz @ @ffffff@`@dedfڥ@p@333333#@9^@dfhdf@F%uhM@Q @x@ddep @@p@@g@d@eehefɿfffff_@ddd>W[J@RQ@p@333333? m@dedg@`v@#@P@eexd:E@Q @P@[de!@?p@*@eehef[33333f@ d@dhddI +J@ @@h@eddhԐ@j@&@`@eedŏ1wD@Gz @@dde@ @B@j@#@edfdfи|@ddd{/LzN@zG@@?w@eddhH@m@$@T@eed@c@i@!uG@ffffff@P@dde[?p@2@ffffff"@edfdfҐiX@ddd;pΈҾA@zG@@?y@dedg@pr@333333$@33333a@efd0*TH@zG @@dddm333333?`x@@pp@edgdefffffV@d[dd/$UJ@Gz@@?dedg@v@333333$@R@de[d(\H@Q @@ddd?i@@ k@#@eegdfV@dgddׁsF>@\(\ @@m@eeef¤@~@#@yV@ded -K@@@[ddd?@ps@ffffff#@edede[33333S@ddd=UJ@ffffff@p@?q@dedg@@u@333333$@ [@dfde@c@K4D@{Gz @@[dde @P@333333$@eehee[pa@dddZB>K@ ףp= @x@? p@dedfb@Pq@$@33333E@dfdxz,CQ@RQ@Ȅ@[ddd333333?(@Pt@ffffff$@edhde[R@dddq= ףE@p= ף@Ƞ@?x@eedh@`q@#@33333Y@dfdm4HE@Q@t@ddd@}@@e@$@edgdf̤m@ddd7A`HF@p= ף @P@ffffff?o@eeeh@$@R@deΣdxL@Q @@[dde333333?@؀@#@edfde[Y:@ d@dddEJ!D@ףp= @@? i@dedf@{@333333$@ K@dfdhsB@ffffff @آ@odde@p@p}@#@edgefd@`v@ddd cZB.H@RQ @@?p@dedg@h@%@R@deŽdݓQ@= ףp= @(@fdd l@?@i@ffffff)@eegeepQ@drdd٬\A@q= ףp @l@@@eedg@p@'@fffff.c@efd`o@V/OO@ףp= @p@ddeoffffff?`g@8@d@edhdeƍ9^@ddd{GRI@ ףp= @P@?v@eedg0@p@#@iX@dfdd@~jtCK@q= ףp@@[dddffffff@@pt@ffffff$@eefde[|`@edd8dXJ@ @8@8@@eeehk@x@ffffff.@hb@efd{@ m@<,\J@Q @@dde?@s@@u@#@edhdeɧ33333I@ddd<,bL@Q @@%@ @dedh@w@$@fffff&d@efdc@p@A`2F@333333@x@ddd?Pr@"@u@333333"@edfde33333c_@dddu=@333333@@ @u@eedh4@'@̴k@deda+L@zG @P@ddeffffff?@l@v@333333'@eehdeqfffff6R@dddK7APF@(\@0@333333?p@dedfz@ i@333333$@33333Y@de}dK4A@333333@p@dddffffff?q@j@w@333333#@eefdfa@dddݵ|[D@q= ףp @̕@@x@dedg@t@ffffff$@fffffg@ded@h@@@ffffff @@ddd@m@@t@#@eegdffffff>a@ddd@aӋD@ @x@333333?`m@eedh@l@%@̼Z@df~dRN@ffffff@P@dddn?k@@@edfdesfffff&T@ddd48EB@)\(@@?eedfZ@d@#@YJ@dfd`l@JO@Q @@dddffffff?o@T@q@ffffff$@edgef{`S@edd"uq}H@ffffff @@@w@dedgB@$@fffffm@ee[d\mN@HzG@@dddo333333?j@@n@ededep̬L@d[evOj1R@p= ף @@333333??dedh@0p@333333$@PU@de[rd(\¥N@ @@dden333333@x@@@c@edheefffff.c@dddOJ@ ףp= @@ffffff?o@eeefP@Ps@#@fffff6R@dfodR'H@(\ @(@dden?u@`@r@ddfdf̜^@d[dd0' uJ@Gz@@?dedg&@$@0Y@df[d}?5^G@ףp= @Ȑ@ddd333333?m@@k@#@edgdfo0Y@ddd'1I@333333 @@?y@deeg@@v@ffffff$@fffffX@demd|?5VQ@q= ףp @(@dde?@y@@m@#@edgef33333S@l@dddvD@@В@@@dedg@k@ffffff%@ai@efdc@QM@q= ףp @@[ddd?@$@edgde[xfffffK@dddy) B@{Gz @@&@@eedh@r@%@b@efd@j@NbX9LA@Q@@[ddd?@pz@333333$@edede[P@ddd9#J[E@Gz@@@?j@dedgڠ@f@333333#@33333`@dfd{O@(\ @8@dddffffff@z@L@l@333333%@eefeeĚYj@dddF%uPL@333333 @@?v@eedh@p@ffffff#@33333W@dfd@c@6;N!G@ ףp= @ @dde@@w@@n@(@edgefd@`l@eeevN@q= ףp@@333333,@|@eoedht@@j@eed`c@o_OC@HzG @@edddPs@d@Ps@ffffff#@edgdeɧ33333c@ddd{/LbC@HzG @@ffffff? q@dedf@`o@333333$@fffffV@dedYL@ @@dde?k@@l@333333#@edgdf̋R@ddd yyM@ @@ffffff@s@dddf8@x@ffffff#@yf@eede@uvB@ @(@dddffffff?j@@d@333333#@edgdfee0*5O@ffffff@@@g@?eedhu@&@e@eedi@\CMA@HzG @`s@ddeffffff @r@@'@eehdfT@ddd c*M@\(\?@333333 @0@eeeh4@g@ffffff%@ai@efdM OI@)\(@H@dde?p@|@p@333333%@edgde`@dddd]KWE@{Gz@|@?@eeeh0@q@#@YZ@dedy@TR'0A@ @@ddd?@@ t@ffffff&@edfdf]@ f@dqddڊe@@p= ף@l@@eedgh@ u@'@(j@dfӫd+e0C@RQ@p@dde?o@Н@Pu@ffffff#@eegdeΧpa@ddd M@@@?{@eedgh@f@333333$@PU@ded|?5^P@ @@dd333333?q@?H@pr@#@edfdf[`@ddd"uqeG@Q@@?r@eeeh@s@ffffff&@fffffF`@eedl@y) L@(\ @w@ddd?m@@`t@333333$@edgde|33333I@dddVD@(\ @|@@s@eeeh(@q@#@̬\@dfd t@@s@[$P@(\@D@ddeffffff? v@H@Pq@#@edgde33333h@c@dlddZd;P@{Gz@d@@}@enedh@ m@h@efd|a2U0jF@(\ @Г@ddd333333@u@h@p@333333#@eegee q@l@ddd46W[A@@ }@ffffff? h@eeeg@c@$@dfڇdXq?@Q @@ddd?u@@@n@ffffff#@edgdeДddd6;N!M@Q@w@?q@dedf8@`l@333333%@dedX9vI@Q @X@ddd?y@@p@333333#@edededdd1%M@(\@X@@Pq@eedg<@k@#@dfdR!R@Q @@ddeffffff@m@@o@%@ddhdfg@ddd<,Ԛ.J@Q @Ȋ@ @pw@eeeg4@pw@#@df[d?W[dE@{Gz@@ddeffffff@ t@@l@#@edgdf j@ddj+oA@(\ @@?{@?eeehT@o@&@g@dfdBiF@(\@ܝ@dde333333 @@v@@s@ffffff&@eegdfg@ddd+e0G@ @P@ @u@enedh@r@dfdPk'L@(\ @(@ddd?s@8@pq@ffffff$@edgde@p@eee`vOQ@p= ף@`@ffffff@k@eeeh`f@`h@333333(@eee_LK@@@deo@u@?@edheet`f@ddd_)NJF@ @P@ @`w@dedfL@333333$@g@dfdSt$G:@Q @@edde|@@l@ffffff$@eegdededdMSt@{Gz @@?q@dedf@u@%@dfdڊeN@p= ף @@dde?n@@r@$@edfde|ddd_&M@@8@?@p@dedf@l@%@dfd&S*O@ @Ě@ddd333333? {@X@@m@ffffff$@edfdeȋ`e@dfddB@HzG @h@n@dedf8@t@%@dedOe@@RQ@@ddd@@@i@%@eefdf@g@[[[dd333333 @ffffff?[o[[[[@w@d[[[[[RQ@[e[ffffff??ҫ@t@333333(@[[[[e[[[[[[ddQ@ffffff?[[[[[8@@l@#@d[[[[[Gz@[d[[ffffff??.@&@[[[[e[[[[[[ddףp= @?[n[[[[@q@d[[[[[q= ףp @[dd[ffffff?@@ s@#@[[[[d[[[[[i[edq= ףp@[[[[[@p@$@e[[[[[{Gz@[d[??Ƣ@@l@%@[[[[d[[[[[[eHzG @??[[[[[H@0p@%@d[[[[[Q @[dd[?l@%@[[[[e[[[[[[dd)\(@333333?[[[[[@ffffff&@d[[[[[Q@[dd[333333?@@m@'@[[[[d[[[[[[ddQ @?[[v[[[[@d[[[[[\(\ @[dd[?P@n@$@[[[[d[[[[[[ddQ@333333?[[[[[[v@ffffff&@d[[[[[ @e[dd[[~@333333(@[[[[e[[[[[[dd333333 @ffffff?[[[[[ؖ@0w@333333$@e[[[[[ ףp= @[dd[ @H@Pt@$@[[[[e[[[[[[d{Gz @@?[[[[[333333+@e[[[[[(\@[ed[333333)@@'@[[[[e[[[[[[dd\(\@ffffff@[[[[[[@333333%@e[[[[[Gz @[dd[ffffff@ }@@'@[[[[e[[[[[[dd@333333?[[[[[@q@333333$@d[[[[[Q @[dd[@@`c@333333$@[[[[d[[[[[[ddQ @?[n[[[[ܡ@e[[[[[\(\ @t[dd[@}@+@[[[[e[[[[[[ddQ@333333?[[[[[H@p@333333%@d[[[[[(\@[dd[@N@ffffff&@[[[[d[[[[[m[edRQ @[[[[[q@333333*@e[[[[[ ףp= @[dd[?>@n@%@[[[[d[[[[[[ddQ@333333&@[[[[[[@ffffff(@e[[[[[Gz@[dd[!@@ j@333333%@[[[[d[[[[[[ddGz@?[[[[[@@x@333333$@d[[[[[{Gz@[e[o333333??x@d@[[[[e[[[[[[dd\(\@333333 @[[[[[[@"@e[[[[[Q @[dd[?$@g@(@[[[[d[[[[[[dd(\@ffffff?[[[[[N@ o@$@d[[[[[ffffff@[dd[m@@i@[[[[e[[[[[s[dd333333 @[[[[[@333333&@e[[[[[(\@[dd[333333?8@t@#@[[[[d[[[[[[dd333333 @?[[[[[@d@333333%@d[[[[[(\@[dd[?@333333#@[[[[e[[[[[[dd@?[[[[[D@$@d[[[[[Gz @[e[@?@@`e@333333&@[[[[e[[[[[g[ddGz @[[[[[@$@d[[[[[Q @[dd[?ң@s@$@[[[[d[[[[[[ddQ@?[[[[[̣@0z@%@d[[[[[333333 @[dd[?P@f@$@[[[[e[[[[[[dd{Gz@@[[[[[H@(@$@d[[[[[RQ@v[dd[@{@ffffff#@[[[[d[[[[[[dd @333333?[[[[[@#@d[[[[[ @[dd[@pv@'@[[[[e[[[[[[ddp= ף @?[n[[[[@l@d[[[[[Gz@[dd[? o@k@ffffff%@[[[[e[[[[[[ddQ @?[[[[[4@d@#@d[[[[[)\(@[ed[+@@x@= ףp=&@[[[[e[[[[[[ddGz@@[[[[[@%@e[[[[[zG @t[dd[n@x@[[[[e[[[[[[e)\( @333333@?[[[[[~@p@333333&@e[[[[[ffffff @[dd[333333?ʠ@o@$@[[[[d[[[[[[ddRQ @ffffff?[[[[[n@g@#@d[[[[[@[dd[ffffff?@ q@333333%@[[[[d[[[[[[ddQ @333333?[[[[[ @l@%@d[[[[[ ףp= @[dd[#@@@r@ffffff$@[[[[e[[[[[[ddGz@@[[[[[ @o@#@d[[[[[(\ @[d[??@@ l@#@[[[[e[[[[[[eףp= @ffffff @?[[[[[@l@333333&@e[[[[[RQ@[dd[333333@@ z@%@[[[[d[[[[[[ddHzG @333333?[o[[[[@d[[[[[p= ף@r[dd[k@g@333333'@[[[[e[[[g[[[d??[[[[[@%@d[[[[[333333 @[dd[?@`n@ffffff#@[[[[d[[[[[[ddq= ףp@ffffff?[[[[[@ j@333333%@d[[[[[ ףp= @[dd[333333?ؙ@d@#@[[[[d[[[g[[[d333333+@?[[[[[ԙ@ m@#@d[[[[[ @[dd[?`@%@[[[[d[[[[[[ed{Gz@ffffff?[n[[[[@d@d[[[[[333333 @g[dd[n,@[[[[d[[[[[[ddffffff@333333?[o[[[[@d[[[[[= ףp=@[dd[?`@e@%@[[[[d[[[[[[eGz@ffffff??[[[[[ h@s@#@e[[[[[(\@f[e[?\@333333(@[[[[d[[[[[[ddףp= @ffffff?[o[[[[Ĕ@ y@d[[[[[ףp= @[dd[?@Pq@ffffff$@[[[[d[[[[[[dd333333 @?[[[[[@z@ffffff$@d[[[[[Q @[dd[333333@|@g@%@[[[[d[[[[[[dd(\@333333 @[[[[[@ h@$@d[[[[[Q @[dd[?@ p@333333%@[[[[d[[[[[[ddQ @@[[[[[8@333333&@e[[[[[Gz@[dd[?x@p@333333%@[[[[d[[[[[[ddp= ף @@[[[[[ԑ@p@%@d[[[[[ @[dd[ffffff@@u@$@[[[[d[[[[[e[ddQ @[[[[[@@u@333333%@d[[[[[q= ףp@[dd[@@`k@'@[[[[e[[[[[[ddQ @?[[[[[@k@%@d[[[[[\(\ @[d[ffffff??@@d@ffffff%@[[[[d[[[[[[ddףp= @ffffff?[[[[[@j@%@d[[[[[{Gz@[dd[?@o@%@[[[[d[[[[[[dd(\ @333333?[[[[[|@q@333333%@d[[[[[p= ף @e[dd[$@n@%@[[[[d[[[[[[ddףp= @ffffff?[[[[[@s@%@d[[[[[Gz@[dd[333333?H@e@%@[[[[e[[[[[[ddp= ף@?[[[[[<@f@ffffff&@d[[[[[\(\ @[dd[?|@#@[[[[d[[[[[[dd@?[[[[[@p@$@d[[[[[RQ @[dd[ffffff?@u@333333%@[[[[d[[[foreign/tests/sample100.sav0000644000175100001440000002577413245463577015337 0ustar hornikusers$FL2@(#) SPSS DATA FILE MS Windows Release 10.0.5 spssio32.dll dY@12 Dec 0014:44:33 YEAR YEAR OF ADMINISTRATION DISTRICTCOUNTY DISTRICT NUMBER   CAMPUS COUNTY DISTRICT CAMPUS NUMBER DNAME DISTRICT NAME  CNAME CAMPUS NAME  SEX SEX OF STUDENT DISADVG ECONOMICALLY DISADVANTAGED ETHNICTY ETHNICITY    STUID SCRAMBLED STUDENT ID   TLIMTH TEXAS LEARNING INDEX - MATHEM GRADE GRADE DESIGNATION   ! @G@蕝AMESQUITE ISD A C NEW MIDDLE F lNO WHITE 00614371S @G@ЗAMESQUITE ISD MCWHORTER EL F NO WHITE g00614372S @G@𗝋AMESQUITE ISD RUTHERFORD EL 00614373S g@G@XAMESQUITE ISD JOEY M PhIRRUNG F NO HISPANIC00614373S @G@(AMESQUITE ISD PORTER EL i00614373S @G@(AMESQUITE ISD PORTER EL j00614373S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO HISPANIC00614373S k@G@𕝋AMESQUITE ISD R S KIMBlROUGH M F NO HISPANIC00614373S @G@AMESQUITE ISD JOHN HANBY EL F gNO WHITE 00614375S @G@AMESQUITE ISD SHANDS EL F NO WHITE h00614375S @G@XAMESQUITE ISD JOEY M PIRRUNG M NO WHITE 00614378S g@G@XAMESQUITE ISD JOEY M PhIRRUNG M NO WHITE 00614378S @G@xAMESQUITE ISD THOMPSON EL M iNO WHITE 00614378S @G@xAMESQUITE ISD THOMPSON EL M NO WHITE j00614378S @G@AMESQUITE ISD BERRY MIDDLE M NO WHITE 00614378S k@G@AMESQUITE ISD BERRY MIlDDLE M NO WHITE 00614378S @G@XAMESQUITE ISD JOEY M PIRRUNG M gNO WHITE 00614379S @G@xAMESQUITE ISD THOMPSON EL M NO WHITE h00614379S @G@xAMESQUITE ISD THOMPSON EL M NO WHITE 00614379S i@G@xAMESQUITE ISD THOMPSONj EL M NO WHITE 00614379S @G@AMESQUITE ISD BERRY MIDDLE M kNO WHITE 00614379S @@@G@AMESQUITE ISD BERRY MIDDLE M NO WHITE l00614379S @G@ȗAMESQUITE ISD HODGES EL M NO WHITE 00614382S h@G@ȗAMESQUITE ISD HODGES EiL M NO WHITE 00614382S @G@蕝AMESQUITE ISD A C NEW MIDDLE M jNO WHITE 00614382S @G@@AMESQUITE ISD VERNON PRICE EL F NO WHITE h00614384S @G@@AMESQUITE ISD VERNON PRICE EL F NO WHITE 00614384S i@G@@AMESQUITE ISD VERNON PjRICE EL F NO WHITE 00614384S @G@ЕAMESQUITE ISD VANSTON MIDDLE F kNO WHITE 00614384S @G@ЕAMESQUITE ISD VANSTON MIDDLE F NO WHITE l00614384S @G@AMESQUITE ISD JOHN HANBY EL F YES WHITE 00614389S g@G@AMESQUITE ISD JOHN HANhBY EL F YES WHITE 00614389S @G@AMESQUITE ISD JOHN HANBY EL F iYES WHITE 00614389S @G@ؕAMESQUITE ISD WILKINSON MIDDL F YES WHITE j00614389S @G@ؕAMESQUITE ISD WILKINSON MIDDL F NO WHITE 00614389S k@G@ؕAMESQUITE ISD WILKINSOlN MIDDL F NO WHITE 00614389S F@0ADALLAS ISD CENTRAL EL F hYES WHITE 00614390S @G@AMESQUITE ISD SHANDS EL F NO WHITE i00614391S @G@0AMESQUITE ISD MCKENZIE EL 00614392S j@G@AMESQUITE ISD MCDONALDk MIDDLE M NO OTHER 00614392S @G@AMESQUITE ISD MCDONALD MIDDLE M lNO OTHER 00614392S @G@@AMESQUITE ISD VERNON PRICE EL F NO WHITE g00614393S @G@@AMESQUITE ISD VERNON PRICE EL F NO WHITE 00614393S h@G@@AMESQUITE ISD VERNON PiRICE EL F NO WHITE 00614393S @G@@AMESQUITE ISD VERNON PRICE EL F jNO WHITE 00614393S @G@ЕAMESQUITE ISD VANSTON MIDDLE F NO WHITE k00614393S @G@AMESQUITE ISD SHANDS EL F NO WHITE 00614396S g@G@AMESQUITE ISD SHANDS EhL F NO WHITE 00614396S @G@PAMESQUITE ISD GEORGIA W KIMBA F gNO WHITE 00614397S @G@PAMESQUITE ISD GEORGIA W KIMBA F NO WHITE h00614397S @G@PAMESQUITE ISD GEORGIA W KIMBA F NO WHITE 00614397S i@G@PAMESQUITE ISD GEORGIA jW KIMBA F NO WHITE 00614397S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F kNO WHITE 00614397S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO WHITE l00614397S / AAHARMONY ISD JAMES POOLE EL M NO WHITE 00614402S h@G@hAMESQUITE ISD J C AUSTgIN EL F NO WHITE 00614403S @G@hAMESQUITE ISD J C AUSTIN EL F hNO WHITE 00614403S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE i00614403S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE 00614403S j@G@𕝋AMESQUITE ISD R S KIMBkROUGH M F NO WHITE 00614403S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F lNO WHITE 00614403S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE g00614406S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE 00614406S h@G@hAMESQUITE ISD J C AUSTiIN EL F NO WHITE 00614406S @G@hAMESQUITE ISD J C AUSTIN EL F jNO WHITE 00614406S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO WHITE k00614406S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO WHITE 00614406S l@G@AMESQUITE ISD TISINGERg EL M NO WHITE 00614414S @G@AMESQUITE ISD TISINGER EL M hNO WHITE 00614414S @G@AMESQUITE ISD TISINGER EL M NO WHITE i00614414S @G@ؕAMESQUITE ISD WILKINSON MIDDL M NO WHITE 00614414S j@G@ؕAMESQUITE ISD WILKINSOkN MIDDL M NO WHITE 00614414S @G@ؕAMESQUITE ISD WILKINSON MIDDL M lNO WHITE 00614414S @G@AMESQUITE ISD TISINGER EL F NO WHITE g00614416S @G@AMESQUITE ISD TISINGER EL F NO WHITE 00614416S h@G@AMESQUITE ISD TISINGERi EL F NO WHITE 00614416S @G@ؕAMESQUITE ISD WILKINSON MIDDL F jNO WHITE 00614416S @G@ؕAMESQUITE ISD WILKINSON MIDDL F YES WHITE k00614416S @G@ؕAMESQUITE ISD WILKINSON MIDDL F NO WHITE 00614416S l@G@hAMESQUITE ISD J C AUSTgIN EL M NO WHITE 00614417S @G@hAMESQUITE ISD J C AUSTIN EL M hNO WHITE 00614417S @G@hAMESQUITE ISD J C AUSTIN EL M NO WHITE i00614417S @G@hAMESQUITE ISD J C AUSTIN EL M NO WHITE 00614417S jG@3ASUNNYVALE ISD SUNNYVALkE EL M NO WHITE 00614417S G@3ASUNNYVALE ISD SUNNYVALE EL M lNO WHITE 00614417S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE g00614420S @G@hAMESQUITE ISD J C AUSTIN EL M NO WHITE 00614420S h@G@hAMESQUITE ISD J C AUSTiIN EL F NO WHITE 00614420S @G@hAMESQUITE ISD J C AUSTIN EL F jNO WHITE 00614420S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO WHITE k00614420S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F NO WHITE 00614420S l@G@hAMESQUITE ISD J C AUSTgIN EL F NO WHITE 00614421S @G@hAMESQUITE ISD J C AUSTIN EL F hNO WHITE 00614421S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE i00614421S @G@hAMESQUITE ISD J C AUSTIN EL F NO WHITE 00614421S j@G@𕝋AMESQUITE ISD R S KIMBkROUGH M F NO WHITE 00614421S @G@𕝋AMESQUITE ISD R S KIMBROUGH M F lNO WHITE 00614421S @G@hAMESQUITE ISD J C AUSTIN EL M NO WHITE g00614423S @G@hAMESQUITE ISD J C AUSTIN EL M NO WHITE 00614423S h@G@hAMESQUITE ISD J C AUSTiIN EL M NO WHITE 00614423S foreign/tests/auto8.dta0000755000175100001440000001322513245463571014635 0ustar hornikusersq J1978 Automobile DatacbL46b20 May 2003 14:39make20pricesmpglrep78headroomtrunknweightelengthturnng_circledisplacementgear_ratioforeigntestmiss %-18s%8.0gc%8.0g%8.0g%6.1f%8.0g%8.0gc%8.0g%8.0g%8.0g%6.2f%8.0g%9.0gakenakeodelurationivisionivisionivisionipsnesnooriginMake and Modele/R-packages/foreign/tests/auto8.dta, replace@@  (Pricend Modele/R-packages/foreign/tests/auto8.dta, replace@@  (Mileage (mpg)e/R-packages/foreign/tests/auto8.dta, replace@@  (Repair Record 1978packages/foreign/tests/auto8.dta, replace@@  (Headroom (in.)978packages/foreign/tests/auto8.dta, replace@@  (Trunk space (cu. ft.)kages/foreign/tests/auto8.dta, replace@@  (Weight (lbs.)u. ft.)kages/foreign/tests/auto8.dta, replace@@  (Length (in.)u. ft.)kages/foreign/tests/auto8.dta, replace@@  (Turn Circle (ft.) .)kages/foreign/tests/auto8.dta, replace@@  (Displacement (cu. in.)ages/foreign/tests/auto8.dta, replace@@  (Gear Ratiot (cu. in.)ages/foreign/tests/auto8.dta, replace@@  (Car typeot (cu. in.)ages/foreign/tests/auto8.dta, replace@@  (ar typeot (cu. in.)ages/foreign/tests/auto8.dta, replace@@  (AMC Concord @ r (ye@AMC Pacerd@@  (!@AMC Spirit@@ P #yE@Buick Century@ (;@Buick Electra@+^q=@Buick LeSabre@V+R.@Buick Opelree@@ "07@Buick RegaleE@ *;@Buick Riviera(`@(+;@Buick Skylark`@ H *E@Cad. Devilley,@,@Cad. Eldorado8`@<+^( @Cad. Seville">@@ -^)\@Chev. Chevette  @ >";@Chev. ImpalaeI@j+ #@Chev. Malibue`@l R.@Chev. Monte Carlo@ )R.@Chev. MonzaCarloS@ (R.@Chev. NovaCarlos`@ f + #@Dodge ColtCarlo@H#b\b@Dodge Diplomatlo@.>{@Dodge Magnumtlo@.>{@Dodge St. Regiso@.(<@Ford Fiestagiso%? !bI@Ford Mustangiso[@ Z +E@Linc. Continental, `@3{@Linc. Mark Vntal5  @p0{@Linc. Versailles4`@).{@Merc. Bobcatles@@  'R.@Merc. Cougarles`@0.0@Merc. Marquises`@,.ף@Merc. Monarches@@* )@Merc. XR-7rles@@"-.0@Merc. Zephyres `@ +E@Olds 98onadosn"@+^q=@Olds Cutl Suprs4@ *;@Olds Cutlasses}@ *;@Olds Delta 88s@j*R.@Olds Omega88sU@* +E@Olds Starfiresc@ (R.@Olds Toronados(`@+^q=@Plym. Arrowos'@ %33C@Plym. ChamposI" @ %V{>@Plym. Horizons@$iW@Plym. SapporosV? &w\b@Plym. Volares@ ,RN@Pont. Catalinas@t*R.@Pont. FirebirdsF? *E@Pont. Grand Prixf@ -;@Pont. Le Mansixs`@ (;@Pont. PhoenixixH`@ \ +E@Pont. SunbirdixL@ )R.@Audi 5000irdix%@@ %L@Audi Foxbirdix @ $al@BMW 320iirdix& @ Z "yh@Datsun 200rdixU?B #wx@Datsun 210rdix#@ Ul@Datsun 510rdix @"w\b@Datsun 810rdix @ &33c@Fiat Stradadix @R$iW@Honda Accordix@@ $k33C@Honda Civicix @"[33S@Mazda GLCcix`@ !VRn@Peugeot 604ix2`@\ &e@Renault Le Carx7@@ &"O{n@Subaru Le Carx# @ $a s@Toyota Celicax  @j $ C@Toyota Corollax@@ #apM@Toyota CoronaxW@ n $33C@VW Dasheroax @ p$a)\o@VW Dieselonax)@@#Zq@VW RabbitonaxY@@#Yq@VW Sciroccoax@$aq@Volvo 260oax. @b %R>@)originRR߁ d8n DomesticForeignforeign/tests/keep/0000755000175100001440000000000013245463570014020 5ustar hornikusersforeign/tests/keep/codefile.sps0000644000175100001440000000032213245463570016316 0ustar hornikusersSET DECIMAL=DOT. DATA LIST FILE= "datafile.dat" free (",") ENCODING="Locale" / X1 X2 * X3 (A8) . VARIABLE LABELS X1 "X1" X2 "X2" X3 "X3" . VARIABLE LEVEL X1, X2 (scale). EXECUTE. foreign/tests/keep/datafile.dat0000644000175100001440000000004113245463570016256 0ustar hornikusers1,4,str_1, 2,5,str_2, 3,6,str_3, foreign/tests/minitab.R0000644000175100001440000000017713245463571014650 0ustar hornikuserslibrary(foreign) ex1.51 <- read.mtp("ex1-51.mtp") summary(ex1.51) str(ex1.51) ex1.51 <- data.frame(ex1.51) summary(ex1.51) q() foreign/tests/arff.R0000644000175100001440000000012213245463571014131 0ustar hornikuserslibrary("foreign") df <- read.arff("contact-lenses.arff") summary(df) str(df) q() foreign/tests/minitab.Rout.save0000644000175100001440000000230713245463570016331 0ustar hornikusers R version 2.9.0 Under development (unstable) (2009-01-28 r47758) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > ex1.51 <- read.mtp("ex1-51.mtp") > summary(ex1.51) Length Class Mode control 26 -none- numeric seeded 26 -none- numeric > str(ex1.51) List of 2 $ control: num [1:26] 1203 830 372 346 321 ... $ seeded : num [1:26] 2746 1698 1656 978 703 ... > ex1.51 <- data.frame(ex1.51) > summary(ex1.51) control seeded Min. : 1.00 Min. : 4.10 1st Qu.: 24.82 1st Qu.: 98.12 Median : 44.20 Median : 221.60 Mean : 164.59 Mean : 441.98 3rd Qu.: 159.20 3rd Qu.: 406.02 Max. :1202.60 Max. :2745.60 > q() foreign/tests/spss.Rout.save0000644000175100001440000010575313636570102015701 0ustar hornikusers R Under development (unstable) (2020-03-24 r78051) -- "Unsuffered Consequences" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin19.3.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > > sample100 <- read.spss("sample100.sav",FALSE) > summary(sample100) Length Class Mode YEAR 100 -none- numeric DISTRICT 100 -none- numeric CAMPUS 100 -none- numeric DNAME 100 -none- character CNAME 100 -none- character SEX 100 -none- character DISADVG 100 -none- character ETHNICTY 100 -none- character STUID 100 -none- character TLIMTH 100 -none- numeric GRADE 100 -none- numeric > str(sample100) List of 11 $ YEAR : num [1:100] 99 94 94 95 96 97 98 99 94 95 ... $ DISTRICT: num [1:100] 57914 57914 57914 57914 57914 ... $ CAMPUS : num [1:100] 57914045 57914106 57914110 57914123 57914117 ... $ DNAME : chr [1:100] "MESQUITE ISD " "MESQUITE ISD " "MESQUITE ISD " "MESQUITE ISD " ... $ CNAME : chr [1:100] "A C NEW MIDDLE " "MCWHORTER EL " "RUTHERFORD EL " "JOEY M PIRRUNG " ... $ SEX : chr [1:100] "F" "F" " " "F" ... $ DISADVG : chr [1:100] "NO " "NO " " " "NO " ... $ ETHNICTY: chr [1:100] "WHITE " "WHITE " " " "HISPANIC" ... $ STUID : chr [1:100] "00614371S" "00614372S" "00614373S" "00614373S" ... $ TLIMTH : num [1:100] 90 86 67 77 77 79 86 87 89 85 ... $ GRADE : num [1:100] 8 3 3 4 5 6 7 8 3 4 ... - attr(*, "label.table")=List of 11 ..$ YEAR : NULL ..$ DISTRICT: NULL ..$ CAMPUS : NULL ..$ DNAME : NULL ..$ CNAME : NULL ..$ SEX : NULL ..$ DISADVG : NULL ..$ ETHNICTY: NULL ..$ STUID : NULL ..$ TLIMTH : NULL ..$ GRADE : NULL - attr(*, "variable.labels")= Named chr [1:11] "YEAR OF ADMINISTRATION" "COUNTY DISTRICT NUMBER" "COUNTY DISTRICT CAMPUS NUMBER" "DISTRICT NAME" ... ..- attr(*, "names")= chr [1:11] "YEAR" "DISTRICT" "CAMPUS" "DNAME" ... > d.sample100 <- data.frame(sample100,stringsAsFactors=TRUE) > summary(d.sample100) YEAR DISTRICT CAMPUS DNAME Min. : 94.0 Min. : 57905 Min. : 57905126 DALLAS ISD : 1 1st Qu.: 95.0 1st Qu.: 57914 1st Qu.: 57914046 HARMONY ISD : 1 Median : 96.0 Median : 57914 Median : 57914112 MESQUITE ISD :96 Mean : 115.4 Mean : 59644 Mean : 59644015 SUNNYVALE ISD : 2 3rd Qu.: 98.0 3rd Qu.: 57914 3rd Qu.: 57914125 Max. :2000.0 Max. :230905 Max. :230905101 CNAME SEX DISADVG ETHNICTY STUID J C AUSTIN EL :23 : 4 : 4 : 4 00614373S: 6 R S KIMBROUGH M:12 F:62 NO :90 HISPANIC: 3 00614378S: 6 WILKINSON MIDDL: 9 M:34 YES: 6 OTHER : 2 00614379S: 6 VERNON PRICE EL: 7 WHITE :91 00614389S: 6 TISINGER EL : 6 00614397S: 6 THOMPSON EL : 5 00614403S: 6 (Other) :38 (Other) :64 TLIMTH GRADE Min. :54.00 Min. :3.00 1st Qu.:74.00 1st Qu.:4.00 Median :84.00 Median :5.00 Mean :80.16 Mean :5.37 3rd Qu.:87.00 3rd Qu.:7.00 Max. :93.00 Max. :8.00 > s100 <- sample100 > sample100 <- read.spss("sample100.por",FALSE) > stopifnot(identical(s100, sample100)) # no need for further summary() etc > > pbc <- read.spss("pbc.sav",FALSE) > summary(pbc) Length Class Mode AGE 418 -none- numeric ALB 418 -none- numeric ALKPHOS 418 -none- numeric ASCITES 418 -none- numeric BILI 418 -none- numeric CHOL 418 -none- numeric EDEMA 418 -none- numeric EDTRT 418 -none- numeric HEPMEG 418 -none- numeric TIME 418 -none- numeric PLATELET 418 -none- numeric PROTIME 418 -none- numeric SEX 418 -none- numeric SGOT 418 -none- numeric SPIDERS 418 -none- numeric STAGE 418 -none- numeric STATUS 418 -none- numeric TRT 418 -none- numeric TRIG 418 -none- numeric COPPER 418 -none- numeric > str(pbc) List of 20 $ AGE : num [1:418] 58.8 56.4 70.1 54.7 38.1 ... $ ALB : num [1:418] 2.6 4.14 3.48 2.54 3.53 3.98 4.09 4 3.08 2.74 ... $ ALKPHOS : num [1:418] 1718 7395 516 6122 671 ... $ ASCITES : num [1:418] 1 0 0 0 0 0 0 0 0 1 ... $ BILI : num [1:418] 14.5 1.1 1.4 1.8 3.4 0.8 1 0.3 3.2 12.6 ... $ CHOL : num [1:418] 261 302 176 244 279 248 322 280 562 200 ... $ EDEMA : num [1:418] 1 0 1 1 0 0 0 0 0 1 ... $ EDTRT : num [1:418] 1 0 0.5 0.5 0 0 0 0 0 1 ... $ HEPMEG : num [1:418] 1 1 0 1 1 1 1 0 0 0 ... $ TIME : num [1:418] 400 4500 1012 1925 1504 ... $ PLATELET: num [1:418] 190 221 151 183 136 -9 204 373 251 302 ... $ PROTIME : num [1:418] 12.2 10.6 12 10.3 10.9 11 9.7 11 11 11.5 ... $ SEX : num [1:418] 1 1 0 1 1 1 1 1 1 1 ... $ SGOT : num [1:418] 137.9 113.5 96.1 60.6 113.2 ... $ SPIDERS : num [1:418] 1 1 0 1 1 0 0 0 1 1 ... $ STAGE : num [1:418] 4 3 4 4 3 3 3 3 2 4 ... $ STATUS : num [1:418] 1 0 1 1 0 1 0 1 1 1 ... $ TRT : num [1:418] 1 1 1 1 2 2 2 2 1 2 ... $ TRIG : num [1:418] 172 88 55 92 72 63 213 189 88 143 ... $ COPPER : num [1:418] 156 54 210 64 143 50 52 52 79 140 ... - attr(*, "label.table")=List of 20 ..$ AGE : NULL ..$ ALB : NULL ..$ ALKPHOS : NULL ..$ ASCITES : NULL ..$ BILI : NULL ..$ CHOL : NULL ..$ EDEMA : NULL ..$ EDTRT : NULL ..$ HEPMEG : NULL ..$ TIME : NULL ..$ PLATELET: NULL ..$ PROTIME : NULL ..$ SEX : NULL ..$ SGOT : NULL ..$ SPIDERS : NULL ..$ STAGE : NULL ..$ STATUS : NULL ..$ TRT : NULL ..$ TRIG : NULL ..$ COPPER : NULL > d.pbc <- data.frame(pbc) > summary(d.pbc) AGE ALB ALKPHOS ASCITES Min. :26.28 Min. :1.960 Min. : -9 Min. :-9.000 1st Qu.:42.83 1st Qu.:3.243 1st Qu.: -9 1st Qu.:-9.000 Median :51.00 Median :3.530 Median : 1009 Median : 0.000 Mean :50.74 Mean :3.497 Mean : 1478 Mean :-2.225 3rd Qu.:58.24 3rd Qu.:3.770 3rd Qu.: 1708 3rd Qu.: 0.000 Max. :78.44 Max. :4.640 Max. :13862 Max. : 1.000 BILI CHOL EDEMA EDTRT Min. : 0.300 Min. : -9.0 Min. :0.0000 Min. :0.0000 1st Qu.: 0.800 1st Qu.: -9.0 1st Qu.:0.0000 1st Qu.:0.0000 Median : 1.400 Median : 252.5 Median :0.0000 Median :0.0000 Mean : 3.221 Mean : 248.2 Mean :0.1196 Mean :0.1005 3rd Qu.: 3.400 3rd Qu.: 347.8 3rd Qu.:0.0000 3rd Qu.:0.0000 Max. :28.000 Max. :1775.0 Max. :1.0000 Max. :1.0000 HEPMEG TIME PLATELET PROTIME SEX Min. :-9.0 Min. : 41 Min. : -9.0 Min. : 9.00 Min. :-9.000 1st Qu.:-9.0 1st Qu.:1093 1st Qu.:181.0 1st Qu.:10.00 1st Qu.:-9.000 Median : 0.0 Median :1730 Median :248.0 Median :10.60 Median : 1.000 Mean :-1.9 Mean :1918 Mean :250.0 Mean :10.73 Mean :-1.622 3rd Qu.: 1.0 3rd Qu.:2614 3rd Qu.:315.5 3rd Qu.:11.10 3rd Qu.: 1.000 Max. : 1.0 Max. :4795 Max. :721.0 Max. :18.00 Max. : 1.000 SGOT SPIDERS STAGE STATUS Min. : -9.00 Min. :-9.000 Min. :-9.00000 Min. :0.0000 1st Qu.: -9.00 1st Qu.:-9.000 1st Qu.:-9.00000 1st Qu.:0.0000 Median : 90.45 Median : 0.000 Median : 3.00000 Median :0.0000 Mean : 89.20 Mean :-2.067 Mean :-0.01914 Mean :0.3852 3rd Qu.:135.75 3rd Qu.: 0.000 3rd Qu.: 4.00000 3rd Qu.:1.0000 Max. :457.25 Max. : 1.000 Max. : 4.00000 Max. :1.0000 TRT TRIG COPPER Min. :-9.000 Min. : -9.0 Min. : -9.00 1st Qu.:-9.000 1st Qu.: -9.0 1st Qu.: -9.00 Median : 1.000 Median : 85.0 Median : 50.50 Mean :-1.167 Mean : 81.2 Mean : 70.09 3rd Qu.: 2.000 3rd Qu.:127.8 3rd Qu.:100.75 Max. : 2.000 Max. :598.0 Max. :588.00 > pbco <- read.spss("pbcold.sav",FALSE) > stopifnot(identical(pbc, pbco)) > ## summary(pbco) > ## str(pbco) > ## d.pbco <- data.frame(pbco) > ## summary(d.pbco) > pbc. <- read.spss("pbc.por",FALSE) > summary(pbc.) Length Class Mode AGE 418 -none- numeric ALB 418 -none- numeric ALKPHOS 418 -none- numeric ASCITES 418 -none- numeric BILI 418 -none- numeric CHOL 418 -none- numeric EDEMA 418 -none- numeric EDTRT 418 -none- numeric HEPMEG 418 -none- numeric TIME 418 -none- numeric PLATELET 418 -none- numeric PROTIME 418 -none- numeric SEX 418 -none- numeric SGOT 418 -none- numeric SPIDERS 418 -none- numeric STAGE 418 -none- numeric STATUS 418 -none- numeric TRT 418 -none- numeric TRIG 418 -none- numeric COPPER 418 -none- numeric > str(pbc.) # has variable.labels List of 20 $ AGE : num [1:418] 58.8 56.4 70.1 54.7 38.1 ... $ ALB : num [1:418] 2.6 4.14 3.48 2.54 3.53 3.98 4.09 4 3.08 2.74 ... $ ALKPHOS : num [1:418] 1718 7395 516 6122 671 ... $ ASCITES : num [1:418] 1 0 0 0 0 0 0 0 0 1 ... $ BILI : num [1:418] 14.5 1.1 1.4 1.8 3.4 0.8 1 0.3 3.2 12.6 ... $ CHOL : num [1:418] 261 302 176 244 279 248 322 280 562 200 ... $ EDEMA : num [1:418] 1 0 1 1 0 0 0 0 0 1 ... $ EDTRT : num [1:418] 1 0 0.5 0.5 0 0 0 0 0 1 ... $ HEPMEG : num [1:418] 1 1 0 1 1 1 1 0 0 0 ... $ TIME : num [1:418] 400 4500 1012 1925 1504 ... $ PLATELET: num [1:418] 190 221 151 183 136 -9 204 373 251 302 ... $ PROTIME : num [1:418] 12.2 10.6 12 10.3 10.9 11 9.7 11 11 11.5 ... $ SEX : num [1:418] 1 1 0 1 1 1 1 1 1 1 ... $ SGOT : num [1:418] 137.9 113.5 96.1 60.6 113.2 ... $ SPIDERS : num [1:418] 1 1 0 1 1 0 0 0 1 1 ... $ STAGE : num [1:418] 4 3 4 4 3 3 3 3 2 4 ... $ STATUS : num [1:418] 1 0 1 1 0 1 0 1 1 1 ... $ TRT : num [1:418] 1 1 1 1 2 2 2 2 1 2 ... $ TRIG : num [1:418] 172 88 55 92 72 63 213 189 88 143 ... $ COPPER : num [1:418] 156 54 210 64 143 50 52 52 79 140 ... - attr(*, "label.table")=List of 20 ..$ AGE : NULL ..$ ALB : NULL ..$ ALKPHOS : NULL ..$ ASCITES : NULL ..$ BILI : NULL ..$ CHOL : NULL ..$ EDEMA : NULL ..$ EDTRT : NULL ..$ HEPMEG : NULL ..$ TIME : NULL ..$ PLATELET: NULL ..$ PROTIME : NULL ..$ SEX : NULL ..$ SGOT : NULL ..$ SPIDERS : NULL ..$ STAGE : NULL ..$ STATUS : NULL ..$ TRT : NULL ..$ TRIG : NULL ..$ COPPER : NULL - attr(*, "variable.labels")= Named chr [1:20] " " " " " " " " ... ..- attr(*, "names")= chr [1:20] "AGE" "ALB" "ALKPHOS" "ASCITES" ... > stopifnot(all.equal(d.pbc, data.frame(pbc.), tolerance = 1e-15)) > > electric.s <- read.spss(system.file("files", "electric.sav", package = "foreign"), TRUE, TRUE) > electric.p <- read.spss("electric.por",TRUE,TRUE) > electric.s4 <- read.spss(system.file("files", "electric.sav", package = "foreign"), TRUE, TRUE, max.value.labels = 4) > summary(electric.s) CASEID FIRSTCHD AGE DBP58 Min. : 1.00 NO CHD :120 Min. :40.0 Min. : 65.00 1st Qu.: 73.75 SUDDEN DEATH: 36 1st Qu.:45.0 1st Qu.: 80.00 Median : 144.50 NONFATALMI : 72 Median :48.0 Median : 87.00 Mean : 572.94 FATAL MI : 9 Mean :47.8 Mean : 88.79 3rd Qu.:1042.25 OTHER CHD : 3 3rd Qu.:51.0 3rd Qu.: 96.50 Max. :2098.00 Max. :54.0 Max. :160.00 NA's :1 EDUYR CHOL58 CGT58 HT58 Min. : 6.00 Min. :106.0 Min. : 0.00 Min. :60.90 1st Qu.: 9.75 1st Qu.:228.8 1st Qu.: 0.00 1st Qu.:66.50 Median :12.00 Median :261.0 Median :10.00 Median :68.15 Mean :11.66 Mean :264.1 Mean :11.58 Mean :68.51 3rd Qu.:14.00 3rd Qu.:293.2 3rd Qu.:20.00 3rd Qu.:70.20 Max. :18.00 Max. :515.0 Max. :60.00 Max. :77.00 NA's :28 NA's :1 WT58 DAYOFWK VITAL10 FAMHXCVR CHD Min. :123.0 SUNDAY : 19 ALIVE:179 NO :178 Min. :0.0 1st Qu.:156.0 TUESDAY : 19 DEAD : 61 YES: 62 1st Qu.:0.0 Median :171.0 WEDNSDAY: 17 Median :0.5 Mean :173.4 SATURDAY: 16 Mean :0.5 3rd Qu.:187.0 THURSDAY: 15 3rd Qu.:1.0 Max. :278.0 (Other) : 24 Max. :1.0 NA's :130 > ii <- c(2,10) > vl <- list(FIRSTCHD = c("OTHER CHD"= 6, "FATAL MI"= 5, "NONFATALMI"= 3, + "SUDDEN DEATH" = 2, "NO CHD" = 1), + DAYOFWK = c(SATURDAY=7, FRIDAY=6, THURSDAY=5, + WEDNSDAY=4, TUESDAY=3, MONDAY=2, SUNDAY=1)) > stopifnot(identical(electric.s, electric.p), + identical(electric.s[-ii], electric.s4[-ii]), + identical(vl, lapply(electric.s4[ii], attr, "value.labels")), + identical(lapply(vl, names), + lapply(electric.s[ii], function(.) rev(levels(.))))) > > > ## after "long label patch": > > invisible(Sys.setlocale (locale="C")) ## to resolve locale problem > ldat <- read.spss("spss_long.sav", to.data.frame=TRUE) > ldat variable1 variable2 1 1 1 2 2 1 3 2 3 > nnms <- nms <- names(ldat) > names(nnms) <- nms > stopifnot(identical(nms, c("variable1", "variable2")), + identical(nnms, attr(ldat, "variable.labels"))) > > > ## some new arkward testcases for problems found in foreign <= 0.8-68 and duplicated value labels in general: > > ## Expect lots of warnings as value labels (corresponding to R factor labels) are uncomplete, > ## and an unsupported long string variable is present in the data > > setwd(system.file("files", package = "foreign")) > sav <- "testdata.sav" > > x.nodat <- read.spss(file=sav, to.data.frame = FALSE, reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Undeclared level(s) -1 added in variable: factor_numeric 3: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Duplicated levels in factor factor_n_duplicated: A 4: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 5: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 6: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Undeclared level(s) .. added in variable: factor_s_duplicated 7: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Duplicated levels in factor factor_s_duplicated: A 8: In read.spss(file = sav, to.data.frame = FALSE, reencode = "UTF-8") : Undeclared level(s) perhaps added in variable: factor_s_undeclared > str(x.nodat) List of 17 $ numeric : num [1:5] 1 2 3 NA 3 $ numeric_long_label : num [1:5] 1 2 3.33 4 NA $ factor_numeric : Factor w/ 6 levels "-1","strongly disagree",..: 2 3 4 1 NA $ factor_n_long_value_label: Factor w/ 2 levels "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop",..: 1 2 NA 2 1 $ factor_n_coded_miss : Factor w/ 6 levels "strongly disagree",..: 1 2 6 5 NA $ factor_n_duplicated : Factor w/ 3 levels "A","A_duplicated_2",..: 1 1 2 NA 3 $ factor_n_undeclared : Factor w/ 5 levels "strongly disagree",..: 1 2 4 3 1 $ factor_n_undeclared2 : Factor w/ 4 levels "0","yes","no",..: 1 4 NA 1 4 $ string : chr [1:5] "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum s"| __truncated__ "One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrib"| __truncated__ " "| __truncated__ " "| __truncated__ ... $ string_500 : chr [1:5] "A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy "| __truncated__ " "| __truncated__ "Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind t"| __truncated__ " "| __truncated__ ... $ STRIN0 : chr [1:5] ", my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I s"| __truncated__ " "| __truncated__ "r place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of"| __truncated__ " "| __truncated__ ... $ string_miss : chr [1:5] "a " "c " "b " "g " ... $ factor_s_coded_miss : Factor w/ 3 levels "female","male",..: 2 1 NA 2 3 $ factor_s_duplicated : Factor w/ 4 levels "..","A","A_duplicated_b",..: 2 1 1 NA NA $ factor_s_undeclared : Factor w/ 3 levels "no","perhaps",..: 3 1 2 NA 3 $ factor_s_undeclared2 : Factor w/ 2 levels "no","yes": NA NA NA NA NA $ date : num [1:5] 1.27e+10 1.37e+10 1.37e+10 NA NA - attr(*, "label.table")=List of 17 ..$ numeric : NULL ..$ numeric_long_label : NULL ..$ factor_numeric : Named chr [1:5] "5" "4" "3" "2" ... .. ..- attr(*, "names")= chr [1:5] "strongly agree" "agree" "neither agree nor disagree" "disagree" ... ..$ factor_n_long_value_label: Named chr [1:2] "2" "1" .. ..- attr(*, "names")= chr [1:2] "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ! \" # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \\ ] ^ _ ` { | } ~ ..." "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop" ..$ factor_n_coded_miss : Named chr [1:6] "99" "5" "4" "3" ... .. ..- attr(*, "names")= chr [1:6] "no answer" "strongly agree" "agree" "neither agree nor disagree" ... ..$ factor_n_duplicated : Named chr [1:3] "3" "2" "1" .. ..- attr(*, "names")= chr [1:3] "B" "A" "A" ..$ factor_n_undeclared : Named chr [1:2] "5" "1" .. ..- attr(*, "names")= chr [1:2] "strongly agree" "strongly disagree" ..$ factor_n_undeclared2 : Named chr [1:2] "2" "1" .. ..- attr(*, "names")= chr [1:2] "no" "yes" ..$ string : NULL ..$ string_500 : NULL ..$ STRIN0 : NULL ..$ string_miss : NULL ..$ factor_s_coded_miss : Named chr [1:3] "u " "m " "f " .. ..- attr(*, "names")= chr [1:3] "unknown" "male" "female" ..$ factor_s_duplicated : Named chr [1:3] "c " "b " "a " .. ..- attr(*, "names")= chr [1:3] "C" "A" "A" ..$ factor_s_undeclared : Named chr [1:2] "y " "n " .. ..- attr(*, "names")= chr [1:2] "yes" "no" ..$ factor_s_undeclared2 : Named chr [1:2] "y " "n " .. ..- attr(*, "names")= chr [1:2] "yes" "no" ..$ date : NULL - attr(*, "variable.labels")= Named chr [1:17] "numeric variable" "numeric variable with long label: this variable hat five observations (one is missing). All values between 1 an"| __truncated__ "numeric factor with missing range" "numeric factor with long value labels" ... ..- attr(*, "names")= chr [1:17] "numeric" "numeric_long_label" "factor_numeric" "factor_n_long_value_label" ... - attr(*, "missings")=List of 17 ..$ numeric :List of 1 .. ..$ type: chr "none" ..$ numeric_long_label :List of 2 .. ..$ type : chr "range" .. ..$ value: num [1:2] 1 2 ..$ factor_numeric :List of 2 .. ..$ type : chr "range" .. ..$ value: num [1:2] -1 0 ..$ factor_n_long_value_label:List of 1 .. ..$ type: chr "none" ..$ factor_n_coded_miss :List of 2 .. ..$ type : chr "one" .. ..$ value: num 99 ..$ factor_n_duplicated :List of 1 .. ..$ type: chr "none" ..$ factor_n_undeclared :List of 1 .. ..$ type: chr "none" ..$ factor_n_undeclared2 :List of 1 .. ..$ type: chr "none" ..$ string :List of 1 .. ..$ type: chr "none" ..$ string_500 :List of 1 .. ..$ type: chr "none" ..$ STRIN0 :List of 1 .. ..$ type: chr "none" ..$ string_miss :List of 2 .. ..$ type : chr "two" .. ..$ value: chr [1:2] "a b " "b " ..$ factor_s_coded_miss :List of 2 .. ..$ type : chr "three" .. ..$ value: chr [1:3] "u v w \b" "v w \b" "w \b" ..$ factor_s_duplicated :List of 1 .. ..$ type: chr "none" ..$ factor_s_undeclared :List of 1 .. ..$ type: chr "none" ..$ factor_s_undeclared2 :List of 1 .. ..$ type: chr "none" ..$ date :List of 1 .. ..$ type: chr "none" - attr(*, "codepage")= int 65001 > > x.sort <- read.spss(file=sav, to.data.frame = TRUE, reencode="UTF-8", + stringsAsFactors=TRUE) re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Duplicated levels in factor factor_n_duplicated: A 3: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 4: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 5: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Undeclared level(s) .. added in variable: factor_s_duplicated 6: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Duplicated levels in factor factor_s_duplicated: A 7: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8", : Undeclared level(s) perhaps added in variable: factor_s_undeclared > str(x.sort) 'data.frame': 5 obs. of 17 variables: $ numeric : num 1 2 3 NA 3 $ numeric_long_label : num NA NA 3.33 4 NA $ factor_numeric : Factor w/ 5 levels "strongly disagree",..: 1 2 3 NA NA $ factor_n_long_value_label: Factor w/ 2 levels "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop",..: 1 2 NA 2 1 $ factor_n_coded_miss : Factor w/ 5 levels "strongly disagree",..: 1 2 NA 5 NA $ factor_n_duplicated : Factor w/ 3 levels "A","A_duplicated_2",..: 1 1 2 NA 3 $ factor_n_undeclared : Factor w/ 5 levels "strongly disagree",..: 1 2 4 3 1 $ factor_n_undeclared2 : Factor w/ 4 levels "0","yes","no",..: 1 4 NA 1 4 $ string : Factor w/ 4 levels " "| __truncated__,..: 3 4 1 1 2 $ string_500 : Factor w/ 4 levels " "| __truncated__,..: 2 1 3 1 4 $ STRIN0 : Factor w/ 4 levels " "| __truncated__,..: 2 1 4 1 3 $ string_miss : Factor w/ 4 levels " ","a ",..: 2 3 NA 4 1 $ factor_s_coded_miss : Factor w/ 3 levels "female","male",..: 2 1 NA 2 3 $ factor_s_duplicated : Factor w/ 4 levels "..","A","A_duplicated_b",..: 2 1 1 NA NA $ factor_s_undeclared : Factor w/ 3 levels "no","perhaps",..: 3 1 2 NA 3 $ factor_s_undeclared2 : Factor w/ 2 levels "no","yes": NA NA NA NA NA $ date : num 1.27e+10 1.37e+10 1.37e+10 NA NA - attr(*, "variable.labels")= Named chr [1:17] "numeric variable" "numeric variable with long label: this variable hat five observations (one is missing). All values between 1 an"| __truncated__ "numeric factor with missing range" "numeric factor with long value labels" ... ..- attr(*, "names")= chr [1:17] "numeric" "numeric_long_label" "factor_numeric" "factor_n_long_value_label" ... - attr(*, "codepage")= int 65001 > x.append <- read.spss(file=sav, to.data.frame = TRUE, + add.undeclared.levels = "append", reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Duplicated levels in factor factor_n_duplicated: A 3: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 4: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 5: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Undeclared level(s) .. added in variable: factor_s_duplicated 6: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Duplicated levels in factor factor_s_duplicated: A 7: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "append", : Undeclared level(s) perhaps added in variable: factor_s_undeclared > x.no <- read.spss(file=sav, to.data.frame = TRUE, + add.undeclared.levels = "no", reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "no", : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, add.undeclared.levels = "no", : Duplicated levels in factor factor_n_duplicated: A > > levels(x.sort$factor_n_undeclared) [1] "strongly disagree" "2" "3" [4] "4" "strongly agree" > levels(x.append$factor_n_undeclared) [1] "strongly disagree" "strongly agree" "2" [4] "3" "4" > str(x.no$factor_n_undeclared) num [1:5] 1 2 4 3 1 - attr(*, "value.labels")= Named chr [1:2] "5" "1" ..- attr(*, "names")= chr [1:2] "strongly agree" "strongly disagree" > > > ### Examples for duplicated.value.labels: > ## duplicated.value.labels = "append" (default) > x.append <- read.spss(file=sav, to.data.frame=TRUE, reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Duplicated levels in factor factor_n_duplicated: A 3: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 4: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 5: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Undeclared level(s) .. added in variable: factor_s_duplicated 6: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Duplicated levels in factor factor_s_duplicated: A 7: In read.spss(file = sav, to.data.frame = TRUE, reencode = "UTF-8") : Undeclared level(s) perhaps added in variable: factor_s_undeclared > ## duplicated.value.labels = "condense" > x.condense <- read.spss(file=sav, to.data.frame=TRUE, + duplicated.value.labels = "condense", reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Duplicated levels in factor factor_n_duplicated: A 3: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 4: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 5: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Undeclared level(s) .. added in variable: factor_s_duplicated 6: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Duplicated levels in factor factor_s_duplicated: A 7: In read.spss(file = sav, to.data.frame = TRUE, duplicated.value.labels = "condense", : Undeclared level(s) perhaps added in variable: factor_s_undeclared > > levels(x.append$factor_n_duplicated) [1] "A" "A_duplicated_2" "B" > levels(x.condense$factor_n_duplicated) [1] "A" "B" > > as.numeric(x.append$factor_n_duplicated) [1] 1 1 2 NA 3 > as.numeric(x.condense$factor_n_duplicated) [1] 1 1 1 NA 2 > > ### ToDo: > ## Long Strings (>255 chars) are imported in consecutive separate variables > ## (see warning about subtype 14) > ## we should get that right in the import function in future versions > x <- read.spss(file=sav, to.data.frame=TRUE, stringsAsFactors=FALSE, reencode="UTF-8") re-encoding from UTF-8 Warning messages: 1: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : testdata.sav: Very long string record(s) found (record type 7, subtype 14), each will be imported in consecutive separate variables 2: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Duplicated levels in factor factor_n_duplicated: A 3: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Undeclared level(s) 2, 3, 4 added in variable: factor_n_undeclared 4: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Undeclared level(s) 0, 3 added in variable: factor_n_undeclared2 5: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Undeclared level(s) .. added in variable: factor_s_duplicated 6: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Duplicated levels in factor factor_s_duplicated: A 7: In read.spss(file = sav, to.data.frame = TRUE, stringsAsFactors = FALSE, : Undeclared level(s) perhaps added in variable: factor_s_undeclared > > cat.long.string <- function(x, w=70) cat(paste(strwrap(x, width=w), "\n")) > > ## first part: x$string_500: > cat.long.string(x$string_500) A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so happy Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by thei abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi j > ## second part: x$STRIN0: > cat.long.string(x$STRIN0) , my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. r place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. kl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl > ## complete long string: > long.string <- apply(x[,c("string_500", "STRIN0")], 1, paste, collapse="") > cat.long.string(long.string) A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !".. $%& /() =?* '<> #|; ....~ @`.. ...... ...... {} abc def ghi jkl > > proc.time() user system elapsed 0.345 0.055 0.391 foreign/tests/sas.R0000644000175100001440000000174013324716024014000 0ustar hornikuserslibrary("foreign") (dd <- data.frame(name = c("apple", "banana", "carrot", NA), gender= c("male", "female", "male", "female"), stringsAsFactors = FALSE)) ## name gender ## 1 a male ## 2 b female ## 3 c male ## 4 female setwd(tempdir()) tfSi <- "temp_for_sas_import.txt" ti <- "temp_import.sas" write.foreign(dd, datafile = tfSi, codefile = ti, package = "SAS") file.show(tfSi) # the NA is shown as writeLines(sasCodes <- readLines(ti)) ## This failed in foreign <= 0.8-71 : stopifnot(identical(" name $ 6", grep(" name ", sasCodes, value=TRUE))) ## This site was unresponsive in Jan 2014 if(!nzchar(Sys.getenv("R_FOREIGN_FULL_TEST"))) q("no") tfile <- "int1982ag.zip" download.file("ftp://cusk.nmfs.noaa.gov/mrfss/intercept/ag/int1982ag.zip", tfile, quiet=TRUE, mode="wb") zip.file.extract("int1982ag.xpt", tfile) dfs <- read.xport("int1982ag.xpt") foo <- dfs$I3_19822 nrow(foo) stopifnot(nrow(foo) == 3650) foreign/tests/compressed.dta0000644000175100001440000011336613245463571015745 0ustar hornikusersq,*_(*],,,<,,$,00ZH0*m*k28 Apr 2004 08:08agealbalkphosascitesbilicholedemaxedemarxhepmegtimeplateeprotimesexsgotrsspidersstagecensrxgtrigrcopperidstfirstlatet0e %9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0g%9.0gentry timeG_dtat_ttimealbst_ttimetimeE_dtat_ttimealbst_t0t0st0G_dtat_ttimealbst_dcenscensE_dtat_ttimealbst_idididE_dtat_ttimealb_dtarLststBk@&ffDAh?AC33C 3Ba@zEf?.A)B =X6Ba@zEf?.A)B =X6B%,@^RD?33?A@B337BZ`@"\ENf?ff?A$Br\@BZ`@"\ENf?ff?A$Br\@Bk@aD'@YA.ffBLHBk@aD'@YA.ffBLHBt@~RDl?LA0B?2Bt@~RDl?L A0B?2B^#n@HDN?BA33Bq4B^#n@HDN?B(A33Bq4BT:*@EY>uA0A =4BT:*@EY> uA0A =4B*@EE@@L2A0C&fXO B*@EE@@L2 `A0C&fXO B@/\)DeAI?3.A8C@ BV @D?33A@BO. BV @D?33A@BO. Bl@aGD@fff0GAYBL_^ B6@vffD?333A)B3( B6@vffD?333 A)B3( B` @GD6?L?A0B+BJ@wF 3?L'A0Bk`BJ@wF 3?L'A0Bk`B!%@j=qD+@?333A,B3:B!%@j=qD+@?333XA,B3:BP@ID@,A(B뙚BW@333Dp@A6ff?AFffCFfLBF>@c D ?333?A0B{'BF>@c D ?333?A0B{'Bob@`D@33vLBAPBfB`@uDR?PA6ffB33S)B`@uDR? uPA6ffB33S)Ba#@hQD@YA9B7B_O@<(EfA33?A;33Cc =.B2@E@ffFAffC]H|B2@E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A<CDٚZYpBL@o\)Dt@ffv A1CfdgqBSN@D@L A;33BNrBSN@D@L C A;33BNrB*@{D?333/3A$B33QsB*@{D?333/ ^3A$B33QsBtH1@hQDƀ@@?AffBf~JtBtH1@hQDƀ@@? AffBf~JtBF'@G =E`@;bA0C*ouBCj@S33D[@`A#33C 3]CvBCj@S33D[@`A#33C 3]CvBY%@uDl?|2ABLrwB @~RD?@`EXA)C33xB @~RD?@`EXA)C33xBU@ED?ff?AS33B:1IyB]w@(D=?*A+33B33UzB]w@(D=?* A+33B33UzB7Hf@NRDE@33?hAPC3{BS(@yD*@?A,Beffk|BS(@yD*@? A,Beffk|B<@`D@?ff<A C@K}B<@`D@?ff< A C@K}BVeF@GD ? 8A1C%ٚD~B0j@\D? A B_ B0j@\D? A B_ B'@8DA {AIC3*B~t@wD|@?fffA33BeffB~t@wD|@?fff A33BeffB0@[EA33A8C%ٚaBxo@s33D@333RyAS33CffhJB"6F@uD?33AB33<B"6F@uD?33 AB33<BzF@|D@?KA!Cfc BzF@|D@?K A!Cfc B)Ws@jHD ?333BA+33B33i#B)Ws@jHD ?333B MA+33B33i#B+@dzDQ>A0By{B+@dzDQ> NA0By{B_@VffD̀?LABEB_@VffD̀?L ABEB{q@fffEY?XA!COB{q@fffEY? XA!COBL@{E@陚A(C3B; @S D?HA9BB; @S D?H:A9BBXM@HE?">A C:&BXM@HE?" >A C:&B<%,@qGDF?fffZPA)B8;B<%,@qGDF?fffZ PA)B8;B^@^RD4?lAffCٚXB^@^RD4?l sAffCٚXB8i*@fffD@9LA0CٚgVBQ&f@PEsA,?OA CFffBLP@uDV?3335A6ffB'ffj`BLP@uDV?3335 A6ffB'ffj`Bu?@xD??AffC-:Bu?@xD?? 7AffC-:B@WDE? ?A+33Beffr B@WDE? ? A+33Beffr A@PEo@ffJACFffBw7@r\D@@?AffB̙p"B @hQD?A Cٚ9B @hQD? KA Cٚ9B\*@AD4@?fff-AffB9B\*@AD4@?fff 6-AffB9B@@E@@33JSA.ffBff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A)XB@pAff UA)XB@@p?A!YB@@p? A!YB@s ??/A0ZBL@zH@YA[BL@zH@Y A[BP@H?fffAD\BP@H?fff AD\BX@tz?33A$]BX@tz?33 'A$]B@@33@ffA^B@YApA1_BT@{?JAff`BT@{? JAff`Bx@Y?ffA)aBx@Y?ff A)aBl@G?ff}AbB@p?A&ffcB@p? "A&ffcB@P@ ?A1dB@P@ ?PA1dBh@]p@@mA&ffeBh@]p@@ mA&ffeB@_\)?L:A$fB@_\)?L :A$fB8@8?LA(gB8@8?L A(gB@I?ff A&ffhB$@ @iA&ffiBD@B\AA33jBD@B\AA33jB0@`?AffkB0@`?AffkBl@Vff@,gA8lB|@e?fffA mB|@e?fffA mBt@@?ffA+33nB@_\)?AoB@_\)?AoBD@1GA\+A1pB(@@fA,qBH@W =AGA rBL@aG@陚? A1sB@c33?A$tB@c33?eA$tBx@R\?333AuBx@R\?3337AuBL@Fff?333A)vBL@Fff?333A)vBP@O\)?ٙCA(wB0@hQA$A#33xB@p@ AffyB@p@ AffyBp@g?ff?AffzB|@.R@S33?UA1{B@\@9A(|B@\@9A(|B$@j=q?ٙ\A0}B$@j=q?ٙk\A0}BL@%A`A9~B@@?L?LA,Bl@Y?ffA33Bl@Y?ffgA33B\@;?333A)B\@;?333cA)BX@Q?ٙABX@Q?ٙvABD@@AY?AffBD@@AY?uAffB @`?fffuA.ffB @`?fffuA.ffB@C ?333A B@C ?333-A B@I@@A B$@333?xA0B@A>XA.ffBP@=p?333??AffBd@Dz@?WPAAB@~R?331A0BH@^R??A#33B@i?0A#33Bx@_\)@陚_A.ffB(@4zAA&ffB0@U?A)B@L(@ffxA1BP@@?LA)B@U@ uA,B @fff@33DQA&ffBP@h?~TA)B8@+@A8BX@l(?iA,BL@JH?33?>A+33B,@nR?333+A,B@s ?0A,BL@dz?_A)B@e?IA,B @NR?3338A,B@=p?A.ffB@u?fffOA333Bd@ZH?AffBh@p?L A&ffBT@R\?333^A)foreign/tests/electric.por0000644000175100001440000002354613245463577015431 0ustar hornikusers@@@@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE 00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000 0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000 00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200201116/171 348112/SPSS for MS WINDOWS Release 10.0311/ SPSS/PC+4D/5B/ 70/6/CASEID5/4/0/5/4/0/CQ/CASE IDENTIFICATION NUMBER70/8/FIRSTCHD5/1/0/5/1/0/CF/ FIRST CHD EVENT70/3/AGE5/2/0/5/2/0/CC/AGE AT ENTRY70/5/DBP585/3/0/5/3/0/C11/AVER AGE DIAST BLOOD PRESSURE 5870/5/EDUYR5/2/0/5/2/0/CI/YEARS OF EDUCATION70/6/CHOL5 85/3/0/5/3/0/C13/SERUM CHOLESTEROL 58 -- MG PER DL70/5/CGT585/2/0/5/2/0/C12/NO O F CIGARETTES PER DAY IN 195870/4/HT585/5/1/5/5/1/C16/STATURE, 1958 -- TO NEAREST 0.1 INCH70/4/WT585/3/0/5/3/0/CO/BODY WEIGHT, 1958 -- LBS70/7/DAYOFWK5/1/0/5/1/0 /89/CC/DAY OF DEATH70/7/VITAL105/1/0/5/1/0/CJ/STATUS AT TEN YEARS71/8/FAMHXCVR1/ 1/0/1/1/0/CL/FAMILY HISTORY OF CHD70/3/CHD5/1/0/5/1/0/C15/INCIDENCE OF CORONARY HEART DISEASED1/8/FIRSTCHD5/1/6/NO CHD2/D/SUDDEN DEATH3/A/NONFATALMI5/A/FATAL MI6/B/OTHER CHDD1/7/DAYOFWK8/1/6/SUNDAY2/6/MONDAY3/7/TUESDAY4/8/WEDNSDAY5/8/T HURSDAY6/6/FRIDAY7/8/SATURDAY9/7/MISSINGD1/7/VITAL102/0/5/ALIVE1/4/DEADD1/8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,YH*m*k22 Apr 2004 11:07racenumber%9.0g%9.0grace?@@@@@@?@@@?@@@Crace $wP-,*r*q*_( whiteblackhispanicasianforeign/tests/writeForeignSPSS.R0000644000175100001440000000045113245463570016374 0ustar hornikuserslibrary(foreign) DF <- data.frame(X1 = 1:3, X2 = 4:6, X3 = paste0("str_", 1:3), stringsAsFactors = FALSE) write.foreign(DF, "datafile.dat", "codefile.sps", "SPSS") files <- c( "datafile.dat", "codefile.sps") for(f in files) tools::Rdiff(f, file.path("keep", f)) unlink(files) foreign/tests/S3.R0000644000175100001440000000031313245463571013502 0ustar hornikuserslibrary(foreign) read.S("mySobj") data.restore("dumpdata", print = TRUE) print(myobj) data.restore("tsdumpdata", print = TRUE, verbose = TRUE) sunspot utils::str(carbon.dioxide) carbon.dioxide[1:60] q() foreign/tests/xport.R0000644000175100001440000000037513521004715014365 0ustar hornikuserslibrary(foreign) lookup.xport("Alfalfa.xpt") Alfalfa <- read.xport("Alfalfa.xpt", stringsAsFactors = TRUE) summary(Alfalfa) ## test data provided by FRohde@birchdavis.com lookup.xport("test.xpt") testdata <- read.xport("test.xpt") summary(testdata) q() foreign/tests/spss_long.sav0000644000175100001440000000076113245463570015622 0ustar hornikusers$FL2@(#) SPSS DATA FILE Macintosh 16.0.1 @Y15 Jul 0822:23:01 VARIABLE variable1 V2_A variable2 N  !VARIABLE=variable1 V2_A=variable2eefefgforeign/tests/mval_bug.Rout.save0000644000175100001440000001304313245463570016501 0ustar hornikusers R Under development (unstable) (2017-11-28 r73785) -- "Unsuffered Consequences" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin17.2.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > > mydata <- suppressMessages(read.spss("mval_bug.sav", use.value.labels = TRUE, + to.data.frame = TRUE, use.missings = TRUE)) > > levels(mydata$Q1_MISSING_NONE) [1] "(-3) Missing" "(-2) Don't know" [3] "(-1) Refused" "(1) Approve STRONGLY" [5] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [7] "(4) Disapprove STRONGLY" "(99) Coding error" > table(mydata$Q1_MISSING_NONE) (-3) Missing (-2) Don't know (-1) Refused 17 8 5 (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_1) [1] "(-3) Missing" "(-2) Don't know" [3] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [5] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [7] "(99) Coding error" > table(mydata$Q1_MISSING_1) (-3) Missing (-2) Don't know (1) Approve STRONGLY 17 8 142 (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY 104 71 250 (99) Coding error 3 > > levels(mydata$Q1_MISSING_2) [1] "(-3) Missing" "(1) Approve STRONGLY" [3] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [5] "(4) Disapprove STRONGLY" "(99) Coding error" > table(mydata$Q1_MISSING_2) (-3) Missing (1) Approve STRONGLY (2) Approve SOMEWHAT 17 142 104 (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY (99) Coding error 71 250 3 > > levels(mydata$Q1_MISSING_3) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_3) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_RANGE) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_RANGE) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_LOW) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_LOW) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_HIGH) [1] "(-1) Coding error" "(1) Approve STRONGLY" [3] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [5] "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_HIGH) (-1) Coding error (1) Approve STRONGLY (2) Approve SOMEWHAT 3 142 104 (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY 71 250 > > levels(mydata$Q1_MISSING_RANGE_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_RANGE_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > levels(mydata$Q1_MISSING_LOW_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_LOW_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > levels(mydata$Q1_MISSING_HIGH_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_HIGH_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > proc.time() user system elapsed 0.178 0.035 0.196 foreign/tests/octave.dat0000644000175100001440000000264613245463577015066 0ustar hornikusers# Created by Octave 2.1.60, Mon Dec 27 12:13:21 2004 CET # name: a_string # type: string # elements: 2 # length: 3 foo # length: 3 bar # name: a_bool # type: bool 0 # name: a_struct # type: struct # length: 3 # name: a # type: scalar 1 # name: b # type: matrix # rows: 2 # columns: 2 1 2 3 4 # name: c # type: string # elements: 1 # length: 3 foo # name: a_cell # type: cell # rows: 2 # columns: 2 # name: # type: scalar 1 # name: # type: string # elements: 1 # length: 3 foo # name: # type: matrix # rows: 2 # columns: 2 1 2 3 4 # name: # type: string # elements: 1 # length: 3 bar # name: a_complex_scalar # type: complex scalar (0,1) # name: a_list # type: list # length: 3 # name: _0 # type: scalar 1 # name: _1 # type: matrix # rows: 2 # columns: 2 1 2 3 4 # name: _2 # type: string # elements: 1 # length: 3 foo # name: a_complex_matrix # type: complex matrix # rows: 2 # columns: 2 (1,2) (3,-4) (5,0) (-6,0) # name: a_range # type: range # base, limit, increment 1 5 1 # name: a_scalar # type: scalar 1 # name: a_complex_3_d_array # type: complex matrix # ndims: 3 2 2 2 (1,1) (3,1) (2,1) (4,1) (5,-1) (7,-1) (6,-1) (8,-1) # name: a_3_d_array # type: matrix # ndims: 3 2 2 2 1 3 2 4 5 7 6 8 # name: a_matrix # type: matrix # rows: 2 # columns: 2 1 2 3 4 # name: a_bool_matrix # type: bool matrix # rows: 2 # columns: 2 1 0 0 1 foreign/tests/xport.Rout.save0000644000175100001440000000472313521004715016053 0ustar hornikusers R Under development (unstable) (2019-07-31 r76909) -- "Unsuffered Consequences" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > lookup.xport("Alfalfa.xpt") $SPEC $SPEC$headpad [1] 1360 $SPEC$type [1] "character" "numeric" "numeric" "numeric" "numeric" "numeric" $SPEC$width [1] 8 8 8 8 8 8 $SPEC$index [1] 1 2 3 4 5 6 $SPEC$position [1] 0 8 16 24 32 40 $SPEC$name [1] "POP" "SAMPLE" "REP" "SEEDWT" "HARV1" "HARV2" $SPEC$label [1] "" "" "" "" "" "" $SPEC$format [1] "" "" "" "" "" "" $SPEC$sexptype [1] 16 14 14 14 14 14 $SPEC$tailpad [1] 0 $SPEC$length [1] 40 > Alfalfa <- read.xport("Alfalfa.xpt", stringsAsFactors = TRUE) > summary(Alfalfa) POP SAMPLE REP SEEDWT HARV1 MAX:20 Min. :0.0 Min. :1.00 Min. :35.00 Min. :120.6 min:20 1st Qu.:2.0 1st Qu.:1.75 1st Qu.:47.75 1st Qu.:148.3 Median :4.5 Median :2.50 Median :59.00 Median :165.8 Mean :4.5 Mean :2.50 Mean :56.08 Mean :163.0 3rd Qu.:7.0 3rd Qu.:3.25 3rd Qu.:62.25 3rd Qu.:176.4 Max. :9.0 Max. :4.00 Max. :75.00 Max. :193.4 HARV2 Min. :129.1 1st Qu.:150.6 Median :163.2 Mean :167.1 3rd Qu.:179.6 Max. :235.3 > ## test data provided by FRohde@birchdavis.com > lookup.xport("test.xpt") $TEST $TEST$headpad [1] 800 $TEST$type [1] "numeric" "numeric" $TEST$width [1] 8 8 $TEST$index [1] 1 2 $TEST$position [1] 0 8 $TEST$name [1] "I" "K" $TEST$label [1] "" "" $TEST$format [1] "" "" $TEST$sexptype [1] 14 14 $TEST$tailpad [1] 48 $TEST$length [1] 12 > testdata <- read.xport("test.xpt") > summary(testdata) I K Min. :1.00 Min. :1 1st Qu.:1.75 1st Qu.:1 Median :2.50 Median :2 Mean :2.50 Mean :2 3rd Qu.:3.25 3rd Qu.:3 Max. :4.00 Max. :3 > q() > proc.time() user system elapsed 0.107 0.024 0.121 foreign/tests/writeForeignSPSS.Rout.save0000644000175100001440000000203213245463571020057 0ustar hornikusers R Under development (unstable) (2013-12-04 r64388) -- "Unsuffered Consequences" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.0.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > > DF <- data.frame(X1 = 1:3, X2 = 4:6, X3 = paste0("str_", 1:3), + stringsAsFactors = FALSE) > > write.foreign(DF, "datafile.dat", "codefile.sps", "SPSS") > > files <- c( "datafile.dat", "codefile.sps") > for(f in files) tools::Rdiff(f, file.path("keep", f)) > unlink(files) > > proc.time() user system elapsed 0.223 0.031 0.239 foreign/tests/pbc.por0000644000175100001440000006635013245463572014376 0ustar hornikusers@@@@@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE 00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000 0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000 00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200012126/130 234112/SPSS for MS WINDOWS Release 10.04K/5B/70/3/AGE5/7/2/5/7/2/C1/ 70/3/ALB5/4 /2/5/4/2/C1/ 70/7/ALKPHOS5/7/2/5/7/2/C1/ 70/7/ASCITES5/1/0/5/1/0/C1/ 70/4/BILI5/ 4/2/5/4/2/C1/ 70/4/CHOL5/4/2/5/4/2/C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.L/-9/0/0/-9/12T/AC/A.O/-9/-9/-9/-9/0/-9/-9/-9/27/2.SO/-9/-9/1.6/-9/0 /0/-9/ML/5O/A.R/-9/-9/-9/-9/1/-9/-9/-9/19/3.OR/-9/-9/.R/-9/0/0/-9/16N/60/B.6/-9/ -9/-9/-9/0/-9/-9/-9/1R/3.CI/-9/-9/1.I/-9/0/0/-9/155/4N/9.R/-9/-9/-9/-9/0/-9/-9/- 9/1S/3.MF/-9/-9/.O/-9/0/0/-9/N1/8T/A.C/-9/-9/-9/-9/0/-9/-9/-9/1N/3.8L/-9/-9/.L/- 9/0/0/-9/12G/BK/A.I/-9/-9/-9/-9/0/-9/-9/-9/ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ foreign/tests/testEmpty.xpt0000644000175100001440000000632013245463570015630 0ustar hornikusersHEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 7.00 R 3.0.1 14JUN13:16:14:0914JUN13:16:14:09 HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*******DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS IRIS1 SASDATA 7.00 R 3.0.1 14JUN13:16:14:0914JUN13:16:14:09 HEADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000500000000000000000000 SEPAL_LE SEPAL_WI PETAL_LE PETAL_WI SPECIES HEADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 AQA8Affffff@3333334setosa ANfffffhA0Affffff@3333334setosa HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*******DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS EMPTY SASDATA 7.00 R 3.0.1 14JUN13:16:14:0914JUN13:16:14:09 HEADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000000000000000000000000 HEADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*******DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS IRIS2 SASDATA 7.00 R 3.0.1 14JUN13:16:14:0914JUN13:16:14:09 HEADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000500000000000000000000 SEPAL_LE SEPAL_WI PETAL_LE PETAL_WI SPECIES HEADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 AK333334A3333334A@3333334setosa AIA1A@3333334setosa foreign/tests/stata7se.dta0000644000175100001440000000113313245463571015320 0ustar hornikusersoUi\6Xjܙ]P:X?!GX%)\Gn 1 Nov 2002 12:23racenumber%9.0g%9.0grace ?@@@@@@?@@@?@@@Crace?qq  whiteblackhispanicasianforeign/tests/mySobj0000644000175100001440000000044513245463577014274 0ustar hornikusersS data.Datarow.namesclassN factorintsfloats.Data.Labelclass abcdeffactor?333333??123 data.frameforeign/tests/pbc.sav0000644000175100001440000010464013245463571014361 0ustar hornikusers$FL2@(#) SPSS DATA FILE MS Windows Release 10.0.5 spssio32.dll Y@12 Dec 0013:01:30 AGE ALB ALKPHOS ASCITES BILI CHOL EDEMA EDTRT HEPMEG TIME PLATELETPROTIME SEX SGOT SPIDERS STAGE STATUS TRT TRIG COPPER   <eeesaM@@ؚ@-@Pp@eeehy@g@ffffff(@fffff>a@eede@c@7[ 9L@(\@@dde?r@@k@333333%@eegdezGa\@de"lxzQ@ףp= @ @ffffff?f@?dpddh@fffffX@eed@j@t^K@RQ@@ee?n@?@f@$@eeheeq= ףPN@dddH} C@= ףp= @@333333 @pq@eeeg@%@I\@dfdjqP@ףp= @@dde[o?o@@edgefdedd8mK@\(\@@ t@eedg@i@ffffff#@9N@dfhdj@48EJ@33333+@dddo333333?q@D@Pw@edgefzGa<@g@dddAE@p= ף@ȡ@ @@doeef@`o@b@eeeAfգQ@Q@@eed333333)@i@r@'@eehefhb@dddN@aJ@p= ף@@@ffffff?0p@epeehd@ p@33333S@efduM@)\( @x@ddd @m@s@333333+@eehefšT@ddd~:F@@t@ffffff?q@dedg@n@333333%@fffffV@dfe\ AcL@)\(@@[eeeo?@c@ddhef[ddd|гY)P@(\@ffff@?l@doedg@pr@= ףp_@eede@T㥛8D@HzG @h@dddffffff?i@@h@%@edgdffffff6R@ddd yJ@333333 @@@ q@eedh@l@%@33333s]@efdc@^)J@ffffff@@eee&@@f@q@(@eeheëq@i@`@ddH@{Gz @d@ffffff?`m@?eoedg@ j@deߋd5^I M@Gz @@ddeqffffff@`w@0@ t@edhef̜^@ddd P@p= ף@X@333333?o@edeh@u@&@fffffFP@dfdZd#L@ ףp= @@ddd333333 @p@@e@333333'@eehee9^@}@eeeK@Q@̰@ffffff1@x@eeehp@j@ffffff'@zGal@efhdg@p@BF@W@dde@|@ޯ@#@ddfee\(k@l@ddd^F@ffffff@@ffffff?r@dedf@@t@&@̼Z@dfd&J@q= ףp @8@dde@@@Pz@#@eegef33333d@d@eecZB>8K@{Gz @@5@e@?epeeh ףp=zY@efee@k@[ AyF@ףp= @ܞ@eeeq3333331@k@(@eehef33333g@`h@ j@ddd~:O@= ףp=@ɶ@ffffff? w@dedf@`x@333333%@RaR@df|doTD@RQ@m@ddeo @@p@t@eehefq= ףP^@c@e@ddd' D@Q @f@@r@eedf@`h@$@i@efd yJ@Q @m@dde?`p@@q@333333%@edhdfɤp= ףT@c@ddd#J{/I@Q @@?@j@dpedgĨ@f@Qk@efնd3J@ @@ddd?v@@q@%@edfdePe@ddda4OH@ @fffff@333333?s@dedg>@z@333333%@(\R@efd i@;Nё4L@Q @p@ddd333333?e@6@ps@333333%@edfdfv33333Q@eeeH.!N@Gz@33333@ffffff@t@epedhk@33333f@eedK7APB@= ףp= @H@ddeoffffff @w@X@@m@eeheffffff>a@gddd3K@fffff@ffffff?q@eedh@@333333%@(\R@eeӘd1UG@Q @L@[dddo?s@`v@edhde[͏(\Z@d[ddK7@@Gz @@333333@eedh@@l@ffffff'@b@ee[dC@@RQ @%@[ddeo@e@u@eehdf[zGaL@dddooH@Q @333336@?v@dedf̱@`i@333333%@QP@ded(\B@ffffff @@eeeffffff @r@Ȫ@h@ffffff'@eegeffffff]@d[ddZڊD@q= ףp@@333333?dedfr@}@%@33333Q@df[wd?F@Q@@dde@ ~@@0@ffffff)@edgeeHza@d@ d@dddI&¶G@333333 @К@?s@dedg @@v@#@qg@dfdhoH@ @fffffN@dddoffffff?0p@K@j@ddgdf{Gg@@f@q@d[ddOeN@(\@0@?eoedh @ m@iX@ef[dp_J@zG @@dde?p@L@333333%@edhee̼Z@dddz6 J@ @@?@q@dedf@q@333333%@QX@efd>yX5EI@ @fffffܳ@jddd0@@v@333333%@ddeeei@c@d[ddRI&P@@333338@@eoedh@@j@zGaL@ee[e QC@333333 @33333o@eeeo?r@h@o@eeheeRaR@`p@dddDpP@Q@@?z@doddg@@j@QS@eed`k@,Ԛ@@ffffff@33333@dde? @ܜ@v@333333%@eefef= ףpW@s@dex&J@q= ףp @@ffffff@@p@?eedg@k@(@RqZ@eedl@7A`HF@RQ@@ddd[ffffff?@n@k@333333%@ddedeڭzGaL@ddd h"lx2D@ @ƽ@?t@eeeg`@t@333333%@{G_@eed+e0M@333333 @`@ddd?@ @l@$@edgde33333Q@ddd%uE@Q@Ȃ@333333?k@dqdde@`j@9N@dfeg@|PkZN@@̗@ddd?r@$@t@ffffff*@edhefԞ33333E@dee h"lPG@(\@@6@ @deeg؊@d@333333'@̜n@efd<,tO@ @@ddeo@Pw@<@@f@edgef33333b@g@dddD@ @@333333?p@dnede0@z@a@deЮdH.9G@ @ԝ@ddeoffffff?z@_@ddgeef@`e@dddZӼI@HzG@@? }@dnedg@Pp@t@efd g@QIN@@\(\@@dddffffff?e@@`i@333333%@edgde33333Q@dxdAc]H@Gz @@`@?eeegH@`l@(@fffffj@eedg@c@ ^)3L@(\@Є@[ddd333333?@p@333333%@edfde[x K@ddd?5^IlH@(\ @2@333333? p@eedhd@y@'@9^@dfd?@@RQ @l@dddn?t@X@ l@edgdf̜^@dddsA?C@ @pz@ffffff?doede^@p@H@dfudKY8I@Q@8@ddeo @p@@`q@eeheeyV@Ps@q@ee_QE@= ףp=@<@1@@?eeeh@p@'@f@eed@i@q= ףI@p= ף@@eeffffff(@x@?d@333333'@eehee`c@`n@deH@HzG @l@ffffff@n@?eeeg`t@333333(@Pe@efdh@HPG@)\(@@dde333333@@{@h@m@333333%@edhee̯Pe@dddBG@(\@@?s@eedg@z@%@Pe@deqdd`TP@(\ @\@dde@n@Ћ@v@ffffff&@ddhefffffff@p@ddd}?5^O@333333 @@,@|@eeehأ@x@ffffff'@9N@eeds@VP@\(\@@ddd@}@@y@333333&@edgee33333s]@q@@c@deDL@ @ȑ@?@o@?eedh@)@33333Q@deȔd58EGK@Gz@@ddd?pp@@f@ffffff&@edgdffffff>a@dddƛG@ףp= @@@`p@eedh<@ l@'@yV@efdN@aJ@Gz @@idde@@f@%@eegeeT@e@ddd2U0*B@@@?u@dedgh@{@ffffff%@Qk@eedQ|aD@= ףp=@ @edp333333?r@?(@{@edgdffffff&T@dfddT㥛8J@333333 @@y@eedf4@i@&@33333[@eeƖdZӼ@@zG@@dddo?@@u@ddfeeb@`c@diehsF@(\ @8@Pt@?eeeh|@z@'@fffffn@efeea-S@ ףp= @h@eedffffff?i@@x@ffffff(@edhee33333U@dddΪVDB@\(\ @ܟ@?v@dedf@w@333333&@m@dedZd;OJ@zG@@dde @ i@p@g@'@eeheec@@f@e[ee1G@Q@x@ffffff1@eeefy@ffffff'@fffff]@ef[df@?5^IlH@ @@e[ddd@ u@$@edgde[X@dfea2U0*Q@Gz @@@z@?eddg@u@&@`S@efdQ|a<@)\(@T@edddm@ޭ@s@ffffff$@ededeɱiX@ddd]C;H@ @@?|@dddfح@e@ffffff$@ [@dfgdJI@P@ddepffffff@@f@@@ddhefHf@dddyF@ @d@?y@dedg@pt@$@d@dfdd@7A`HL@(\@0@ddd?o@6@333333$@ededee@eeeޓZ{H@\(\ @@@g@eeeh333333&@fffff]@efʝd|a2U0E@Q @x@ddd?r@@u@333333&@edfeex`@ddd[ӼA@@@?}@eedg(@u@$@b@dfʊeǘ Q@333333@@[dde@,@333333%@edfee[fffffY@dddBO@Q@@@333333?j@dedex@s@1@33333Q@dfnd/n-I@ @@ddd?.@t@$@edfeerH@dddMbF@zG @ @?dedg@p@333333%@33333[@dfd?ܵtC@RQ @p@ddeffffff?`~@r@%@eegeeѮ [@dddOeD@Q@Ȣ@@@dedg\@0}@ffffff%@e@dedQkwK@\(\ @@fddep@@'@eehef33333h@dddvq I@Q @@@`w@eeeh@p@333333&@`@eed*iJ@333333@@@ddd @0p@@p@ffffff'@ddgef33333[@j@ddd*QE@(\@@ffffff?r@deeg@0s@$@fffff[@dfdc@/$N@ ףp= @И@ged|@?@`{@#@eegde̼Z@w@dddJH@zG@@@@eoeeh@ v@Pe@eed!lVmH@ffffff @p@dde @`x@@i@ffffff$@edgeefffff>a@dddT㥛 K@p= ף@@333333?@deeg@ s@#@iX@eedAc]A@ףp= @@ddd @Pt@ğ@u@333333%@ddgdefffffF`@@j@{@eee/L P@p= ף@`@?eddhg@j@ffffff*@@G@efd+ηK@Q@@ddd333333?r@©@p@ffffff%@edgdefffffFP@d[ee镲 F@ףp= @@ffffff@eqeehX@yf@ee[vdeqJ@333333@H@dde333333?`o@@f@%@ddhde}̬L@dddH}8G@Gz @(@?s@enedhH@m@hb@dfeTJ@(\@@dde333333?p@@d@333333&@eehee[33333d@dddZd;O F@RQ@X@?p@dnedfn@P|@33333U@dfmd D@Q@@[dde3333330@4@333333)@eehee[fffffr@ddd;OO@(\@@?@z@e[edgN@ffffff#@̬L@dedm@[ӼF@q= ףp @"@ddeffffff1@@@ z@'@eegef33333d@i@dddq -O@ffffff@0@ffffff@@n@eeeh@ffffff*@ a@ef̮dX9FD@p= ף@p@dddffffff?|@@f@#@edgdefffff_@e@ddd:pΈRO@@@?t@dddhإ@d@333333$@`@efqd c*E@\(\ @$@dddffffff?@@z@ffffff%@edfdf͇fffff_@dddΈ{E@(\ @ @?pp@doedf@{@R@dedHPK@ @@ddd?pp@4@i@#@edfde]@dddJY8nO@ @ @?x@dedf\@u@333333$@`c@dedc@9EGrI@q= ףp@@dde333333@z@D@o@%@ddgeefffff6b@@k@`p@dddaG@{Gz @@?t@eedht@333333'@33333W@dfdc@ı.n K@\(\@@dden? r@@s@edgde@g@ddd"lxzG@)\(@Ј@?u@dedfԧ@u@333333%@33333c_@dedw-!K@ףp= @@eddev@@q@#@edfefx33333`@dddL F% G@ @P@333333@t@eoedh@Pq@33333`@ef˺d$J@Gz @p@den`@?x@t@edgefh@`e@c@dddlI@Q@Њ@ffffff?Ps@deeg@@o@&@D@dfd-@@Q@@[dd333333??n@m@"@edgdf[33333e@de( R@(\ @@333333?r@?dedff@j@ffffff%@̬L@deքdH.!>@Gz @@dde@@L@t@#@edgefh@q@n@dgeN@RQ@@p@?edehЇ@#@33333Y@eed r@uV~A@ ףp= @@e[dddn@ m@eeedf[33333`@ddd|гYK@= ףp=@@?|@dedfl@r@"@PU@dede@~:|Q@Gz@ȡ@ddeffffff@P@@0u@%@ddgee̬\@`n@ddd٬\H@@P|@? k@dede^@p@333333&@ K@ded h"XQ@{Gz@@eed333333@e@333333,@degee9^@ l@ddZd;E@ @P@333333?k@?eeehԤ@ps@ffffff&@fffff.c@dfd:MM@)\( @H@dde9@`v@@'@edfef0i@i@`k@dddN@aH@\(\ @0@333333?q@dnedf&@p~@`S@dfdi@?B@(\ @@ddd333333 @ |@V@s@ffffff&@edfdeڄ]@dddoTF@Gz @P@@s@dddg@i@333333$@fffffF`@efd k@+ݓL@(\ @y@ddd333333? k@@l@%@edgdfqR@dddSt$_E@{Gz @ @ffffff@`@dedfڥ@p@333333#@9^@dfhdf@F%uhM@Q @x@ddep @@p@@g@d@eehefɿfffff_@ddd>W[J@RQ@p@333333? m@dedg@`v@#@P@eexd:E@Q @P@[de!@?p@*@eehef[33333f@ d@dhddI +J@ @@h@eddhԐ@j@&@`@eedŏ1wD@Gz @@dde@ @B@j@#@edfdfи|@ddd{/LzN@zG@@?w@eddhH@m@$@T@eed@c@i@!uG@ffffff@P@dde[?p@2@ffffff"@edfdfҐiX@ddd;pΈҾA@zG@@?y@dedg@pr@333333$@33333a@efd0*TH@zG @@dddm333333?`x@@pp@edgdefffffV@d[dd/$UJ@Gz@@?dedg@v@333333$@R@de[d(\H@Q @@ddd?i@@ k@#@eegdfV@dgddׁsF>@\(\ @@m@eeef¤@~@#@yV@ded -K@@@[ddd?@ps@ffffff#@edede[33333S@ddd=UJ@ffffff@p@?q@dedg@@u@333333$@ [@dfde@c@K4D@{Gz @@[dde @P@333333$@eehee[pa@dddZB>K@ ףp= @x@? p@dedfb@Pq@$@33333E@dfdxz,CQ@RQ@Ȅ@[ddd333333?(@Pt@ffffff$@edhde[R@dddq= ףE@p= ף@Ƞ@?x@eedh@`q@#@33333Y@dfdm4HE@Q@t@ddd@}@@e@$@edgdf̤m@ddd7A`HF@p= ף @P@ffffff?o@eeeh@$@R@deΣdxL@Q @@[dde333333?@؀@#@edfde[Y:@ d@dddEJ!D@ףp= @@? i@dedf@{@333333$@ K@dfdhsB@ffffff @آ@odde@p@p}@#@edgefd@`v@ddd cZB.H@RQ @@?p@dedg@h@%@R@deŽdݓQ@= ףp= @(@fdd l@?@i@ffffff)@eegeepQ@drdd٬\A@q= ףp @l@@@eedg@p@'@fffff.c@efd`o@V/OO@ףp= @p@ddeoffffff?`g@8@d@edhdeƍ9^@ddd{GRI@ ףp= @P@?v@eedg0@p@#@iX@dfdd@~jtCK@q= ףp@@[dddffffff@@pt@ffffff$@eefde[|`@edd8dXJ@ @8@8@@eeehk@x@ffffff.@hb@efd{@ m@<,\J@Q @@dde?@s@@u@#@edhdeɧ33333I@ddd<,bL@Q @@%@ @dedh@w@$@fffff&d@efdc@p@A`2F@333333@x@ddd?Pr@"@u@333333"@edfde33333c_@dddu=@333333@@ @u@eedh4@'@̴k@deda+L@zG @P@ddeffffff?@l@v@333333'@eehdeqfffff6R@dddK7APF@(\@0@333333?p@dedfz@ i@333333$@33333Y@de}dK4A@333333@p@dddffffff?q@j@w@333333#@eefdfa@dddݵ|[D@q= ףp @̕@@x@dedg@t@ffffff$@fffffg@ded@h@@@ffffff @@ddd@m@@t@#@eegdffffff>a@ddd@aӋD@ @x@333333?`m@eedh@l@%@̼Z@df~dRN@ffffff@P@dddn?k@@@edfdesfffff&T@ddd48EB@)\(@@?eedfZ@d@#@YJ@dfd`l@JO@Q @@dddffffff?o@T@q@ffffff$@edgef{`S@edd"uq}H@ffffff @@@w@dedgB@$@fffffm@ee[d\mN@HzG@@dddo333333?j@@n@ededep̬L@d[evOj1R@p= ף @@333333??dedh@0p@333333$@PU@de[rd(\¥N@ @@dden333333@x@@@c@edheefffff.c@dddOJ@ ףp= @@ffffff?o@eeefP@Ps@#@fffff6R@dfodR'H@(\ @(@dden?u@`@r@ddfdf̜^@d[dd0' uJ@Gz@@?dedg&@$@0Y@df[d}?5^G@ףp= @Ȑ@ddd333333?m@@k@#@edgdfo0Y@ddd'1I@333333 @@?y@deeg@@v@ffffff$@fffffX@demd|?5VQ@q= ףp @(@dde?@y@@m@#@edgef33333S@l@dddvD@@В@@@dedg@k@ffffff%@ai@efdc@QM@q= ףp @@[ddd?@$@edgde[xfffffK@dddy) B@{Gz @@&@@eedh@r@%@b@efd@j@NbX9LA@Q@@[ddd?@pz@333333$@edede[P@ddd9#J[E@Gz@@@?j@dedgڠ@f@333333#@33333`@dfd{O@(\ @8@dddffffff@z@L@l@333333%@eefeeĚYj@dddF%uPL@333333 @@?v@eedh@p@ffffff#@33333W@dfd@c@6;N!G@ ףp= @ @dde@@w@@n@(@edgefd@`l@eeevN@q= ףp@@333333,@|@eoedht@@j@eed`c@o_OC@HzG @@edddPs@d@Ps@ffffff#@edgdeɧ33333c@ddd{/LbC@HzG @@ffffff? q@dedf@`o@333333$@fffffV@dedYL@ @@dde?k@@l@333333#@edgdf̋R@ddd yyM@ @@ffffff@s@dddf8@x@ffffff#@yf@eede@uvB@ @(@dddffffff?j@@d@333333#@edgdfee0*5O@ffffff@@@g@?eedhu@&@e@eedi@\CMA@HzG @`s@ddeffffff @r@@'@eehdfT@ddd c*M@\(\?@333333 @0@eeeh4@g@ffffff%@ai@efdM OI@)\(@H@dde?p@|@p@333333%@edgde`@dddd]KWE@{Gz@|@?@eeeh0@q@#@YZ@dedy@TR'0A@ @@ddd?@@ t@ffffff&@edfdf]@ f@dqddڊe@@p= ף@l@@eedgh@ u@'@(j@dfӫd+e0C@RQ@p@dde?o@Н@Pu@ffffff#@eegdeΧpa@ddd M@@@?{@eedgh@f@333333$@PU@ded|?5^P@ @@dd333333?q@?H@pr@#@edfdf[`@ddd"uqeG@Q@@?r@eeeh@s@ffffff&@fffffF`@eedl@y) L@(\ @w@ddd?m@@`t@333333$@edgde|33333I@dddVD@(\ @|@@s@eeeh(@q@#@̬\@dfd t@@s@[$P@(\@D@ddeffffff? v@H@Pq@#@edgde33333h@c@dlddZd;P@{Gz@d@@}@enedh@ m@h@efd|a2U0jF@(\ @Г@ddd333333@u@h@p@333333#@eegee q@l@ddd46W[A@@ }@ffffff? h@eeeg@c@$@dfڇdXq?@Q @@ddd?u@@@n@ffffff#@edgdeДddd6;N!M@Q@w@?q@dedf8@`l@333333%@dedX9vI@Q @X@ddd?y@@p@333333#@edededdd1%M@(\@X@@Pq@eedg<@k@#@dfdR!R@Q @@ddeffffff@m@@o@%@ddhdfg@ddd<,Ԛ.J@Q @Ȋ@ @pw@eeeg4@pw@#@df[d?W[dE@{Gz@@ddeffffff@ t@@l@#@edgdf j@ddj+oA@(\ @@?{@?eeehT@o@&@g@dfdBiF@(\@ܝ@dde333333 @@v@@s@ffffff&@eegdfg@ddd+e0G@ @P@ @u@enedh@r@dfdPk'L@(\ @(@ddd?s@8@pq@ffffff$@edgde@p@eee`vOQ@p= ף@`@ffffff@k@eeeh`f@`h@333333(@eee_LK@@@deo@u@?@edheet`f@ddd_)NJF@ @P@ @`w@dedfL@333333$@g@dfdSt$G:@Q @@edde|@@l@ffffff$@eegdededdMSt@{Gz @@?q@dedf@u@%@dfdڊeN@p= ף @@dde?n@@r@$@edfde|ddd_&M@@8@?@p@dedf@l@%@dfd&S*O@ @Ě@ddd333333? {@X@@m@ffffff$@edfdeȋ`e@dfddB@HzG @h@n@dedf8@t@%@dedOe@@RQ@@ddd@@@i@%@eefdf@g@[[[dd333333 @ffffff?[o[[[[@w@d[[[[[RQ@[e[ffffff??ҫ@t@333333(@[[[[e[[[[[[ddQ@ffffff?[[[[[8@@l@#@d[[[[[Gz@[d[[ffffff??.@&@[[[[e[[[[[[ddףp= @?[n[[[[@q@d[[[[[q= ףp @[dd[ffffff?@@ s@#@[[[[d[[[[[i[edq= ףp@[[[[[@p@$@e[[[[[{Gz@[d[??Ƣ@@l@%@[[[[d[[[[[[eHzG @??[[[[[H@0p@%@d[[[[[Q @[dd[?l@%@[[[[e[[[[[[dd)\(@333333?[[[[[@ffffff&@d[[[[[Q@[dd[333333?@@m@'@[[[[d[[[[[[ddQ @?[[v[[[[@d[[[[[\(\ @[dd[?P@n@$@[[[[d[[[[[[ddQ@333333?[[[[[[v@ffffff&@d[[[[[ @e[dd[[~@333333(@[[[[e[[[[[[dd333333 @ffffff?[[[[[ؖ@0w@333333$@e[[[[[ ףp= @[dd[ @H@Pt@$@[[[[e[[[[[[d{Gz @@?[[[[[333333+@e[[[[[(\@[ed[333333)@@'@[[[[e[[[[[[dd\(\@ffffff@[[[[[[@333333%@e[[[[[Gz @[dd[ffffff@ }@@'@[[[[e[[[[[[dd@333333?[[[[[@q@333333$@d[[[[[Q @[dd[@@`c@333333$@[[[[d[[[[[[ddQ @?[n[[[[ܡ@e[[[[[\(\ @t[dd[@}@+@[[[[e[[[[[[ddQ@333333?[[[[[H@p@333333%@d[[[[[(\@[dd[@N@ffffff&@[[[[d[[[[[m[edRQ @[[[[[q@333333*@e[[[[[ ףp= @[dd[?>@n@%@[[[[d[[[[[[ddQ@333333&@[[[[[[@ffffff(@e[[[[[Gz@[dd[!@@ j@333333%@[[[[d[[[[[[ddGz@?[[[[[@@x@333333$@d[[[[[{Gz@[e[o333333??x@d@[[[[e[[[[[[dd\(\@333333 @[[[[[[@"@e[[[[[Q @[dd[?$@g@(@[[[[d[[[[[[dd(\@ffffff?[[[[[N@ o@$@d[[[[[ffffff@[dd[m@@i@[[[[e[[[[[s[dd333333 @[[[[[@333333&@e[[[[[(\@[dd[333333?8@t@#@[[[[d[[[[[[dd333333 @?[[[[[@d@333333%@d[[[[[(\@[dd[?@333333#@[[[[e[[[[[[dd@?[[[[[D@$@d[[[[[Gz @[e[@?@@`e@333333&@[[[[e[[[[[g[ddGz @[[[[[@$@d[[[[[Q @[dd[?ң@s@$@[[[[d[[[[[[ddQ@?[[[[[̣@0z@%@d[[[[[333333 @[dd[?P@f@$@[[[[e[[[[[[dd{Gz@@[[[[[H@(@$@d[[[[[RQ@v[dd[@{@ffffff#@[[[[d[[[[[[dd @333333?[[[[[@#@d[[[[[ @[dd[@pv@'@[[[[e[[[[[[ddp= ף @?[n[[[[@l@d[[[[[Gz@[dd[? o@k@ffffff%@[[[[e[[[[[[ddQ @?[[[[[4@d@#@d[[[[[)\(@[ed[+@@x@= ףp=&@[[[[e[[[[[[ddGz@@[[[[[@%@e[[[[[zG @t[dd[n@x@[[[[e[[[[[[e)\( @333333@?[[[[[~@p@333333&@e[[[[[ffffff @[dd[333333?ʠ@o@$@[[[[d[[[[[[ddRQ @ffffff?[[[[[n@g@#@d[[[[[@[dd[ffffff?@ q@333333%@[[[[d[[[[[[ddQ @333333?[[[[[ @l@%@d[[[[[ ףp= @[dd[#@@@r@ffffff$@[[[[e[[[[[[ddGz@@[[[[[ @o@#@d[[[[[(\ @[d[??@@ l@#@[[[[e[[[[[[eףp= @ffffff @?[[[[[@l@333333&@e[[[[[RQ@[dd[333333@@ z@%@[[[[d[[[[[[ddHzG @333333?[o[[[[@d[[[[[p= ף@r[dd[k@g@333333'@[[[[e[[[g[[[d??[[[[[@%@d[[[[[333333 @[dd[?@`n@ffffff#@[[[[d[[[[[[ddq= ףp@ffffff?[[[[[@ j@333333%@d[[[[[ ףp= @[dd[333333?ؙ@d@#@[[[[d[[[g[[[d333333+@?[[[[[ԙ@ m@#@d[[[[[ @[dd[?`@%@[[[[d[[[[[[ed{Gz@ffffff?[n[[[[@d@d[[[[[333333 @g[dd[n,@[[[[d[[[[[[ddffffff@333333?[o[[[[@d[[[[[= ףp=@[dd[?`@e@%@[[[[d[[[[[[eGz@ffffff??[[[[[ h@s@#@e[[[[[(\@f[e[?\@333333(@[[[[d[[[[[[ddףp= @ffffff?[o[[[[Ĕ@ y@d[[[[[ףp= @[dd[?@Pq@ffffff$@[[[[d[[[[[[dd333333 @?[[[[[@z@ffffff$@d[[[[[Q @[dd[333333@|@g@%@[[[[d[[[[[[dd(\@333333 @[[[[[@ h@$@d[[[[[Q @[dd[?@ p@333333%@[[[[d[[[[[[ddQ @@[[[[[8@333333&@e[[[[[Gz@[dd[?x@p@333333%@[[[[d[[[[[[ddp= ף @@[[[[[ԑ@p@%@d[[[[[ @[dd[ffffff@@u@$@[[[[d[[[[[e[ddQ @[[[[[@@u@333333%@d[[[[[q= ףp@[dd[@@`k@'@[[[[e[[[[[[ddQ @?[[[[[@k@%@d[[[[[\(\ @[d[ffffff??@@d@ffffff%@[[[[d[[[[[[ddףp= @ffffff?[[[[[@j@%@d[[[[[{Gz@[dd[?@o@%@[[[[d[[[[[[dd(\ @333333?[[[[[|@q@333333%@d[[[[[p= ף @e[dd[$@n@%@[[[[d[[[[[[ddףp= @ffffff?[[[[[@s@%@d[[[[[Gz@[dd[333333?H@e@%@[[[[e[[[[[[ddp= ף@?[[[[[<@f@ffffff&@d[[[[[\(\ @[dd[?|@#@[[[[d[[[[[[dd@?[[[[[@p@$@d[[[[[RQ @[dd[ffffff?@u@333333%@[[[[d[[[foreign/tests/MLLabelsWithNotesChar.dta0000644000175100001440000000251713245463570017671 0ustar hornikuserssdatalabelBQgC:\Users\bquistorff\Downloads\_archive\Code_free\R\decode dta27 Apr 2013 16:16female%8.0gfemale_lbl_defIs it femaleRfemalele?","val")>0) 0if (squestion0F@BAre you Female?J_dtaele?","val")>0) 0if (s_lang_c_lang_l_default`BdefaultM_dtaele?","val")>0) 0if (s_lang_v_spanishBݎg@etiqdataBQPfemalele?","val")>0) 0if (s_lang_l_spanishBݎg@female_lbl_esKfemalele?","val")>0) 0if (s_lang_v_spanishBݎg@FemeninoQ_dtaele?","val")>0) 0if (snote10F@BdatasetNoteTxtD_dtaele?","val")>0) 0if (snote00F@B1Qfemalele?","val")>0) 0if (snote20F@BFemaleNote2TxtDfemalele?","val")>0) 0if (snote00F@B2Pfemalele?","val")>0) 0if (snote10F@BFemaleNoteTxtR_dtaele?","val")>0) 0if (s_lang_listnishdefault spanishfemale_lbl_esBBNoSifemale_lbl_defBBNoYesforeign/tests/octave.Rout.save0000644000175100001440000000416713245463571016176 0ustar hornikusers R version 2.12.0 Under development (unstable) (2010-03-25 r51410) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("foreign") > otd <- read.octave("octave.dat") > summary(otd) Length Class Mode a_string 2 -none- character a_bool 1 -none- logical a_struct 3 -none- list a_cell 4 -none- list a_complex_scalar 1 -none- complex a_list 3 -none- list a_complex_matrix 4 -none- complex a_range 5 -none- numeric a_scalar 1 -none- numeric a_complex_3_d_array 8 -none- complex a_3_d_array 8 -none- numeric a_matrix 4 -none- numeric a_bool_matrix 4 -none- logical > str(otd) List of 13 $ a_string : chr [1:2] "foo" "bar" $ a_bool : logi FALSE $ a_struct :List of 3 ..$ a: num 1 ..$ b: num [1:2, 1:2] 1 3 2 4 ..$ c: chr "foo" $ a_cell :List of 4 ..$ : num 1 ..$ : chr "foo" ..$ : num [1:2, 1:2] 1 3 2 4 ..$ : chr "bar" ..- attr(*, "dim")= int [1:2] 2 2 $ a_complex_scalar : cplx 0+1i $ a_list :List of 3 ..$ : num 1 ..$ : num [1:2, 1:2] 1 3 2 4 ..$ : chr "foo" $ a_complex_matrix : cplx [1:2, 1:2] 1+2i 5+0i 3-4i ... $ a_range : num [1:5] 1 2 3 4 5 $ a_scalar : num 1 $ a_complex_3_d_array: cplx [1:2, 1:2, 1:2] 1+1i 3+1i 2+1i ... $ a_3_d_array : num [1:2, 1:2, 1:2] 1 3 2 4 5 7 6 8 $ a_matrix : num [1:2, 1:2] 1 3 2 4 $ a_bool_matrix : logi [1:2, 1:2] TRUE FALSE FALSE TRUE > q() foreign/tests/tsdumpdata0000644000175100001440000000562713245463571015200 0ustar hornikuserssunspot structure 3 .Data numeric 37 40 115 100 80 60 40 23 10 10 25 75 145 130 130 80 65 20 10 5 10 60 190 180 175 120 50 35 20 10 15 30 60 105 105 105 80 65 .Tsp numeric 3 1936 1972 1 class character 2 ts numeric carbon.dioxide structure 3 .Data numeric 384 315.42 316.32 316.49 317.56 318.13 318 316.39 314.66 313.68 313.18 314.66 315.43 316.27 316.81 317.42 318.87 319.87 319.43 318.01 315.75 314 313.68 314.84 316.03 316.73 317.54 318.38 319.31 320.42 319.61 318.42 316.64 314.83 315.15 315.95 316.85 317.78 318.4 319.53 320.41 320.85 320.45 319.44 317.25 316.12 315.27 316.53 317.53 318.58 318.92 319.7 321.22 322.08 321.31 319.58 317.61 316.05 315.83 316.91 318.2 319.41 320.07 320.74 321.4 322.06 321.73 320.27 318.54 316.54 316.71 317.53 318.55 319.27 320.28 320.73 321.97 322 321.71 321.05 318.71 317.65 317.14 318.71 319.25 320.46 321.43 322.22 323.54 323.91 323.59 322.26 320.21 318.48 317.94 319.63 320.87 322.17 322.34 322.88 324.25 324.83 323.93 322.39 320.76 319.1 319.23 320.56 321.8 322.4 322.99 323.73 324.86 325.41 325.19 323.97 321.92 320.1 319.96 320.97 322.48 323.52 323.89 325.04 326.01 326.67 325.96 325.13 322.9 321.61 321.01 322.08 323.37 324.34 325.3 326.29 327.54 327.54 327.21 325.98 324.42 322.91 322.9 323.85 324.96 326.01 326.51 327.01 327.62 328.76 328.4 327.2 325.28 323.2 323.4 324.64 325.85 326.6 327.47 327.58 329.56 329.9 328.92 327.89 326.17 324.68 325.04 326.34 327.39 328.37 329.4 330.14 331.33 332.31 331.9 330.7 329.15 327.34 327.02 327.99 328.48 329.18 330.55 331.32 332.48 332.92 332.08 331.02 329.24 327.28 327.21 328.29 329.41 330.23 331.24 331.87 333.14 333.8 333.42 331.73 329.9 328.4 328.17 329.32 330.59 331.58 332.39 333.33 334.41 334.71 334.17 332.88 330.77 329.14 328.77 330.14 331.52 332.75 333.25 334.53 335.9 336.57 336.1 334.76 332.59 331.41 330.98 332.24 333.68 334.8 335.22 336.47 337.59 337.84 337.72 336.37 334.51 332.6 332.37 333.75 334.79 336.05 336.59 337.79 338.71 339.3 339.12 337.56 335.92 333.74 333.7 335.13 336.56 337.84 338.19 339.9 340.6 341.29 341 339.39 337.43 335.72 335.84 336.93 338.04 339.06 340.3 341.21 342.33 342.74 342.07 340.32 338.27 336.52 336.68 338.19 339.44 340.57 341.44 342.53 343.39 343.96 343.18 341.88 339.65 337.8 337.69 339.09 340.32 341.2 342.35 342.93 344.77 345.58 345.14 343.81 342.22 339.69 339.82 340.98 342.82 343.52 344.33 345.11 346.88 347.25 346.61 345.22 343.11 340.9 341.17 342.8 344.04 344.79 345.82 347.25 348.17 348.75 348.07 346.38 344.52 342.92 342.63 344.06 345.38 346.12 346.79 347.69 349.38 350.04 349.38 347.78 345.75 344.7 344.01 345.5 346.75 347.86 348.32 349.26 350.84 351.7 351.11 349.37 347.97 346.31 346.22 347.68 348.82 350.29 351.58 352.08 353.45 354.08 353.66 352.25 350.3 348.58 348.74 349.93 351.21 352.62 352.93 353.54 355.27 355.52 354.97 353.74 351.51 349.63 349.82 351.12 352.35 353.47 354.51 355.18 355.98 356.94 355.99 354.58 352.68 350.72 350.92 352.55 353.91 .Tsp numeric 3 1959 1990.9166666666667 12 class character 2 ts numeric foreign/tests/testEmpty.Rout.save0000644000175100001440000000554113245463577016716 0ustar hornikusers R Under development (unstable) (2013-07-06 r63202) -- "Unsuffered Consequences" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin12.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## regression test for PR#15346 > > library(foreign) > > ## The testEmpty.xpt dataset was created using the following code: > ## library(SASxport) > ## data(iris) > ## write.xport(Iris1=iris[1:2,], # two row dataset > ## empty=data.frame(), # empty dataset > ## Iris2=iris[3:4,], # two row dataset > ## file="testEmpty.xpt", > ## autogen.formats=FALSE # prevent autocreation of FORMATS dataset > ## ) > > ## Test that lookup.xport retrieves all three datsets > empty.f <- lookup.xport(file="testEmpty.xpt") > empty.f $IRIS1 $IRIS1$headpad [1] 1200 $IRIS1$type [1] "numeric" "numeric" "numeric" "numeric" "character" $IRIS1$width [1] 8 8 8 8 8 $IRIS1$index [1] 1 2 3 4 5 $IRIS1$position [1] 0 8 16 24 32 $IRIS1$name [1] "SEPAL_LE" "SEPAL_WI" "PETAL_LE" "PETAL_WI" "SPECIES" $IRIS1$label [1] "" "" "" "" "" $IRIS1$format [1] "" "" "" "" "" $IRIS1$sexptype [1] 14 14 14 14 16 $IRIS1$tailpad [1] 0 $IRIS1$length [1] 2 $EMPTY $EMPTY$headpad [1] 480 $EMPTY$type character(0) $EMPTY$width integer(0) $EMPTY$index integer(0) $EMPTY$position integer(0) $EMPTY$name character(0) $EMPTY$label character(0) $EMPTY$format character(0) $EMPTY$sexptype integer(0) $EMPTY$tailpad [1] 0 $EMPTY$length [1] 0 $IRIS2 $IRIS2$headpad [1] 1200 $IRIS2$type [1] "numeric" "numeric" "numeric" "numeric" "character" $IRIS2$width [1] 8 8 8 8 8 $IRIS2$index [1] 1 2 3 4 5 $IRIS2$position [1] 0 8 16 24 32 $IRIS2$name [1] "SEPAL_LE" "SEPAL_WI" "PETAL_LE" "PETAL_WI" "SPECIES" $IRIS2$label [1] "" "" "" "" "" $IRIS2$format [1] "" "" "" "" "" $IRIS2$sexptype [1] 14 14 14 14 16 $IRIS2$tailpad [1] 0 $IRIS2$length [1] 2 > stopifnot(length(empty.f) == 3L) > > > dat.f <- read.xport(file="testEmpty.xpt") > dat.f $IRIS1 SEPAL_LE SEPAL_WI PETAL_LE PETAL_WI SPECIES 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa $EMPTY data frame with 0 columns and 0 rows $IRIS2 SEPAL_LE SEPAL_WI PETAL_LE PETAL_WI SPECIES 1 4.7 3.2 1.3 0.2 setosa 2 4.6 3.1 1.5 0.2 setosa > stopifnot(length(dat.f)==3) > > > proc.time() user system elapsed 0.220 0.027 0.231 foreign/tests/contact-lenses.arff0000644000175100001440000000551213245463577016670 0ustar hornikusers% 1. Title: Database for fitting contact lenses % % 2. Sources: % (a) Cendrowska, J. "PRISM: An algorithm for inducing modular rules", % International Journal of Man-Machine Studies, 1987, 27, 349-370 % (b) Donor: Benoit Julien (Julien@ce.cmu.edu) % (c) Date: 1 August 1990 % % 3. Past Usage: % 1. See above. % 2. Witten, I. H. & MacDonald, B. A. (1988). Using concept % learning for knowledge acquisition. International Journal of % Man-Machine Studies, 27, (pp. 349-370). % % Notes: This database is complete (all possible combinations of % attribute-value pairs are represented). % % Each instance is complete and correct. % % 9 rules cover the training set. % % 4. Relevant Information Paragraph: % The examples are complete and noise free. % The examples highly simplified the problem. The attributes do not % fully describe all the factors affecting the decision as to which type, % if any, to fit. % % 5. Number of Instances: 24 % % 6. Number of Attributes: 4 (all nominal) % % 7. Attribute Information: % -- 3 Classes % 1 : the patient should be fitted with hard contact lenses, % 2 : the patient should be fitted with soft contact lenses, % 1 : the patient should not be fitted with contact lenses. % % 1. age of the patient: (1) young, (2) pre-presbyopic, (3) presbyopic % 2. spectacle prescription: (1) myope, (2) hypermetrope % 3. astigmatic: (1) no, (2) yes % 4. tear production rate: (1) reduced, (2) normal % % 8. Number of Missing Attribute Values: 0 % % 9. Class Distribution: % 1. hard contact lenses: 4 % 2. soft contact lenses: 5 % 3. no contact lenses: 15 @relation contact-lenses @attribute age {young, pre-presbyopic, presbyopic} @attribute spectacle-prescrip {myope, hypermetrope} @attribute astigmatism {no, yes} @attribute tear-prod-rate {reduced, normal} @attribute contact-lenses {soft, hard, none} @data % % 24 instances % young,myope,no,reduced,none young,myope,no,normal,soft young,myope,yes,reduced,none young,myope,yes,normal,hard young,hypermetrope,no,reduced,none young,hypermetrope,no,normal,soft young,hypermetrope,yes,reduced,none young,hypermetrope,yes,normal,hard pre-presbyopic,myope,no,reduced,none pre-presbyopic,myope,no,normal,soft pre-presbyopic,myope,yes,reduced,none pre-presbyopic,myope,yes,normal,hard pre-presbyopic,hypermetrope,no,reduced,none pre-presbyopic,hypermetrope,no,normal,soft pre-presbyopic,hypermetrope,yes,reduced,none pre-presbyopic,hypermetrope,yes,normal,none presbyopic,myope,no,reduced,none presbyopic,myope,no,normal,none presbyopic,myope,yes,reduced,none presbyopic,myope,yes,normal,hard presbyopic,hypermetrope,no,reduced,none presbyopic,hypermetrope,no,normal,soft presbyopic,hypermetrope,yes,reduced,none presbyopic,hypermetrope,yes,normal,none foreign/src/0000755000175100001440000000000014530674113012514 5ustar hornikusersforeign/src/pspp-format-def.h0000644000175100001440000000761613245463577015717 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ /* Numeric and string formats. */ DEFFMT (FMT_F, "F", 2, 1, 40, 1, 40, 0001, FMT_F, 5) DEFFMT (FMT_N, "N", 2, 1, 40, 1, 40, 0011, FMT_F, 16) DEFFMT (FMT_E, "E", 2, 1, 40, 6, 40, 0001, FMT_E, 17) DEFFMT (FMT_COMMA, "COMMA", 2, 1, 40, 1, 40, 0001, FMT_COMMA, 3) DEFFMT (FMT_DOT, "DOT", 2, 1, 40, 1, 40, 0001, FMT_DOT, 32) DEFFMT (FMT_DOLLAR, "DOLLAR", 2, 1, 40, 2, 40, 0001, FMT_DOLLAR, 4) DEFFMT (FMT_PCT, "PCT", 2, 1, 40, 2, 40, 0001, FMT_PCT, 31) DEFFMT (FMT_Z, "Z", 2, 1, 40, 1, 40, 0011, FMT_F, 15) DEFFMT (FMT_A, "A", 1, 1, 255, 1, 254, 0004, FMT_A, 1) DEFFMT (FMT_AHEX, "AHEX", 1, 2, 254, 2, 510, 0006, FMT_A, 2) DEFFMT (FMT_IB, "IB", 2, 1, 8, 1, 8, 0010, FMT_F, 6) DEFFMT (FMT_P, "P", 2, 1, 16, 1, 16, 0011, FMT_F, 8) DEFFMT (FMT_PIB, "PIB", 2, 1, 8, 1, 8, 0010, FMT_F, 9) DEFFMT (FMT_PIBHEX, "PIBHEX", 2, 2, 16, 2, 16, 0002, FMT_F, 7) DEFFMT (FMT_PK, "PK", 2, 1, 16, 1, 16, 0010, FMT_F, 10) DEFFMT (FMT_RB, "RB", 1, 2, 8, 2, 8, 0002, FMT_F, 11) DEFFMT (FMT_RBHEX, "RBHEX", 1, 4, 16, 4, 16, 0002, FMT_F, 12) /* Custom currency. */ DEFFMT (FMT_CCA, "CCA", 2, -1, -1, 1, 40, 0020, FMT_CCA, 33) DEFFMT (FMT_CCB, "CCB", 2, -1, -1, 1, 40, 0020, FMT_CCB, 34) DEFFMT (FMT_CCC, "CCC", 2, -1, -1, 1, 40, 0020, FMT_CCC, 35) DEFFMT (FMT_CCD, "CCD", 2, -1, -1, 1, 40, 0020, FMT_CCD, 36) DEFFMT (FMT_CCE, "CCE", 2, -1, -1, 1, 40, 0020, FMT_CCE, 37) /* Date/time formats. */ DEFFMT (FMT_DATE, "DATE", 1, 9, 40, 9, 40, 0001, FMT_DATE, 20) DEFFMT (FMT_EDATE, "EDATE", 1, 8, 40, 8, 40, 0001, FMT_EDATE, 23) DEFFMT (FMT_SDATE, "SDATE", 1, 8, 40, 8, 40, 0001, FMT_SDATE, 24) DEFFMT (FMT_ADATE, "ADATE", 1, 8, 40, 8, 40, 0001, FMT_ADATE, 29) DEFFMT (FMT_JDATE, "JDATE", 1, 5, 40, 5, 40, 0001, FMT_JDATE, 28) DEFFMT (FMT_QYR, "QYR", 1, 4, 40, 6, 40, 0001, FMT_QYR, 30) DEFFMT (FMT_MOYR, "MOYR", 1, 6, 40, 6, 40, 0001, FMT_MOYR, 22) DEFFMT (FMT_WKYR, "WKYR", 1, 6, 40, 8, 40, 0001, FMT_WKYR, 21) DEFFMT (FMT_DATETIME, "DATETIME", 2, 17, 40, 17, 40, 0001, FMT_DATETIME, 38) DEFFMT (FMT_TIME, "TIME", 2, 5, 40, 5, 40, 0001, FMT_TIME, 39) DEFFMT (FMT_DTIME, "DTIME", 2, 11, 40, 8, 40, 0001, FMT_DTIME, 25) DEFFMT (FMT_WKDAY, "WKDAY", 1, 2, 40, 2, 40, 0001, FMT_WKDAY, 26) DEFFMT (FMT_MONTH, "MONTH", 1, 3, 40, 3, 40, 0001, FMT_MONTH, 27) /* These aren't real formats. They're used by DATA LIST. */ DEFFMT (FMT_T, "T", 1, 1,99999, 1,99999, 0000, FMT_T, -1) DEFFMT (FMT_X, "X", 1, 1,99999, 1,99999, 0000, FMT_X, -1) DEFFMT (FMT_DESCEND, "***", 1, 1,99999, 1,99999, 0000, -1, -1) DEFFMT (FMT_NEWREC, "***", 1, 1,99999, 1,99999, 0000, -1, -1) foreign/src/SASxport.h0000644000175100001440000000612013245463577014423 0ustar hornikusers/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ /* * This file is derived from code in the SAS Technical Support * document TS-140 "The Record Layout of a Data Set in SAS Transport * (XPORT) Format" available as * http://ftp.sas.com/techsup/download/technote/ts140.html */ #ifndef SASEXPORT_H #define SASEXPORT_H #include /* for memcpy and memset */ #include "foreign.h" #include "swap_bytes.h" /* double cnxptiee(double from, int fromtype, int totype); */ struct SAS_XPORT_header { char sas_symbol[2][8]; /* should be "SAS " */ char saslib[8]; /* should be "SASLIB " */ char sasver[8]; char sas_os[8]; char sas_create[16]; char sas_mod[16]; }; struct SAS_XPORT_member { char sas_symbol[8]; char sas_dsname[8]; char sasdata[8]; char sasver[8]; char sas_osname[8]; char sas_create[16]; char sas_mod[16]; }; struct SAS_XPORT_namestr { short ntype; /* VARIABLE TYPE: 1=NUMERIC, 2=CHAR */ short nhfun; /* HASH OF NNAME (always 0) */ short nlng; /* LENGTH OF VARIABLE IN OBSERVATION */ short nvar0; /* VARNUM */ char nname[8]; /* NAME OF VARIABLE */ char nlabel[40]; /* LABEL OF VARIABLE */ char nform[8]; /* NAME OF FORMAT */ short nfl; /* FORMAT FIELD LENGTH OR 0 */ short nfd; /* FORMAT NUMBER OF DECIMALS */ short nfj; /* 0=LEFT JUSTIFICATION, 1=RIGHT JUST */ char nfill[2]; /* (UNUSED, FOR ALIGNMENT AND FUTURE) */ char niform[8]; /* NAME OF INPUT FORMAT */ short nifl; /* INFORMAT LENGTH ATTRIBUTE */ short nifd; /* INFORMAT NUMBER OF DECIMALS */ int npos; /* POSITION OF VALUE IN OBSERVATION */ char rest[52]; /* remaining fields are irrelevant */ }; #ifdef WORDS_BIGENDIAN #define char_to_short(from, to) memcpy(&to, from, 2) #define char_to_int(from, to) memcpy(&to, from, 4) #define char_to_uint(from, to) memcpy(&to, from, 4) #else #define char_to_short(from, to) memcpy(&to, from, 2); reverse_short(to); #define char_to_int(from, to) memcpy(&to, from, 4); reverse_int(to); #define char_to_uint(from, to) memcpy(&to, from, 4); reverse_uint(to); #endif /* WORDS_BIGENDIAN */ #endif /* SASEXPORT_H */ foreign/src/Rdbfread.c0000644000175100001440000001416214343566015014400 0ustar hornikusers/* Based on code in the shapelib.maptools.org library. * * First version for R's maptools package appears to be * Copyright 2000-2001 (c) Nicholas Lewin-Koh * * Changes for the foreign package Copyright (C) 2004 the R Code * Development Team, including adding support for logical fields. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include "shapefil.h" #include #include #include "foreign.h" SEXP Rdbfread(SEXP dbfnm) { DBFHandle hDBF; int i, iRecord, nflds, nrecs, nRvar, pc=0; char labelbuff[81]; const char *pszFilename = NULL; int nWidth, nDecimals, val; char szTitle[12], buf[2]; const char *p; DBFFieldType eType; SEXP df, tmp, varlabels, row_names, DataTypes; short *types; /* -------------------------------------------------------------------- */ /* Handle arguments. */ /* -------------------------------------------------------------------- */ pszFilename = CHAR(STRING_ELT(dbfnm, 0)); /* -------------------------------------------------------------------- */ /* Open the file. */ /* -------------------------------------------------------------------- */ hDBF = DBFOpen(pszFilename, "rb" ); if( hDBF == NULL ) error(_("unable to open DBF file")); /* -------------------------------------------------------------------- */ /* If there is no data in this file let the user know. */ /* -------------------------------------------------------------------- */ if( DBFGetFieldCount(hDBF) == 0 ) { DBFClose( hDBF ); error(_("no fields in DBF table")); } nRvar = 0; nflds = DBFGetFieldCount(hDBF); nrecs = DBFGetRecordCount(hDBF); types = (short *) R_alloc(nflds, sizeof(short)); PROTECT(DataTypes = allocVector(STRSXP, nflds)); pc++; for( i = 0; i < nflds; i++ ) { eType = DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals ); switch(eType) { case FTString: types[i] = 1; nRvar++; break; case FTInteger: types[i] = 2; nRvar++; break; case FTDouble: types[i] = 3; nRvar++; break; case FTLogical: types[i] = 4; nRvar++; break; default: /* doesn't seem to be possible */ types[i] = 0; } buf[0] = hDBF->pachFieldType[i]; buf[1] = '\0'; SET_STRING_ELT(DataTypes, i, mkChar(buf)); } PROTECT(df = allocVector(VECSXP, nRvar)); pc++; PROTECT(varlabels = allocVector(STRSXP, nRvar)); pc++; for(i = 0, nRvar = 0; i < nflds; i++) { eType = DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals ); switch(types[i]) { case 1: SET_VECTOR_ELT(df, nRvar, allocVector(STRSXP,nrecs)); break; case 2: SET_VECTOR_ELT(df, nRvar, allocVector(INTSXP,nrecs)); break; case 3: SET_VECTOR_ELT(df, nRvar, allocVector(REALSXP,nrecs)); break; case 4: SET_VECTOR_ELT(df, nRvar, allocVector(LGLSXP,nrecs)); break; default: continue; } SET_STRING_ELT(varlabels, nRvar, mkChar(szTitle)); nRvar++; } for(iRecord = 0; iRecord < nrecs; iRecord++) { nRvar = 0; for(i = 0; i < nflds; i++) switch(types[i]) { case 1: if( DBFIsAttributeNULL( hDBF, iRecord, i )) SET_STRING_ELT(VECTOR_ELT(df, nRvar), iRecord, NA_STRING); else SET_STRING_ELT(VECTOR_ELT(df, nRvar), iRecord, mkChar(DBFReadStringAttribute( hDBF, iRecord, i))); nRvar++; break; case 2: if( DBFIsAttributeNULL( hDBF, iRecord, i )) INTEGER(VECTOR_ELT(df, nRvar))[iRecord] = NA_INTEGER; else { double dtmp = DBFReadDoubleAttribute( hDBF, iRecord, i ); if((dtmp > 2147483647.0) || (dtmp < -2147483646.0)) { int ii, *it; double *r; /* allow for NA_INTEGER = -(2^31 -1)*/ PROTECT(tmp = VECTOR_ELT(df, nRvar)); it = INTEGER(tmp); SET_VECTOR_ELT(df, nRvar, allocVector(REALSXP, nrecs)); r = REAL(VECTOR_ELT(df, nRvar)); for (ii = 0; ii < iRecord; ii++) { int itmp = it[ii]; r[ii] = (itmp == NA_INTEGER) ? NA_REAL : itmp; } UNPROTECT(1); r[iRecord] = dtmp; types[i] = 3; } else INTEGER(VECTOR_ELT(df, nRvar))[iRecord] = (int) dtmp; } nRvar++; break; case 3: if( DBFIsAttributeNULL( hDBF, iRecord, i )) REAL(VECTOR_ELT(df, nRvar))[iRecord] = NA_REAL; else REAL(VECTOR_ELT(df, nRvar))[iRecord] = DBFReadDoubleAttribute( hDBF, iRecord, i ); nRvar++; break; case 4: if( DBFIsAttributeNULL( hDBF, iRecord, i )) LOGICAL(VECTOR_ELT(df, nRvar))[iRecord] = NA_LOGICAL; else { p = DBFReadStringAttribute( hDBF, iRecord, i ); switch(*p){ case 'f': case 'F': case 'n': case 'N': val = 0; break; case 't': case 'T': case 'y': case 'Y': val = 1; break; case '?': val = NA_LOGICAL; break; default: warning(_("value |%d| found in logical field"), *p); val = NA_LOGICAL; break; } LOGICAL(VECTOR_ELT(df, nRvar))[iRecord] = val; } nRvar++; break; default: break; } } DBFClose( hDBF ); PROTECT(tmp = mkString("data.frame")); pc++; setAttrib(df, R_ClassSymbol, tmp); setAttrib(df, R_NamesSymbol, varlabels); setAttrib(df, install("data_types"), DataTypes); PROTECT(row_names = allocVector(STRSXP, nrecs)); pc++; for (i = 0; i < nrecs; i++) { snprintf(labelbuff, 81, "%d", i+1); SET_STRING_ELT(row_names, i, mkChar(labelbuff)); } setAttrib(df, R_RowNamesSymbol, row_names); UNPROTECT(pc); return(df); } foreign/src/spss.c0000644000175100001440000004102614167602273013657 0ustar hornikusers/* * Read SPSS files saved by SAVE and EXPORT commands * * Copyright 2000-2000 Saikat DebRoy * Thomas Lumley * Copyright 2005-2014 R Core Development Team * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include "foreign.h" #include "file-handle.h" #include "pfm.h" #include "sfm.h" #include "avl.h" #include "var.h" #if !PSPP && !__GCC__ #define inline #endif /* Divides nonnegative X by positive Y, rounding up. */ #define DIV_RND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y)) char * xstrdup(const char *s) { int len = (int) strlen(s); char *c = R_Calloc(len + 1, char); strcpy(c, s); return c; } /* Returns a newly created empty dictionary. */ struct dictionary * new_dictionary (int copy) { struct dictionary *d = R_Calloc (1, struct dictionary); d->var = NULL; d->var_by_name = R_avl_create (cmp_variable, NULL); d->nvar = 0; d->N = 0; d->nval = 0; d->n_splits = 0; d->splits = NULL; d->label = NULL; d->n_documents = 0; d->documents = NULL; d->weight_index = -1; d->weight_var[0] = 0; d->filter_var[0] = 0; return d; } /* Find and return the variable in dictionary D having name NAME, or NULL if no such variable exists in D. */ struct variable * find_dict_variable (const struct dictionary *d, const char *name) { return R_avl_find (d->var_by_name, (struct variable *) name); } /* Initialize fields in variable V inside dictionary D with name NAME, type TYPE, and width WIDTH. Initializes some other fields too. */ static inline void common_init_stuff (struct dictionary *dict, struct variable *v, const char *name, int type, int width) { if (v->name != name) /* Avoid problems with overlap. */ strcpy (v->name, name); R_avl_insert (dict->var_by_name, v); v->type = type; v->left = name[0] == '#'; v->width = type == NUMERIC ? 0 : width; v->miss_type = MISSING_NONE; if (v->type == NUMERIC) { v->print.type = FMT_F; v->print.w = 8; v->print.d = 2; } else { v->print.type = FMT_A; v->print.w = v->width; v->print.d = 0; } v->write = v->print; } /* Initialize (for the first time) a variable V in dictionary DICT with name NAME, type TYPE, and width WIDTH. */ void init_variable (struct dictionary *dict, struct variable *v, const char *name, int type, int width) { common_init_stuff (dict, v, name, type, width); v->nv = type == NUMERIC ? 1 : DIV_RND_UP (width, 8); v->fv = dict->nval; dict->nval += v->nv; v->label = NULL; v->val_lab = NULL; v->get.fv = -1; } /* Creates a variable named NAME in dictionary DICT having type TYPE (ALPHA or NUMERIC) and, if type==ALPHA, width WIDTH. Returns a pointer to the newly created variable if successful. On failure (which indicates that a variable having the specified name already exists), returns NULL. */ struct variable * create_variable (struct dictionary *dict, const char *name, int type, int width) { if (find_dict_variable (dict, name)) return NULL; { struct variable *new_var; dict->var = R_Realloc (dict->var, dict->nvar + 1, struct variable *); new_var = dict->var[dict->nvar] = R_Calloc (1, struct variable); new_var->index = dict->nvar; dict->nvar++; init_variable (dict, new_var, name, type, width); return new_var; } } /* Compares two value labels and returns a strcmp()-type result. */ int val_lab_cmp (const void *a, const void *b, void *param) { int width = *((int *)param); if (width) return strncmp ((char *)((struct value_label *) a)->v.s, (char *)((struct value_label *) b)->v.s, width); else { double temp = (((struct value_label *) a)->v.f - ((struct value_label *) b)->v.f); if (temp > 0) return 1; else if (temp < 0) return -1; else return 0; } } /* returns an array of pointers to the data elements of an avl_tree */ /* Ugly, but the alternatives seem to be worse */ void *avlFlatten(const avl_tree *tree){ int n; void **ans; /* T1. */ const avl_node *an[AVL_MAX_HEIGHT]; /* Stack A: nodes. */ const avl_node **ap = an; /* Stack A: stack pointer. */ const avl_node *p = tree->root.link[0]; n=R_avl_count(tree); ans=R_Calloc(n, void * ); for (;;) /* from avl.c:avl_walk */ { /* T2. */ while (p != NULL) { /* T3. */ *ap++ = p; p = p->link[0]; } /* T4. */ if (ap == an) return ans; p = *--ap; /* T5. */ n--; ans[n]=p->data; p = p->link[1]; } } static SEXP getSPSSvaluelabels(struct dictionary *dict) { SEXP ans, somelabels, somevalues; int nlabels, nvars, i, j; struct value_label **flattened_labels; struct avl_tree *labelset; unsigned char tmp[MAX_SHORT_STRING+1]; nvars = dict->nvar; if (nvars == 0) return R_NilValue; PROTECT(ans = allocVector(VECSXP, nvars)); for(i = 0; i < nvars; i++) { labelset = (dict->var)[i]->val_lab; if (!labelset) continue; nlabels = R_avl_count(labelset); flattened_labels = avlFlatten(labelset); PROTECT(somelabels = allocVector(STRSXP, nlabels)); if ((dict->var)[i]->type == NUMERIC) { double *rx; PROTECT(somevalues = allocVector(REALSXP, nlabels)); rx = REAL(somevalues); for(j = 0; j < nlabels; j++) { SET_STRING_ELT(somelabels, j, mkChar(flattened_labels[j]->s)); rx[j] = flattened_labels[j]->v.f; } } else { PROTECT(somevalues = allocVector(STRSXP, nlabels)); for(j = 0; j < nlabels; j++) { SET_STRING_ELT(somelabels, j, mkChar(flattened_labels[j]->s)); memcpy(tmp,flattened_labels[j]->v.s, MAX_SHORT_STRING); tmp[MAX_SHORT_STRING] = '\0'; SET_STRING_ELT(somevalues, j, mkChar((char *)tmp)); } } R_Free(flattened_labels); namesgets(somevalues, somelabels); SET_VECTOR_ELT(ans, i, somevalues); UNPROTECT(2); /*somevalues, somelabels*/ } UNPROTECT(1); return ans; } static SEXP getSPSSmissing(struct dictionary *dict, int *have_miss) { SEXP ans, elt, nm, value; int nvars, i; nvars = dict->nvar; if (nvars == 0) return R_NilValue; PROTECT(ans = allocVector(VECSXP, nvars)); for(i = 0; i < nvars; i++) { struct variable *v = dict->var[i]; int j, n = 0; const char *type="unknown"; switch (v->miss_type) { case MISSING_NONE: type = "none"; break; case MISSING_1: n = 1; type = "one"; break; case MISSING_2: n = 2; type = "two"; break; case MISSING_3: n = 3; type = "three"; break; case MISSING_RANGE: n = 2; type = "range"; break; case MISSING_LOW: n = 1; type = "low"; break; case MISSING_HIGH: n = 1; type = "high"; break; case MISSING_RANGE_1: n = 3; type = "range+1"; break; case MISSING_LOW_1: n = 2; type = "low+1"; break; case MISSING_HIGH_1: n = 2; type = "high+1"; break; default: type = "unknown"; } if (strcmp(type, "none")) (*have_miss)++; if (n > 0) { elt = allocVector(VECSXP, 2); SET_VECTOR_ELT(ans, i, elt); PROTECT(nm = allocVector(STRSXP, 2)); SET_STRING_ELT(nm, 0, mkChar("type")); SET_STRING_ELT(nm, 1, mkChar("value")); setAttrib(elt, R_NamesSymbol, nm); SET_VECTOR_ELT(elt, 0, mkString(type)); if (v->type == NUMERIC) { double *rx; PROTECT(value = allocVector(REALSXP, n)); rx = REAL(value); for(j = 0; j < n; j++) rx[j] = v->missing[j].f; } else { PROTECT(value = allocVector(STRSXP, n)); for(j = 0; j < n; j++) SET_STRING_ELT(value, j, mkChar((const char *)v->missing[j].s)); } SET_VECTOR_ELT(elt, 1, value); UNPROTECT(2); } else { elt = allocVector(VECSXP, 1); SET_VECTOR_ELT(ans, i, elt); setAttrib(elt, R_NamesSymbol, mkString("type")); SET_VECTOR_ELT(elt, 0, mkString(type)); } } UNPROTECT(1); return ans; } static SEXP read_SPSS_PORT(const char *filename) { struct file_handle *fh = fh_get_handle_by_filename(filename); struct pfm_read_info inf; struct dictionary *dict = pfm_read_dictionary(fh, &inf); SEXP ans = PROTECT(allocVector(VECSXP, dict->nvar)); SEXP ans_names = PROTECT(allocVector(STRSXP, dict->nvar)); union value *case_vals; int i; int ncases = 0; int N = 10; int nval = 0; int nvar_label; SEXP val_labels; SEXP variable_labels; SEXP miss_labels; int have_miss = 0; /* Set the fv and lv elements of all variables in the dictionary. */ for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; v->fv = nval; nval += v->nv; } dict->nval = nval; if (!nval) error(_("nval is 0")); case_vals = (union value *) R_alloc(dict->nval, sizeof(union value)); for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; if (v->get.fv == -1) continue; SET_STRING_ELT(ans_names, i, mkChar(dict->var[i]->name)); if (v->type == NUMERIC) { SET_VECTOR_ELT(ans, i, allocVector(REALSXP, N)); } else { SET_VECTOR_ELT(ans, i, allocVector(STRSXP, N)); case_vals[v->fv].c = (unsigned char *) R_alloc(v->width + 1, 1); ((char *) &case_vals[v->fv].c[0])[v->width] = '\0'; } } while(pfm_read_case(fh, case_vals, dict)) { if (ncases == N) { N *= 2; for (i = 0; i < dict->nvar; i++) { SEXP elt = VECTOR_ELT(ans, i); elt = lengthgets(elt, N); SET_VECTOR_ELT(ans, i, elt); } } for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; if (v->get.fv == -1) continue; if (v->type == NUMERIC) { REAL(VECTOR_ELT(ans, i))[ncases] = case_vals[v->fv].f; } else { SET_STRING_ELT(VECTOR_ELT(ans, i), ncases, mkChar((char *)case_vals[v->fv].c)); } } ++ncases; } if (N != ncases) { for (i = 0; i < dict->nvar; i++) { SEXP elt = VECTOR_ELT(ans, i); elt = lengthgets(elt, ncases); SET_VECTOR_ELT(ans, i, elt); } } fh_close_handle(fh); /* get all the value labels */ PROTECT(val_labels = getSPSSvaluelabels(dict)); namesgets(val_labels, ans_names); setAttrib(ans, install("label.table"), val_labels); UNPROTECT(1); /* get SPSS variable labels */ PROTECT(variable_labels = allocVector(STRSXP, dict->nvar)); nvar_label = 0; for (i = 0; i < dict->nvar; i++) { char *lab = dict->var[i]->label; if (lab != NULL) { nvar_label++; SET_STRING_ELT(variable_labels, i, mkChar(lab)); } } if (nvar_label > 0) { namesgets(variable_labels, ans_names); setAttrib(ans, install("variable.labels"), variable_labels); } UNPROTECT(1); /* report missingness */ PROTECT(miss_labels = getSPSSmissing(dict, &have_miss)); if(have_miss) { namesgets(miss_labels, duplicate(ans_names)); setAttrib(ans, install("missings"), miss_labels); } UNPROTECT(1); free_dictionary(dict); setAttrib(ans, R_NamesSymbol, ans_names); UNPROTECT(2); return ans; } static SEXP read_SPSS_SAVE(const char *filename) { struct file_handle *fh = fh_get_handle_by_filename(filename); struct sfm_read_info inf; struct dictionary *dict; SEXP ans; SEXP ans_names; union value *case_vals; int i; int nvar_label; int nval = 0; SEXP val_labels; SEXP variable_labels; SEXP miss_labels; int have_miss = 0; /* package multcomp has an example in which this does not get initialized */ inf.encoding = 0; dict = sfm_read_dictionary(fh, &inf); ans = PROTECT(allocVector(VECSXP, dict->nvar)); ans_names = PROTECT(allocVector(STRSXP, dict->nvar)); /* Set the fv and lv elements of all variables in the dictionary. */ for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; v->fv = nval; nval += v->nv; } dict->nval = nval; if (!nval) error(_("nval is 0")); case_vals = (union value *) R_alloc(dict->nval, sizeof(union value)); for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; if (v->get.fv == -1) continue; SET_STRING_ELT(ans_names, i, mkChar(dict->var[i]->name)); if (v->type == NUMERIC) { SET_VECTOR_ELT(ans, i, allocVector(REALSXP, inf.ncases)); } else { SET_VECTOR_ELT(ans, i, allocVector(STRSXP, inf.ncases)); case_vals[v->fv].c = (unsigned char *) R_alloc(v->width + 1, 1); ((char *) &case_vals[v->fv].c[0])[v->width] = '\0'; } } for (i = 0; i < inf.ncases; i++) { int j; sfm_read_case(fh, case_vals, dict); // should check return value for (j = 0; j < dict->nvar; j++) { struct variable *v = dict->var[j]; if (v->get.fv == -1) continue; if (v->type == NUMERIC) { REAL(VECTOR_ELT(ans, j))[i] = case_vals[v->fv].f; } else { SET_STRING_ELT(VECTOR_ELT(ans, j), i, mkChar((char *)case_vals[v->fv].c)); } } } sfm_maybe_close(fh); /* get all the value labels */ PROTECT(val_labels = getSPSSvaluelabels(dict)); namesgets(val_labels, duplicate(ans_names)); setAttrib(ans, install("label.table"), val_labels); UNPROTECT(1); /* get SPSS variable labels */ PROTECT(variable_labels = allocVector(STRSXP, dict->nvar)); nvar_label = 0; for (i = 0; i < dict->nvar; i++) { char *lab = dict->var[i]->label; if (lab != NULL) { nvar_label++; SET_STRING_ELT(variable_labels, i, mkChar(lab)); } } if (nvar_label > 0) { namesgets(variable_labels, ans_names); setAttrib(ans,install("variable.labels"), variable_labels); } UNPROTECT(1); /* report missingness */ PROTECT(miss_labels = getSPSSmissing(dict, &have_miss)); if(have_miss) { namesgets(miss_labels, duplicate(ans_names)); setAttrib(ans, install("missings"), miss_labels); } UNPROTECT(1); SEXP cpsym = install("codepage"); free_dictionary(dict); setAttrib(ans, R_NamesSymbol, ans_names); setAttrib(ans, cpsym, ScalarInteger(inf.encoding)); UNPROTECT(2); return ans; } extern int R_fgetc(FILE *stream); static size_t fread_pfm(void *ptr, size_t size, size_t nobj, FILE *stream) { size_t nbytes = size * nobj; size_t i; char *c_ptr = ptr; for (i = 0; i < nbytes; i++) { int c = fgetc(stream); if (c == '\r') { c = fgetc(stream); if ( c != '\n') { ungetc(c, stream); c = '\r'; } } if (c == '\n') fgetc(stream); if (c == EOF) break; *c_ptr++ = (char) c; } if (i % size != 0) { i -= i % size; } return i/size; } static int is_PORT(FILE *fp) { /* For now at least, just ignore the vanity splash strings. */ int trans_temp[256]; if (196 != fread_pfm(trans_temp, sizeof(char), 196, fp)) return 0; { unsigned char src[256]; int i; if (256 != fread_pfm(src, sizeof(char), 256, fp)) return 0; for (i = 0; i < 256; i++) trans_temp[i] = -1; /* 0 is used to mark untranslatable characters, so we have to mark it specially. */ trans_temp[src[64]] = 64; for (i = 0; i < 256; i++) { if (trans_temp[src[i]] == -1) trans_temp[src[i]] = i; } for (i = 0; i < 256; i++) { if (trans_temp[i] == -1) trans_temp[i] = 0; } } { unsigned char sig[9] = {92, 89, 92, 92, 89, 88, 91, 93, '\0'}; unsigned char buf[9]; int i; buf[8] = '\0'; if (8 != fread_pfm(buf, sizeof(char), 8, fp)) return 0; for (i = 0; i < 8; i++) { if (sig[i] != trans_temp[buf[i]]) return 0; } } return 1; } #include #include SEXP do_read_SPSS(SEXP file) { const char *filename = CHAR(PROTECT(asChar(file))); FILE *fp = fopen(R_ExpandFileName(filename), "rb"); char buf[5]; SEXP ans; if(!fp) error(_("unable to open file: '%s'"), strerror(errno)); if(fread_pfm(buf, sizeof(char), 4, fp) != 4) { fclose(fp); error(_("problem in reading file '%s'"), filename); } buf[4] = '\0'; if (0 == strncmp("$FL2", buf, 4)) { fclose(fp); ans = read_SPSS_SAVE(filename); } else { if (!is_PORT(fp)) { fclose(fp); error(_("file '%s' is not in any supported SPSS format"), filename); } fclose(fp); ans = read_SPSS_PORT(filename); } UNPROTECT(1); return ans; } void spss_init(void) { fh_init_files(); } foreign/src/file-handle.h0000644000175100001440000000650513245463577015057 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #if !file_handle_h #define file_handle_h 1 /* File handle provider (fhp). This module provides file handles in the form of file_handle structures to the dfm and sfm modules, which are known as file handle users (fhusers). fhp does not know anything about file contents. */ #include /* Record formats. */ enum { FH_RF_FIXED, /* Fixed length records. */ FH_RF_VARIABLE, /* Variable length records. */ FH_RF_SPANNED /* ? */ }; /* File modes. */ enum { FH_MD_CHARACTER, /* Character data. */ FH_MD_IMAGE, /* ? */ FH_MD_BINARY, /* Character and/or binary data. */ FH_MD_MULTIPUNCH, /* Column binary data (not supported). */ FH_MD_360 /* ? */ }; struct file_handle; /* Services that fhusers provide to fhp. */ struct fh_ext_class { int magic; /* Magic identifier for fhuser. */ const char *name; /* String identifier for fhuser. */ void (*close) (struct file_handle *); /* Closes any associated file, etc. */ }; /* A file location. */ struct file_locator { const char *filename; /* Filename. */ int line_number; /* Line number. */ }; /* Opaque structure. The `ext' member is an exception for use by subclasses. `where.ln' is also acceptable. */ struct file_handle { /* name must be the first member. */ const char *name; /* File handle identifier. */ char *norm_fn; /* Normalized filename. */ char *fn; /* Filename as provided by user. */ struct file_locator where; /* Used for reporting error messages. */ int recform; /* One of FH_RF_*. */ size_t lrecl; /* Length of records for FH_RF_FIXED. */ int mode; /* One of FH_MD_*. */ struct fh_ext_class *class; /* Polymorphism support. */ void *ext; /* Extension struct for fhuser use. */ }; /* All the file handles in the system. */ extern struct avl_tree *files; /* Pointer to the file handle that corresponds to data in the command file entered via BEGIN DATA/END DATA. */ extern struct file_handle *inline_file; /* Opening and closing handles. */ struct file_handle *fh_get_handle_by_name (const char name[9]); struct file_handle *fh_get_handle_by_filename (const char *filename); void fh_close_handle (struct file_handle *handle); /* Handle info. */ const char *fh_handle_name (struct file_handle *handle); char *fh_handle_filename (struct file_handle *handle); size_t fh_record_width (struct file_handle *handle); #endif /* !file_handle.h */ extern void fh_init_files(void); foreign/src/avl.h0000644000175100001440000000651713245463602013461 0ustar hornikusers/* libavl - manipulates AVL trees. Copyright (C) 1998-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ /* This is file avl.h in libavl, version 1.1.0. */ #if !avl_h #define avl_h 1 /* This stack size allows for AVL trees for between 5,704,880 and 4,294,967,295 nodes, depending on order of insertion. If you increase this it will require recoding some functions that assume one long is big enough for a bitmap. */ #ifndef AVL_MAX_HEIGHT #define AVL_MAX_HEIGHT 32 #endif /* Structure for a node in an AVL tree. */ typedef struct avl_node { void *data; /* Pointer to data. */ struct avl_node *link[2]; /* Subtrees. */ signed char bal; /* Balance factor. */ char cache; /* Used during insertion. */ signed char pad[2]; /* Unused. Reserved for threaded trees. */ } avl_node; /* Used for traversing an AVL tree. */ typedef struct avl_traverser { int init; /* Initialized? */ int nstack; /* Top of stack. */ const avl_node *p; /* Used for traversal. */ const avl_node *stack[AVL_MAX_HEIGHT];/* Descended trees. */ } avl_traverser; #define avl_traverser_init(TRAVERSER) (TRAVERSER).init = 0 /* Function types. */ #if !AVL_FUNC_TYPES #define AVL_FUNC_TYPES 1 typedef int (*avl_comparison_func) (const void *a, const void *b, void *param); typedef void (*avl_node_func) (void *data, void *param); typedef void *(*avl_copy_func) (void *data, void *param); #endif /* Structure which holds information about an AVL tree. */ typedef struct avl_tree { #if PSPP struct pool *pool; /* Pool to store nodes. */ #endif avl_node root; /* Tree root node. */ avl_comparison_func cmp; /* Used to compare keys. */ int count; /* Number of nodes in the tree. */ void *param; /* Arbitary user data. */ } avl_tree; #if PSPP #define MAYBE_POOL struct pool *pool, #else #define MAYBE_POOL /* nothing */ #endif /* General functions. */ avl_tree *R_avl_create (MAYBE_POOL avl_comparison_func, void *param); void R_avl_destroy (avl_tree *, avl_node_func); void R_avl_free (avl_tree *); int R_avl_count (const avl_tree *); #ifdef UNUSED avl_tree *R_avl_copy (MAYBE_POOL const avl_tree *, avl_copy_func); /* Walk the tree. */ void R_avl_walk (const avl_tree *, avl_node_func, void *param); void *R_avl_traverse (const avl_tree *, avl_traverser *); #endif /* Search for a given item. */ /* static void **R_avl_probe (avl_tree *, void *); void *R_avl_delete (avl_tree *, const void *); */ void *R_avl_find (const avl_tree *, const void *); void *R_avl_insert (avl_tree *tree, void *item); void *R_avl_replace (avl_tree *tree, void *item); #endif /* avl_h */ foreign/src/R_systat.c0000644000175100001440000005464014530663331014501 0ustar hornikusers/* * Copyright (C) 1990-1992, 2004 Roger Bivand * Patches (C) 2004 B. D. Ripley, 2020 R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include "foreign.h" #define MAXVARS 8192 /* maximum number of variables */ #define MAXLINES 50 /* number of history lines */ #define SYSLABSIZ 12 /* systat label size */ #define LABELSIZ 12 /* length of variable names and string values */ #define FORTBUF 128 /* apparent packet length in .sys files */ #define MYBUFSIZ 10*72 /* comment length */ #define DMIS -1.0e36 /* missing value */ struct SysAction { int _history; int _save; char *history[MAXLINES]; char fmt[4]; FILE *output; FILE *submit; }; #define ERRMES 256 /* maximum length of error message */ struct Header { short flag; /* non-zero for use */ short nv, /* no of variables */ nd, /* no of reals */ nk, /* no of strings */ mtype, /* type of file, rectangular=1 */ ntype; /* real type, float=1, double=2 */ char *comment; /* pointer to comment string */ char *lab[MAXVARS]; /* array of pointers to variable names */ FILE *fd; /* pointer to file being read/written */ char fname[ERRMES]; /* opened file name */ }; struct SysFilev3 { struct Header h; /* file header */ short ithstr[MAXVARS], /* array of indices to the i'th string variable */ ithdb[MAXVARS], /* array of indices to the i'th real variable */ str_offset[MAXVARS];/* for each ithstr[i], if i is undivided and does not terminate in octal 201:201 0, if terminates in 201:201 -1, else is equal to the number of bytes beyond 201:201 */ int local_offset[MAXVARS]; /* local offset for each variable from the beginning of each record */ int nobs, /* number of observations */ offset, /* offset from observation to observation */ pos; /* file position at first data record */ }; static void init_use(struct SysFilev3 *); static void getuse(const char *, struct SysFilev3 *); static void getlab(struct SysFilev3 *); static void closeuse(struct SysFilev3 *); static size_t getshort(short *, FILE *); static char *getvarnam(int, struct SysFilev3 *); static void getdbvar(int, double *, struct SysFilev3 *); static void getsvar(FILE *, char *s, short); static int getnv(struct SysFilev3 *use); static int getnd(struct SysFilev3 *use); static int getnk(struct SysFilev3 *use); static int isdb(int i, struct SysFilev3 *use); static int getmtype(struct SysFilev3 *use); static int isuse(struct SysFilev3 *use); static int getnobs(struct SysFilev3 *use); static int getdb(FILE *fd, short type, double *x); static int getoctal(int *o, FILE *fp); static size_t getshort(short *sh, FILE *fp); #include #include #include static void swapb(void *result, int size) { #ifdef WORDS_BIGENDIAN int i; char *p = result, tmp; if (size == 1) return; for (i = 0; i < size/2; i++) { tmp = p[i]; p[i] = p[size - i - 1]; p[size - i - 1] = tmp; } #endif } SEXP readSystat(SEXP file) { SEXP res, resnames, comment; int i, j, pc=0; struct SysFilev3 *use; char str[LABELSIZ+1], msg[256]; double *x; use = (struct SysFilev3 *) R_alloc(1, sizeof(struct SysFilev3)); init_use(use); getuse(CHAR(STRING_ELT(file, 0)), use); if (!(getmtype(use) == 1)) { snprintf(msg, 256, _("not a rectangular data file (%s mtype is %d)"), CHAR(STRING_ELT(file, 0)), getmtype(use)); error("%s", msg); } if ((getnd(use) + getnk(use)) != getnv(use)) error(_("mismatch in numbers of variables")); PROTECT(res = allocVector(VECSXP, getnv(use))); pc++; for (i = 0; i < getnv(use); i++) { if (isdb(i, use) == 0) SET_VECTOR_ELT(res, i, allocVector(REALSXP, getnobs(use))); else SET_VECTOR_ELT(res, i, allocVector(STRSXP, getnobs(use))); } PROTECT(resnames = allocVector(STRSXP, getnv(use))); pc++; for (i = 0; i < getnv(use); i++) SET_STRING_ELT(resnames, i, mkChar(getvarnam(i, use))); setAttrib(res, R_NamesSymbol, resnames); if (use->h.comment != NULL) { PROTECT(comment = allocVector(STRSXP, 1)); pc++; SET_STRING_ELT(comment, 0, mkChar(use->h.comment)); setAttrib(res, install("comment"), comment); } x = (double *) R_alloc(getnobs(use), sizeof(double)); for (i = 0; i < getnv(use); i++) { if (isdb(i, use) == 0) { getdbvar(i, x, use); for (j = 0; j < getnobs(use); j++) { if (x[j] == (double) DMIS) REAL(VECTOR_ELT(res, i))[j] = NA_REAL; else REAL(VECTOR_ELT(res, i))[j] = x[j]; } } else { for (j = 0; j < getnobs(use); j++) { if(fseek(use->h.fd, use->pos + 1L + (use->offset * j) + use->local_offset[i], SEEK_SET) != 0) error(_("file access error")); getsvar(use->h.fd, str, use->str_offset[use->ithstr[i]]); if (strncmp(str, " ", 12) != (int) 0) SET_STRING_ELT(VECTOR_ELT(res, i), j, mkChar(str)); else SET_STRING_ELT(VECTOR_ELT(res, i), j, NA_STRING); } } } closeuse(use); UNPROTECT(pc); return(res); } /* Initialises the values of the SysFilev3 structure */ static void init_use(struct SysFilev3 *use) { int i; use->h.nv = 0; use->h.nd = 0; use->h.nk = 0; use->h.mtype = 0; use->h.ntype = 0; use->h.comment = NULL; use->nobs = (int) 0; use->offset = (int) 0; use->pos = (int) 0; for (i = 0; i < MAXVARS; i++) { use->ithstr[i] = 0; use->ithdb[i] = 0; use->str_offset[i] = 0; use->local_offset[i] = 0; } use->h.flag = 0; } /* The function that extracts the information from the systat file to permit its manipulation, returns an alert message. The function calculates vital information concerning the oddities of the MS-Fortran sequential unformatted file definition, in particular the number of 128 byte blocks per record, and the positioning of string variables across block boundaries. It checks for data integrity by fseeking to the end of the file, and calculating that the number of observations is integer. */ static void getuse(const char *fname, struct SysFilev3 *u) { int i, j, k, db_offset_rec; int end; char tmp[ERRMES]; /* open systat file */ if ((u->h.fd = fopen(fname, "rb")) == NULL) error(_("cannot open file '%s'"), fname); strcpy(u->h.fname, fname); /* call getlab to collect file header */ getlab(u); j = 0; k = 0; for (i = 0; i < u->h.nv; i++) {/* number the respective real and string variables by the '$' in the string variables' names */ u->ithstr[i] = -1; u->ithdb[i] = -1; if(strrchr(u->h.lab[i], '$') == NULL) u->ithdb[i] = (short) j++; else u->ithstr[i] = (short) k++; } if (u->h.nd != j || u->h.nk != k) error(_("getuse: Failure in variable unpacking")); if(getoctal(&k, u->h.fd) != 1) error(_("getuse: File access error")); /* get the byte at the front of the first data record/packet */ if (k < 0201) u->offset = (int) k + 2; /* if less than octal 201 then one packet per record and record length is offset */ else if (k == 0201) { for (i = 0; k == 0201; i++) { /* if octal 201 then find the number of packets, since k stops being octal 201 at the last packet */ if(fseek(u->h.fd, (1 + FORTBUF), SEEK_CUR) != 0) error(_("getuse: File access error")); /* seek to beginning of next packet */ if(getoctal(&k, u->h.fd) != 1) error(_("getuse: File access error")); /* read k */ } u->offset = (int) k + 2 + (i*(FORTBUF+2)); /* once k is no longer octal 201, the offset will be k, plus its packet bytes, plus i times FORTBUF, the standard packet length plus i times two packet bytes */ if (u->h.nk > 0) { /* if there are string variables */ db_offset_rec = (u->h.nd % (FORTBUF / (u->h.ntype == 1 ? sizeof(float) : sizeof(double)))) * (u->h.ntype == 1 ? sizeof(float) : sizeof(double)); /* find the number of real values in the first packet in which strings begin, and multiply by their size in bytes */ for (i=0; i < u->h.nk ; i++) { /* for each string variable */ db_offset_rec += LABELSIZ; /* increment the packet pointer by LABELSIZ */ u->str_offset[i] = 0; if (db_offset_rec > FORTBUF) { /* if the packet pointer exceeds standard packet length then set the string offset to the remainder, and reset the packet pointer */ u->str_offset[i] = db_offset_rec % FORTBUF; db_offset_rec = u->str_offset[i]; } else if (db_offset_rec == FORTBUF) { /* if the packet pointer exceeds standard packet length then set the string offset to -1, and reset the packet pointer */ u->str_offset[i] = -1; db_offset_rec = 0; } } /* for each string variable */ } /* if there were string variables */ } /* k == 0201 */ else { snprintf(tmp, ERRMES, _("getuse: byte counter %o octal"), k); error("%s", tmp); } if(fseek(u->h.fd, 0L, SEEK_END) != 0) error(_("getuse: File access error")); /* seek to end of file */ end = (int) ftell(u->h.fd); /* and find value (int) */ i = 0; if(fseek(u->h.fd, -1L, SEEK_CUR) != 0) error("%s", _("getuse: File access error")); do { end--; i++; if(getoctal(&k, u->h.fd) != 1) { snprintf(tmp, ERRMES, "Getuse: failure reading byte %d", end); error("%s", tmp); } if(fseek(u->h.fd, -2L, SEEK_CUR) != 0) error(_("getuse: File access error")); } while (i < 512 && k == 000); if (i >= 512) error(_("getuse: terminal null block")); /* Backtrack from end of file over null bytes which the operating system may have inserted VMS in particular, but not more than a VAX block - normally just does loop once */ if (k != 0202) { snprintf(tmp, ERRMES, "Getuse: last byte = %o octal", k); error("%s", tmp); } /* seek back one byte and check k == 0202 */ if (((end - (u->pos)) % u->offset) != (int) 0) error(_("getuse: non-integer number of observations")); /* Check data integrity */ u->nobs = (end - (u->pos))/u->offset; /* calculate number of observations */ for (i=0, k=0; i < u->h.nv; i++) { /* for all variables calculate their offset from the beginning of the record and store in local_offset */ if (u->ithdb[i] > -1) { /* if a real */ u->local_offset[i] = (int) u->ithdb[i] * (u->h.ntype == 1 ? sizeof(float) : sizeof(double)) /* the easy part: number of variables times sizeof real in the file */ + (u->ithdb[i] / (FORTBUF / (u->h.ntype == 1 ? sizeof(float) : sizeof(double)))) * 2; /* the odd part: add two bytes for each intra-record packet boundary to the left of this variable */ } else { /* or a string */ u->local_offset[i] = (int) (u->h.nd*(u->h.ntype == 1 ? sizeof(float) : sizeof(double))) /* the reals */ + (u->h.nd / (FORTBUF / (u->h.ntype == 1 ? sizeof(float) : sizeof(double)))) * 2 /* and their packet boundaries */ + u->ithstr[i]*LABELSIZ /* the strings */ + k * 2; /* and their packet boundaries */ if(u->ithstr[i] >= 0 && u->str_offset[u->ithstr[i]] != 0) k++; /* count the number of packet boundaries passed within the strings */ } /* reals or strings */ } /* end of local offset calculation */ u->h.flag = 1; } /* getuse */ /* gets the header of a release 2 or 3 .sys file from the file pointed at by fd, returns an error description on failure, */ static void getlab(struct SysFilev3 *u) { char mes[ERRMES], tmp1[ERRMES]; char label[LABELSIZ+1], tmp[LABELSIZ+1]; char var[30]; int i, j, o, len, isDollar; strcpy(mes, _("getlab: File format unknown")); u->h.nd = 0; u->h.nk = 0; if((fseek(u->h.fd, 0L, SEEK_SET)) != 0) error(_("getlab: File access error")); /* move to file beginning */ if(getoctal(&o, u->h.fd) != 1 || o != 0113) { snprintf(tmp1, ERRMES, _("getlab: byte 0 = %o octal"), o); error("%s", tmp1); } /* read and throw away zeroth byte=0113 */ if(getoctal(&o, u->h.fd) != 1 || o != 006) { snprintf(tmp1, ERRMES, _("getlab: byte 1 = %o octal"), o); error("%s", tmp1); } /* read and throw away front of package byte=006, i.e. 3 shorts */ /* fread((short *) &u->h.nv, sizeof(short), 1, u->h.fd); */ if(getshort(&u->h.nv, u->h.fd) != 1) error(_("getlab: File access error")); if(getshort(&u->h.mtype, u->h.fd) != 1) error(_("getlab: File access error")); if(getshort(&u->h.ntype, u->h.fd) != 1) error(_("getlab: File access error")); if(getoctal(&o, u->h.fd) != 1 || o != 006) { snprintf(tmp1, ERRMES, _("getlab: byte 9 = %o octal"), o); error("%s", tmp1);} /* read and throw away end of package byte=006, i.e. 3 shorts */ if (u->h.ntype != 1 && u->h.ntype != 2) { /* i.e. version later than 2 */ /* test changed to accommodate MYSTAT 9/9/91 */ len = 0; do { isDollar = 0; if(getoctal(&o, u->h.fd) != 1 || o != 0110) { snprintf(tmp1, ERRMES, _("getlab: comment begin byte = %o"), o); error("%s", tmp1); } /* read and throw away front of package byte=0110, i.e. 72 chars */ for (j = 0; j < 72; j++, len++) { if(getoctal(&o, u->h.fd) != 1) { snprintf(tmp1, ERRMES, _("getlab: comment = %c"), o); error("%s", tmp1); } if (j == 0) isDollar = (o == '$'); } if(getoctal(&o, u->h.fd) != 1 || o != 0110) { snprintf(tmp1, ERRMES, _("getlab: comment end byte = %o"), o); error("%s", tmp1); } /* read and throw away end of package byte=0110, i.e. 72 chars */ } while (len >= 72 && !isDollar); /* until start of comment line is '$' */ /* removed Mar 2006 to avoid a problen with over-long comments if (len > 72) { combuf[len - 73] = '\0'; u->h.comment = (char *) R_alloc(len - 72, sizeof(char)); strncpy(u->h.comment, combuf, (len - 72)); } else u->h.comment = NULL; */ /* If comment on record(s) before the one beginning with a $, allocate space and squirrel away */ if(getoctal(&o, u->h.fd) != 1 || o != 006) { snprintf(tmp1, ERRMES, _("getlab: byte nv0 = %o octal"), o); error("%s", tmp1); } /* read and throw away front of package byte=006, i.e. 3 shorts */ if(getshort(&u->h.nv, u->h.fd) != 1) error(_("getlab: File access error")); if(getshort(&u->h.mtype, u->h.fd) != 1) error(_("getlab: File access error")); if(getshort(&u->h.ntype, u->h.fd) != 1) error(_("getlab: File access error")); if(getoctal(&o, u->h.fd) != 1 || o != 006) { snprintf(tmp1, ERRMES, _("getlab: byte nv$ = %o octal"), o); error("%s", tmp1); } /* read and throw away end of package byte=006, i.e. 3 shorts */ } /* i.e. version later than 2 */ /* RSB 2004-10-22 */ if (u->h.nv > MAXVARS) error(_("file has more variables than this function can read")); for (j=0; jh.nv; j++) { /* since the number of variables is now known, read in their labels, allocating memory on the go */ if(getoctal(&o, u->h.fd) != 1 || o != 014) { snprintf(tmp1, ERRMES, _("getlab: byte lab[%d]0 = %o, nv=%d"), j, o, u->h.nv); error("%s", tmp1); } /* read and throw away front of package byte=014, i.e. LABELSIZ chars */ if(fread(label, 1, LABELSIZ, u->h.fd) != LABELSIZ) error(_("getlab: File access error")); /* read LABELSIZ chars into label */ label[LABELSIZ] = '\0'; /* terminate the string */ if(label[8] == '$') u->h.nk++; else if (strrchr(label, '$') != NULL) { u->h.nk++; snprintf(mes, ERRMES, _("$ not in variable label column 9: %s"), label); warning("%s", mes); } else u->h.nd++; /* if the ninth char in label is '$', it is a string variable, else a real variable */ for(i=0, o=0; label[i] != '\0'; i++) if(label[i] != ' ') tmp[o++] = label[i]; /* from left to right copy label into tmp until a blank is encountered */ tmp[o] = '\0'; /* terminate the string */ len = (int)strlen(tmp); snprintf(var, 30, "u->h.lab[%d]", j); u->h.lab[j] = (char *) R_alloc(len+1, sizeof(char)); strcpy(u->h.lab[j], tmp); /* allocate memory for the label, move it and point lab[j] at it */ if(getoctal(&o, u->h.fd) != 1 || o != 014) { snprintf(tmp1, ERRMES, _("getlab: byte lab[%d]$ = %o octal"), j, o); error("%s", tmp1); } /* read and throw away end of package byte=014, i.e. LABELSIZ chars */ } /* j */ u->pos = (int) ftell(u->h.fd); /* find current position, should be at packet boundary of first data record */ } /* getlab */ /* Function that closes the systat file in use */ static void closeuse(struct SysFilev3 *use) { if(use->h.flag != 0) fclose(use->h.fd); use->h.flag = 0; } /* closeuse */ #if 0 /* Function to return the number of a found variable name, or -1 if not found */ static int getvarno(char *name, struct SysFilev3 *use) { int i; if (use->h.flag != 1) return(-1); for (i=0; i < use->h.nv; i++) if(strcmp(name, use->h.lab[i]) == 0) return(i); return(-1); } #endif /* Function to return the number of variables, or -1 if not found */ static int getnv(struct SysFilev3 *use) { if (isuse(use) == 0) return(-1); return((int) use->h.nv); } /* Function to return the number of numerical variables, or -1 if not found */ static int getnd(struct SysFilev3 *use) { if (isuse(use) == 0) return(-1); return((int) use->h.nd); } /* Function to return the number of string variables, or -1 if not found */ static int getnk(struct SysFilev3 *use) { if (isuse(use) == 0) return(-1); return((int) use->h.nk); } /* returns the variable name for a given number, or NULL on error */ static char *getvarnam(int i, struct SysFilev3 *use) { if (isuse(use) == 0 || i >= use->h.nv) return(NULL); return(use->h.lab[i]); } /* says whether a given variable is a double (>=0) or a string (-1) */ static int isdb(int i, struct SysFilev3 *use) { if (use->ithdb[i] >= 0) return(0); else return(-1); } /* returns the current mtype - type of data file */ static int getmtype(struct SysFilev3 *use) { return((int) use->h.mtype); } /* says whether a systat file is in use */ static int isuse(struct SysFilev3 *use) { return((int) use->h.flag); } /* returns the number of observations in the currently open systat file */ static int getnobs(struct SysFilev3 *use) { if(isuse(use) == 0) return(-1); return((int) use->nobs); } /* gets a single observation on a real valued variable, from the file pointed at by fd, of type 1=float, 2=double, and puts it in the double pointed at by x. The values are assumed to be little-endian. */ static int getdb(FILE *fd, short type, double *x) { unsigned char fx[sizeof(float)]; unsigned char dx[sizeof(double)]; if (type == 1) { if(fread(fx, sizeof(float), 1, fd) != 1) return(1); swapb(fx, sizeof(float)); *x = (double) (*(float *) fx); /* and cast it */ } else { if(fread(dx, sizeof(double), 1, fd) != 1) return(1); swapb(dx, sizeof(double)); *x = *(double *) dx; } return(0); } /* getdb */ /* gets a single observation on a string valued variable, from the file pointed at by fd, puts it in the string pointed at by svalue, in accord with packet_bound - if the desired variable is undivided and does not terminate in octal 201:201 (the packet bound for observations exceeding 128 bytes) 0, if terminates in 201:201 -1, else is equal to the number of bytes beyond 201:201. */ static void getsvar(FILE *fd, char *svalue, short packet_bound) /* if the desired variable is undivided and does not terminate in octal 201:201 (the packet bound for observations exceeding 128 bytes) 0, if terminates in 201:201 -1, else is equal to the number of bytes beyond 201:201 */ { char tmp_str[9]; if (packet_bound <= 0) { /* string value not split */ if((fread(svalue, 1, LABELSIZ, fd)) != LABELSIZ) error(_("file access error"));/* read LABELSIZ chars */ svalue[LABELSIZ] = '\0'; } else { if((fread(tmp_str, 1, (LABELSIZ - packet_bound), fd)) != (LABELSIZ - packet_bound)) error(_("file access error")); /* read the LABELSIZ - packet_bound chars in this record */ tmp_str[LABELSIZ - packet_bound] = '\0'; strcpy(svalue, tmp_str); /* store in svalue */ if((fseek(fd, 2L, SEEK_CUR)) != 0) error(_("file access error")); /* hop over the packet boundary */ if((fread(tmp_str, 1, packet_bound, fd)) != packet_bound) error(_("file access error")); /* read the remaining packet_bound chars */ tmp_str[packet_bound] = '\0'; strcat(svalue, tmp_str); /* concatenate strings */ } } /* getsvar */ /* Get a whole double variable and put it in the array pointed at by db */ static void getdbvar(int varno, double *db, struct SysFilev3 *use) { int j, k; double x; if (use->ithdb[varno] < 0) error(_("string variable")); if((j = fseek(use->h.fd, use->pos+use->local_offset[varno]+1L, SEEK_SET)) != 0) error(_("file access error")); /* seek to first byte of this variable in first observation, pos is at beginning of record, thus we need pos + local offset for this variable + 1 to hop over front of packet byte */ k = 0; do { if((j = getdb(use->h.fd, use->h.ntype, &x)) != 0) break; *(db+k) = x; k++; /* get value */ } while ((j = fseek(use->h.fd, (use->h.ntype == 1 ? use->offset - (int) sizeof(float) : use->offset - (int) sizeof(double)), SEEK_CUR)) == 0 && k < use->nobs); /* seek forward offset to next observation minus length of real just read until all observations read */ if (j != 0) error(_("file access error")); } /* getdbvar */ /* gets a byte from fp, puts it in the int pointed at by o, returns 1 on success, otherwise != 1 */ static int getoctal(int *o, FILE *fp) { char c; size_t n; *o = 000; if ((n = fread(&c, sizeof(char), 1, fp)) != 1) return (int) n; else { *o = c & 0377; return (int) n; } } /* getoctal */ /* gets a short and points sh at it */ static size_t getshort(short *sh, FILE *fp) { size_t res; res = fread((char *)sh, sizeof(short), 1, fp); swapb(sh, sizeof(short)); return res; } foreign/src/pfm.h0000644000175100001440000000362113245463602013452 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #if !pfm_h #define pfm_h 1 /* Portable file manager (pfm). This module is in charge of reading and writing portable files. pfm is an fhuser, so see file-handle.h for the fhuser interface. */ /* Portable file types. */ enum { PFM_COMM, PFM_TAPE }; /* Information produced by pfm_read_dictionary() that doesn't fit into a dictionary struct. */ struct pfm_read_info { char creation_date[11]; /* `dd mm yyyy' plus a null. */ char creation_time[9]; /* `hh:mm:ss' plus a null. */ char product[61]; /* Product name plus a null. */ char subproduct[61]; /* Subproduct name plus a null. */ int ncases; /* -1 if unknown. */ }; struct dictionary; struct file_handle; union value; struct dictionary *pfm_read_dictionary (struct file_handle *, struct pfm_read_info *); int pfm_read_case (struct file_handle *, union value *, struct dictionary *); int pfm_write_dictionary (struct file_handle *, struct dictionary *); int pfm_write_case (struct file_handle *, const union value *elem); #endif /* !pfm_h */ foreign/src/sfmP.h0000644000175100001440000000414313245463602013575 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2001 Free Software Foundation, Inc. Written by Ben Pfaff . Modified 2000 Saikat DebRoy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ /* Record Type 1: General Information. */ struct sysfile_header { char rec_type[4]; /* Record-type code, "$FL2". */ char prod_name[60]; /* Product identification. */ R_int32 layout_code; /* 2. */ R_int32 case_size; /* Number of `value's per case. */ R_int32 compressed; /* 1=compressed, 0=not compressed. */ R_int32 weight_index; /* 1-based index of weighting var, or zero. */ R_int32 ncases; /* Number of cases, -1 if unknown. */ R_flt64 bias; /* Compression bias (100.0). */ char creation_date[9]; /* `dd mmm yy' creation date of file. */ char creation_time[8]; /* `hh:mm:ss' 24-hour creation time. */ char file_label[64]; /* File label. */ char padding[3]; /* Ignored padding. */ }; /* Record Type 2: Variable. */ struct sysfile_variable { R_int32 rec_type; /* 2. */ R_int32 type; /* 0=numeric, 1-255=string width, (allowed to be up to 65535 in 0.8-24) -1=continued string. */ R_int32 has_var_label; /* 1=has a variable label, 0=doesn't. */ R_int32 n_missing_values; /* Missing value code of -3,-2,0,1,2, or 3. */ R_int32 print; /* Print format. */ R_int32 write; /* Write format. */ char name[8]; /* Variable name. */ /* The rest of the structure varies. */ }; foreign/src/init.c0000644000175100001440000000405313245463577013641 0ustar hornikusers/* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2005 The R Development Core Team. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include void spss_init(void); SEXP Rdbfread(SEXP dbfnm); SEXP DoWritedbf(SEXP file, SEXP df, SEXP pr, SEXP sc, SEXP DataTypes); SEXP read_mtp(SEXP fname); SEXP readSystat(SEXP file); SEXP do_read_SPSS(SEXP file); SEXP xport_info(SEXP xportFile); SEXP xport_read(SEXP xportFile, SEXP xportInfo); SEXP do_readStata(SEXP call); SEXP do_writeStata(SEXP call); #define CDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_CMethodDef CEntries[] = { CDEF(spss_init, 0), {NULL, NULL, 0} }; #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_CallMethodDef CallEntries[] = { CALLDEF(Rdbfread, 1), CALLDEF(DoWritedbf, 5), CALLDEF(read_mtp, 1), CALLDEF(readSystat, 1), CALLDEF(do_read_SPSS, 1), CALLDEF(xport_info, 1), CALLDEF(xport_read, 2), {NULL, NULL, 0} }; #define EXTDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_ExternalMethodDef ExtEntries[] = { EXTDEF(do_readStata, 1), EXTDEF(do_writeStata, 4), {NULL, NULL, 0} }; #include void R_init_foreign(DllInfo *dll) { R_registerRoutines(dll, CEntries, CallEntries, NULL, ExtEntries); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); } foreign/src/swap_bytes.h0000644000175100001440000001017613665217361015060 0ustar hornikusers/* * * Reverse bytes in 2, 4 and 8 byte objects * * Copyright 2000 Saikat DebRoy * 2011-2020 R Development Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #ifndef SWAP_BYTES_H #define SWAP_BYTES_H #define swap_bytes_16(from, to) \ do { \ unsigned short __from16 = (from); \ (to) = (unsigned short) ((((__from16) >> 8) & 0xff) | (((__from16) & 0xff) << 8)); \ } while (0) #define swap_bytes_32(from, to) \ do { \ unsigned int __from32 = (from); \ (to) = (((__from32 & 0xff000000) >> 24) | \ ((__from32 & 0x00ff0000) >> 8) | \ ((__from32 & 0x0000ff00) << 8) | \ ((__from32 & 0x000000ff) << 24)); \ } while (0) #define swap_bytes_double(from, to) \ do { \ union { \ unsigned int u32[2]; \ double d; \ } __from, __to; \ __from.d = (from); \ swap_bytes_32(__from.u32[1], __to.u32[0]); \ swap_bytes_32(__from.u32[0], __to.u32[1]); \ (to) = __to.d; \ } while (0) #define swap_bytes_ushort(from, to) swap_bytes_16(from, to) #define reverse_ushort(x) swap_bytes_16(x, x) #define swap_bytes_short(from, to) \ do { \ union { \ unsigned short u16; \ short s16; \ } __from, __to; \ __from.s16 = (from); \ swap_bytes_16(__from.u16, __to.u16); \ (to) = __to.s16; \ } while (0) #define reverse_short(x) \ do { \ union { \ unsigned short u16; \ short s16; \ } __from, __to; \ __from.s16 = (x); \ swap_bytes_16(__from.u16, __to.u16); \ (x) = __to.s16; \ } while(0) #define swap_bytes_uint(from, to) swap_bytes_32(from, to) #define reverse_uint(x) swap_bytes_32(x, x) #define swap_bytes_int(from, to) \ do { \ union { \ unsigned int u32; \ int s32; \ } __from, __to; \ __from.s32 = (from); \ swap_bytes_32(__from.u32, __to.u32); \ (to) = __to.s32; \ } while(0) #define reverse_int(x) \ do { \ union { \ unsigned int u32; \ int s32; \ } __from, __to; \ __from.s32 = (x); \ swap_bytes_32(__from.u32, __to.u32); \ (x) = __to.s32; \ } while(0) #define swap_bytes_float(from, to) \ do { \ union { \ unsigned int u32; \ float f; \ } __from, __to; \ __from.f = (from); \ swap_bytes_32(__from.u32, __to.u32); \ (to) = __to.f; \ } while(0) #define reverse_float(x) \ do { \ union { \ unsigned int u32; \ float f; \ } __from, __to; \ __from.f = (x); \ swap_bytes_32(__from.u32, __to.u32); \ (x) = __to.f; \ } while(0) #define reverse_double(x) swap_bytes_double(x, x) #define reverse_bytes_4(b) \ do { \ unsigned char __t; \ unsigned char *__b = (b); \ __t = __b[0]; __b[0] = __b[3]; __b[3] = __t;\ __t = __b[1]; __b[1] = __b[2]; __b[2] = __t;\ } while(0) #define reverse_bytes_8(b) \ do { \ unsigned char __t; \ unsigned char *__b = (b); \ __t = __b[0]; __b[0] = __b[7]; __b[7] = __t;\ __t = __b[1]; __b[1] = __b[6]; __b[6] = __t;\ __t = __b[2]; __b[2] = __b[5]; __b[5] = __t;\ __t = __b[3]; __b[3] = __b[4]; __b[4] = __t;\ } while(0) #define reverse_bytes_float(x) reverse_bytes_4(x) #define reverse_bytes_double(x) reverse_bytes_8(x) #endif /* SWAP_BYTES_H */ foreign/src/sfm-read.c0000644000175100001440000013663114530662560014373 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign package by Saikat DebRoy Patches by the R Core Team 2001-2017. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #include #include #include #include #include #include #include "foreign.h" #include "avl.h" #include "file-handle.h" #include "format.h" #include "sfm.h" #include "sfmP.h" #include "var.h" #include /* Clamps A to be between B and C. */ #define range(A, B, C) \ ((A) < (B) ? (B) : ((A) > (C) ? (C) : (A))) /* Divides nonnegative X by positive Y, rounding up. */ #define DIV_RND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y)) /* Returns nonnegative difference between {nonnegative X} and {the least multiple of positive Y greater than or equal to X}. */ #if __GNUC__ && !__STRICT_ANSI__ #define REM_RND_UP(X, Y) \ (__extension__ \ ({ \ int rem = (X) % (Y); \ rem ? (Y) - rem : 0; \ })) #else #define REM_RND_UP(X, Y) \ ((X) % (Y) ? (Y) - (X) % (Y) : 0) #endif /* Rounds X up to the next multiple of Y. */ #define ROUND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y) * (Y)) /* Rounds X down to the previous multiple of Y. */ #define ROUND_DOWN(X, Y) \ ((X) / (Y) * (Y)) #undef DEBUGGING /*#define DEBUGGING 1*/ static double second_lowest_double_val(void) { /* PORTME: Set the value for second_lowest_value, which is the "second lowest" possible value for a double. This is the value for LOWEST on MISSING VALUES, etc. */ #if FPREP == FPREP_IEEE754 #ifdef WORDS_BIGENDIAN union { unsigned char c[8]; double d; } second_lowest = {{0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe}}; #else union { unsigned char c[8]; double d; } second_lowest = {{0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff}}; #endif return second_lowest.d; #else /* FPREP != FPREP_IEEE754 */ #error Unknown floating-point representation. #endif /* FPREP != FPREP_IEEE754 */ } /* PORTME: This file may require substantial revision for those systems that don't meet the typical 32-bit integer/64-bit double model. It's kinda hard to tell without having one of them on my desk. */ /* sfm's file_handle extension. */ struct sfm_fhuser_ext { FILE *file; /* Actual file. */ int opened; /* Reference count. */ struct dictionary *dict; /* File's dictionary. */ int reverse_endian; /* 1=file has endianness opposite us. */ int case_size; /* Number of `values's per case. */ int ncases; /* Number of cases, -1 if unknown. */ int compressed; /* 1=compressed, 0=not compressed. */ double bias; /* Compression bias, usually 100.0. */ int weight_index; /* 0-based index of weighting variable, or -1. */ /* File's special constants. */ R_flt64 sysmis; R_flt64 highest; R_flt64 lowest; /* Uncompression buffer. */ R_flt64 *buf; /* Buffer data. */ R_flt64 *ptr; /* Current location in buffer. */ R_flt64 *end; /* End of buffer data. */ /* Compression instruction octet. */ unsigned char x[sizeof (R_flt64)]; /* Current instruction octet. */ unsigned char *y; /* Location in current instruction octet. */ }; #ifndef Macintosh static struct fh_ext_class sfm_r_class; #else static void sfm_close (struct file_handle * h); static struct fh_ext_class sfm_r_class = { 3, "reading as a system file", sfm_close, }; #endif #if GLOBAL_DEBUGGING void dump_dictionary (struct dictionary * dict); #endif /* Utilities. */ #include "swap_bytes.h" /* bswap_int32(): Reverse the byte order of 32-bit integer *X. */ #define bswap_int32(x) reverse_int(*x) /* Reverse the byte order of 64-bit floating point *X. */ /* FIXME: it would be safer to read the floating point data as byte arrays and reverse the bytes before interpreting them as "double" */ #define bswap_flt64(x) reverse_double(*x) /* Closes a system file after we're done with it. */ static void sfm_close (struct file_handle * h) { struct sfm_fhuser_ext *ext = h->ext; ext->opened--; if (!(ext->opened == 0)) error("assert failed : ext->opened == 0"); R_Free (ext->buf); if (EOF == fclose (ext->file)) error(_("%s: Closing system file: %s"), h->fn, strerror (errno)); } /* Closes a system file if we're done with it. */ void sfm_maybe_close (struct file_handle *h) { struct sfm_fhuser_ext *ext = h->ext; if (ext->opened == 1) fh_close_handle (h); else ext->opened--; } /* Dictionary reader. */ static void *bufread (struct file_handle * handle, void *buf, size_t nbytes, size_t minalloc); static int read_header (struct file_handle * h, struct sfm_read_info * inf); static int parse_format_spec (struct file_handle * h, R_int32 s, struct fmt_spec * v, struct variable *vv); static int read_value_labels (struct file_handle * h, struct variable ** var_by_index); static int read_variables (struct file_handle * h, struct variable *** var_by_index); static int read_machine_int32_info (struct file_handle * h, int size, int count, int *encoding); static int read_machine_flt64_info (struct file_handle * h, int size, int count); static int read_long_var_names (struct file_handle * h, struct dictionary * , unsigned long size, unsigned int count); static int read_documents (struct file_handle * h); /* Displays the message X with corrupt_msg, then jumps to the lossage label. */ #define lose(X) \ do \ { \ warning X; \ goto lossage; \ } \ while (0) /* Calls bufread with the specified arguments, and jumps to lossage if the read fails. */ #define assertive_bufread(a,b,c,d) \ do \ { \ if (!bufread (a,b,c,d)) \ goto lossage; \ } \ while (0) /* Decrements the reference count for value label V. Destroys the value label if the reference count reaches zero. */ void free_value_label (struct value_label * v) { if (!(v->ref_count >= 1)) error("assert failed : v->ref_count >= 1"); if (--v->ref_count == 0) { R_Free (v->s); R_Free (v); } } /* R_Frees value label P. PARAM is ignored. Used as a callback with R_avl_destroy(). */ void free_val_lab (void *p, void *param) { free_value_label ((struct value_label *) p); } /* Destroys dictionary D. */ void free_dictionary (struct dictionary * d) { int i; d->n_splits = 0; R_Free (d->splits); d->splits = NULL; if (d->var_by_name) R_avl_destroy (d->var_by_name, NULL); for (i = 0; i < d->nvar; i++) { struct variable *v = d->var[i]; if (v->val_lab) { R_avl_destroy (v->val_lab, free_val_lab); v->val_lab = NULL; } if (v->label) { R_Free (v->label); v->label = NULL; } R_Free (d->var[i]); } R_Free (d->var); R_Free (d->label); R_Free (d->documents); R_Free (d); } /* Reads the dictionary from file with handle H, and returns it in a dictionary structure. This dictionary may be modified in order to rename, reorder, and delete variables, etc. */ struct dictionary * sfm_read_dictionary (struct file_handle * h, struct sfm_read_info * inf) { /* The file handle extension record. */ struct sfm_fhuser_ext *ext; /* Allows for quick reference to variables according to indexes relative to position within a case. */ struct variable **var_by_index = NULL; /* Check whether the file is already open. */ if (h->class == &sfm_r_class) { ext = h->ext; ext->opened++; return ext->dict; } else if (h->class != NULL) { error(_("cannot read file %s as system file: already opened for %s"), fh_handle_name (h), h->class->name); } #if 0 warning ("%s: Opening system-file handle %s for reading.", fh_handle_filename (h), fh_handle_name (h)); #endif /* Open the physical disk file. */ ext = (struct sfm_fhuser_ext *) R_Calloc(1, struct sfm_fhuser_ext); ext->file = fopen (R_ExpandFileName(h->norm_fn), "rb"); if (ext->file == NULL) { R_Free (ext); error(_("An error occurred while opening '%s' for reading as a system file: %s"), h->fn, strerror (errno)); } /* Initialize the sfm_fhuser_ext structure. */ h->class = &sfm_r_class; h->ext = ext; ext->dict = NULL; ext->buf = ext->ptr = ext->end = NULL; ext->y = ext->x + sizeof ext->x; ext->opened = 1; /* Default special constants. */ ext->sysmis = -DBL_MAX; ext->highest = DBL_MAX; ext->lowest = second_lowest_double_val(); /* Read the header. */ if (!read_header (h, inf)) goto lossage; /* Read about the variables. */ if (!read_variables (h, &var_by_index)) goto lossage; /* Handle weighting. */ if (ext->weight_index != -1) { struct variable *wv = var_by_index[ext->weight_index]; if (wv == NULL) lose ((_("%s: Weighting variable may not be a continuation of a long string variable"), h->fn)); else if (wv->type == ALPHA) lose ((_("%s: Weighting variable may not be a string variable"), h->fn)); strcpy (ext->dict->weight_var, wv->name); } else ext->dict->weight_var[0] = 0; /* Read records of types 3, 4, 6, and 7. */ for (;;) { R_int32 rec_type; assertive_bufread(h, &rec_type, sizeof rec_type, 0); if (ext->reverse_endian) bswap_int32 (&rec_type); switch (rec_type) { case 3: if (!read_value_labels (h, var_by_index)) goto lossage; break; case 4: lose ((_("%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records"), h->fn)); case 6: if (!read_documents (h)) goto lossage; break; case 7: { struct { R_int32 subtype; R_int32 size; R_int32 count; } data; int skip = 0; assertive_bufread(h, &data, sizeof data, 0); if (ext->reverse_endian) { bswap_int32 (&data.subtype); bswap_int32 (&data.size); bswap_int32 (&data.count); } /*if(data.size != sizeof(R_int32) && data.size != sizeof(R_flt64)) lose(("%s: Element size in record type 7, subtype %d, is " "not either the size of IN (%d) or OBS (%d); actual value " "is %d.", h->fn, data.subtype, sizeof(R_int32), sizeof(R_flt64), data.size)); */ switch (data.subtype) { /* subtypes as specified by PSPP documentation at https://www.gnu.org/software/pspp/pspp-dev/html_node/System-File-Format.html#System-File-Format */ case 3: /* Machine integer information */ if (!read_machine_int32_info (h, data.size, data.count, &(inf->encoding))) goto lossage; break; case 4: /* Machine floating point information */ if (!read_machine_flt64_info (h, data.size, data.count)) goto lossage; break; case 5: /* grouped variables */ skip = 1; break; case 6: /* some rarely used date information */ skip = 1; break; case 7: /* Multiple-response sets */ skip = 1; break; case 11: /*Variable Display Parameter Record */ skip = 1; break; case 12: /* UUID, rarely used */ skip = 1; break; case 13: /* long variable names. PSPP now has code for these that could be ported if someone is interested. */ if (!read_long_var_names(h, ext->dict, data.size, data.count)) goto lossage; break; case 14: /* Very Long String Record */ warning(_("%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables"), h->fn, data.subtype); skip = 1; break; case 16: /* Extended Number of Cases Record (64-bit integer to represent ncases rather than 32-bit in system file header) */ skip = 1; break; case 17: /* Data File Attributes Record */ skip = 1; break; case 18: /* Variable Attributes Records */ skip = 1; break; case 19: /* bninary multiple-response sets */ skip = 1; break; case 20: /* another codepage information */ skip = 1; break; case 21: /* Long String Value Labels Record */ warning(_("%s: Long string value labels record found (record type 7, subtype %d), but ignored"), h->fn, data.subtype); skip = 1; break; case 22: /* Long String Missing Values Record */ warning(_("%s: Long string missing values record found (record type 7, subtype %d), but ignored"), h->fn, data.subtype); skip = 1; break; case 24: /* XML that describes how data in the file should be displayed on-screen */ skip = 1; break; default: warning(_("%s: Unrecognized record type 7, subtype %d encountered in system file"), h->fn, data.subtype); skip = 1; } if (skip) { void *x = bufread (h, NULL, data.size * data.count, 0); if (x == NULL) goto lossage; R_Free (x); } } break; case 999: { R_int32 filler; assertive_bufread(h, &filler, sizeof filler, 0); goto break_out_of_loop; } default: lose ((_("%s: Unrecognized record type %d"), h->fn, rec_type)); } } break_out_of_loop: /* Come here on successful completion. */ #if DEBUGGING warning ("Read system-file dictionary successfully"); dump_dictionary (ext->dict); #endif R_Free (var_by_index); return ext->dict; lossage: /* Come here on unsuccessful completion. */ R_Free (var_by_index); fclose (ext->file); if (ext && ext->dict) free_dictionary (ext->dict); R_Free (ext); h->class = NULL; h->ext = NULL; error(_("error reading system-file header")); return NULL; } /* Read record type 7, subtype 3. */ static int read_machine_int32_info (struct file_handle * h, int size, int count, int *encoding) { struct sfm_fhuser_ext *ext = h->ext; R_int32 data[8]; int file_endian; int i; if (size != sizeof (R_int32) || count != 8) lose ((_("%s: Bad size (%d or count (%u) field on record type 7, subtype 3. Expected size %ld, count 8"), h->fn, size, count, sizeof (R_int32))); assertive_bufread(h, data, sizeof data, 0); if (ext->reverse_endian) for (i = 0; i < 8; i++) bswap_int32 (&data[i]); /* PORTME: Check floating-point representation. */ switch (FPREP) { case FPREP_IEEE754: if (data[4] != 1) lose ((_("%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats"), h->fn)); break; default: if (!(0)) error("assert failed : 0"); } /* PORTME: Check recorded file endianness against intuited file endianness. */ file_endian = endian; if (ext->reverse_endian) { if (file_endian == BIG) file_endian = LITTLE; else if (file_endian == LITTLE) file_endian = BIG; else if (!(0)) error("assert failed : 0"); } if ((file_endian == BIG) ^ (data[6] == 1)) lose ((_("%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)"), h->fn, file_endian == BIG ? "big-endian" : "little-endian", data[6] == 1 ? "big-endian" : (data[6] == 2 ? "little-endian" : "unknown"))); *encoding = data[7]; /* Removes a problem with SPSS 15 files, according to http://www.nabble.com/problem-loading-SPSS-15.0-save-files-t2726500.html We just deal with the cases we know are wrong (2 and 3 are OK). */ /* PORTME: Character representation code. */ if (data[7] == 1 || data[7] == 4) lose ((_("%s: File-indicated character representation code (%s) is not ASCII"), h->fn, data[7] == 1 ? "EBCDIC" : (data[7] == 4 ? "DEC Kanji" : "Unknown"))); if(data[7] >= 200) /* warning(_("%s: File-indicated character representation code (%d) looks like a Windows codepage"), h->fn, data[7]) */; else if(data[7] > 4) warning(_("%s: File-indicated character representation code (%d) is unknown"), h->fn, data[7]); return 1; lossage: return 0; } /* Read record type 7, subtype 4. */ static int read_machine_flt64_info (struct file_handle * h, int size, int count) { struct sfm_fhuser_ext *ext = h->ext; R_flt64 data[3]; int i; if (size != sizeof (R_flt64) || count != 3) lose ((_("%s: Bad size (%d) or count (%u) field on record type 7, subtype 4. Expected size %lu, count 8"), h->fn, size, count, sizeof (R_flt64))); assertive_bufread(h, data, sizeof data, 0); if (ext->reverse_endian) for (i = 0; i < 3; i++) bswap_flt64 (&data[i]); if (data[0] != SYSMIS || data[1] != DBL_MAX || data[2] != second_lowest_double_val()) { ext->sysmis = data[0]; ext->highest = data[1]; ext->lowest = data[2]; warning(_("%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g"), h->fn, (double) data[0], (double) SYSMIS, (double) data[1], (double) DBL_MAX, (double) data[2], (double) second_lowest_double_val()); } return 1; lossage: return 0; } /* Read record type 7, subtype 13. * long variable names */ static int read_long_var_names (struct file_handle * h, struct dictionary * dict , unsigned long size, unsigned int count) { char * data; struct variable ** lp; struct variable ** end; char * p; char * endp; char * val; if ((1 != size)||(0 == count)) { warning("%s: strange record info seen, size=%lu, count=%u" ", ignoring long variable names" , h->fn, size, count); return 0; } size *= count; data = R_Calloc (size +1, char); bufread(h, data, size, 0); /* parse */ end = &dict->var[dict->nvar]; p = data; do { if (0 != (endp = strchr(p, '\t'))) *endp = 0; /* put null terminator */ if (0 == (val = strchr(p, '='))) { warning("%s: no long variable name for variable '%s'", h->fn, p); } else { *val = 0; ++val; /* now, p is key, val is long name */ for (lp = dict->var; lp < end; ++lp) { if (!strcmp(lp[0]->name, p)) { strncpy(lp[0]->name, val, 64); lp[0]->name[64] = '\0'; break; } } if (lp >= end) { warning("%s: long variable name mapping '%s' to '%s'" "for variable which does not exist" , h->fn, p, val); } } //p = &endp[1]; /* put to next */ if(endp) p = endp + 1; } while (endp); R_Free(data); return 1; } static int read_header (struct file_handle * h, struct sfm_read_info * inf) { struct sfm_fhuser_ext *ext = h->ext; /* File extension strcut. */ struct sysfile_header hdr; /* Disk buffer. */ struct dictionary *dict; /* File dictionary. */ char prod_name[sizeof hdr.prod_name + 1]; /* Buffer for product name. */ int skip_amt = 0; /* Amount of product name to omit. */ int i; /* Create the dictionary. */ dict = ext->dict = R_Calloc (1, struct dictionary); dict->var = NULL; dict->var_by_name = NULL; dict->nvar = 0; dict->N = 0; dict->nval = -1; /* Unknown. */ dict->n_splits = 0; dict->splits = NULL; dict->weight_var[0] = 0; dict->weight_index = -1; dict->filter_var[0] = 0; dict->label = NULL; dict->n_documents = 0; dict->documents = NULL; /* Read header, check magic. */ /* This does not allow for alignment assertive_bufread(h, &hdr, sizeof hdr, 0); */ assertive_bufread(h, &hdr.rec_type, 4, 0); assertive_bufread(h, &hdr.prod_name, 60, 0); assertive_bufread(h, &hdr.layout_code, 4, 0); assertive_bufread(h, &hdr.case_size, 4, 0); assertive_bufread(h, &hdr.compressed, 4, 0); assertive_bufread(h, &hdr.weight_index, 4, 0); assertive_bufread(h, &hdr.ncases, 4, 0); assertive_bufread(h, &hdr.bias, 8, 0); assertive_bufread(h, &hdr.creation_date, 9, 0); assertive_bufread(h, &hdr.creation_time, 8, 0); assertive_bufread(h, &hdr.file_label, 64, 0); assertive_bufread(h, &hdr.padding, 3, 0); if (0 != strncmp ("$FL2", hdr.rec_type, 4)) lose ((_("%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read"), h->fn)); /* Check eye-catcher string. */ memcpy (prod_name, hdr.prod_name, sizeof hdr.prod_name); for (i = 0; i < 60; i++) if (!isprint ((unsigned char) prod_name[i])) prod_name[i] = ' '; for (i = 59; i >= 0; i--) if (!isgraph ((unsigned char) prod_name[i])) { prod_name[i] = '\0'; break; } prod_name[60] = '\0'; { #define N_PREFIXES 2 static const char *prefix[N_PREFIXES] = { "@(#) SPSS DATA FILE", "SPSS SYSTEM FILE.", }; int i; for (i = 0; i < N_PREFIXES; i++) if (!strncmp (prefix[i], hdr.prod_name, strlen (prefix[i]))) { skip_amt = (int) strlen (prefix[i]); break; } } /* Check endianness. */ /* PORTME: endianness. */ if (hdr.layout_code == 2 || hdr.layout_code == 3) ext->reverse_endian = 0; else { bswap_int32 (&hdr.layout_code); if (hdr.layout_code != 2 && hdr.layout_code != 3) lose ((_("%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format"), h->fn, hdr.layout_code)); ext->reverse_endian = 1; bswap_int32 (&hdr.case_size); bswap_int32 (&hdr.compressed); bswap_int32 (&hdr.weight_index); bswap_int32 (&hdr.ncases); bswap_flt64 (&hdr.bias); } /* Copy basic info and verify correctness. */ ext->case_size = hdr.case_size; if (hdr.case_size <= 0 || ext->case_size > (INT_MAX / (int) sizeof (union value) / 2)) lose ((_("%s: Number of elements per case (%d) is not between 1 and %ld"), h->fn, hdr.case_size, INT_MAX / sizeof (union value) / 2)); ext->compressed = hdr.compressed; ext->weight_index = hdr.weight_index - 1; if (hdr.weight_index < 0 || hdr.weight_index > hdr.case_size) lose ((_("%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)"), h->fn, hdr.weight_index, ext->case_size)); ext->ncases = hdr.ncases; if (ext->ncases < -1 || ext->ncases > INT_MAX / 2) lose ((_("%s: Number of cases in file (%d) is not between -1 and %d"), h->fn, ext->ncases, INT_MAX / 2)); ext->bias = hdr.bias; if (ext->bias != 100.0) warning(_("%s: Compression bias (%g) is not the usual value of 100"), h->fn, ext->bias); /* Make a file label only on the condition that the given label is not all spaces or nulls. */ { int i; dict->label = NULL; for (i = sizeof hdr.file_label - 1; i >= 0; i--) if (!isspace ((unsigned char) hdr.file_label[i]) && hdr.file_label[i] != 0) { dict->label = R_Calloc (i + 2, char); memcpy (dict->label, hdr.file_label, i + 1); dict->label[i + 1] = 0; break; } } if (inf) { char *cp; memcpy (inf->creation_date, hdr.creation_date, 9); inf->creation_date[9] = 0; memcpy (inf->creation_time, hdr.creation_time, 8); inf->creation_time[8] = 0; if (!ext->reverse_endian) inf->endianness = endian; else inf->endianness = endian == BIG ? LITTLE : BIG; inf->compressed = hdr.compressed; inf->ncases = hdr.ncases; for (cp = &prod_name[skip_amt]; cp < &prod_name[60]; cp++) if (isgraph ((unsigned char) *cp)) break; strcpy (inf->product, cp); } return 1; lossage: return 0; } int cmp_variable (const void *a, const void *b, void *foo) { return strcmp (((struct variable *) a)->name, ((struct variable *) b)->name); } /* Reads most of the dictionary from file H; also fills in the associated VAR_BY_INDEX array. Note: the dictionary returned by this function has an invalid NVAL element, also the VAR[] array does not have the FV and LV elements set, however the NV elements *are* set. This is because the caller will probably modify the dictionary before reading it in from the file. Also, the get.* elements are set to appropriate values to allow the file to be read. */ static int read_variables (struct file_handle * h, struct variable *** var_by_index) { int i; struct sfm_fhuser_ext *ext = h->ext; /* File extension record. */ struct dictionary *dict = ext->dict; /* Dictionary being constructed. */ struct sysfile_variable sv; /* Disk buffer. */ int long_string_count = 0; /* # of long string continuation records still expected. */ int next_value = 0; /* Index to next `value' structure. */ /* Allocate variables. */ dict->var = R_Calloc (ext->case_size, struct variable *); *var_by_index = R_Calloc (ext->case_size, struct variable *); /* Read in the entry for each variable and use the info to initialize the dictionary. */ for (i = 0; i < ext->case_size; i++) { struct variable *vv; int j; assertive_bufread(h, &sv, sizeof sv, 0); if (ext->reverse_endian) { bswap_int32 (&sv.rec_type); bswap_int32 (&sv.type); bswap_int32 (&sv.has_var_label); bswap_int32 (&sv.n_missing_values); bswap_int32 (&sv.print); bswap_int32 (&sv.write); } if (sv.rec_type != 2) lose ((_("%s: position %d: Bad record type (%d); the expected value was 2"), h->fn, i, sv.rec_type)); /* If there was a long string previously, make sure that the continuations are present; otherwise make sure there aren't any. */ if (long_string_count) { if (sv.type != -1) lose ((_("%s: position %d: String variable does not have proper number of continuation records"), h->fn, i)); (*var_by_index)[i] = NULL; long_string_count--; continue; } else if (sv.type == -1) lose ((_("%s: position %d: Superfluous long string continuation record"), h->fn, i)); /* Check fields for validity. */ if (sv.type < 0 || sv.type > 255) lose ((_("%s: position %d: Bad variable type code %d"), h->fn, i, sv.type)); if (sv.has_var_label != 0 && sv.has_var_label != 1) lose ((_("%s: position %d: Variable label indicator field is not 0 or 1"), h->fn, i)); if (sv.n_missing_values < -3 || sv.n_missing_values > 3 || sv.n_missing_values == -1) lose ((_("%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3"), h->fn, i)); /* Construct internal variable structure, initialize critical bits. */ vv = (*var_by_index)[i] = dict->var[dict->nvar++] = R_Calloc (1, struct variable); vv->index = dict->nvar - 1; vv->foo = -1; vv->label = NULL; vv->val_lab = NULL; /* FIXME: much of this is incorrect if the file is encoded in a MBCS */ /* Copy first character of variable name. */ /* it seems in a comparison on 1338 SPSS files, that this is always a false positive: if (!isalpha ((unsigned char) sv.name[0]) && sv.name[0] != '@' && sv.name[0] != '#') lose ((_("%s: position %d: Variable name begins with invalid character"), h->fn, i)); if (islower ((unsigned char) sv.name[0])) warning(_("%s: position %d: Variable name begins with lowercase letter %c"), h->fn, i, sv.name[0]); */ if (sv.name[0] == '#') warning(_("%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files"), h->fn, i); vv->name[0] = (char) (sv.name[0]); /* Copy remaining characters of variable name. */ for (j = 1; j < 8; j++) { int c = (unsigned char) sv.name[j]; if (isspace (c)) break; else if (islower (c)) { /* it seems in a comparison on 1338 SPSS files, that this is always a false positive: warning(_("%s: position %d: Variable name character %d is lowercase letter %c"), h->fn, i, j + 1, sv.name[j]);*/ vv->name[j] = (char) (c); } else if (isalnum (c) || c == '.' || c == '@' || c == '#' || c == '$' || c == '_' || c > 127) vv->name[j] = (char) c; else lose ((_("%s: position %d: character `\\%03o' (%c) is not valid in a variable name"), h->fn, j, c, c)); /* changed from 'i', PR#14465 */ } vv->name[j] = 0; /* Set type, width, and `left' fields and allocate `value' indices. */ if (sv.type == 0) { vv->type = NUMERIC; vv->width = 0; vv->get.nv = 1; vv->get.fv = next_value++; vv->nv = 1; } else { vv->type = ALPHA; vv->width = sv.type; vv->nv = DIV_RND_UP (vv->width, MAX_SHORT_STRING); vv->get.nv = DIV_RND_UP (vv->width, sizeof (R_flt64)); vv->get.fv = next_value; next_value += vv->get.nv; long_string_count = vv->get.nv - 1; } vv->left = (vv->name[0] == '#'); /* Get variable label, if any. */ if (sv.has_var_label == 1) { /* Disk buffer. */ R_int32 len; /* Read length of label. */ assertive_bufread(h, &len, sizeof len, 0); if (ext->reverse_endian) bswap_int32 (&len); /* Check len. */ /* Changed from 255 in 0.8-24. No limit is really needed, so think of this as a sanity check */ if (len < 0 || len > 65535) lose ((_("%s: Variable %s indicates variable label of invalid length %d"), h->fn, vv->name, len)); /* Read label into variable structure. */ vv->label = bufread (h, NULL, ROUND_UP (len, sizeof (R_int32)), len + 1); if (vv->label == NULL) goto lossage; vv->label[len] = '\0'; } /* Set missing values. */ if (sv.n_missing_values != 0) { R_flt64 mv[3]; if (vv->width > MAX_SHORT_STRING) lose ((_("%s: Long string variable %s may not have missing values"), h->fn, vv->name)); assertive_bufread(h, mv, sizeof *mv * abs (sv.n_missing_values), 0); if (ext->reverse_endian && vv->type == NUMERIC) for (j = 0; j < abs (sv.n_missing_values); j++) bswap_flt64 (&mv[j]); if (sv.n_missing_values > 0) { vv->miss_type = sv.n_missing_values; if (vv->type == NUMERIC) for (j = 0; j < sv.n_missing_values; j++) vv->missing[j].f = mv[j]; else for (j = 0; j < sv.n_missing_values; j++) memcpy (vv->missing[j].s, &mv[j], vv->width); } else { int x = 0; if (vv->type == ALPHA) lose ((_("%s: String variable %s may not have missing values specified as a range"), h->fn, vv->name)); if (mv[0] == ext->lowest) { vv->miss_type = MISSING_LOW; vv->missing[x++].f = mv[1]; } else if (mv[1] == ext->highest) { vv->miss_type = MISSING_HIGH; vv->missing[x++].f = mv[0]; } else { vv->miss_type = MISSING_RANGE; vv->missing[x++].f = mv[0]; vv->missing[x++].f = mv[1]; } if (sv.n_missing_values == -3) { vv->miss_type += 3; vv->missing[x++].f = mv[2]; } } } else vv->miss_type = MISSING_NONE; if (!parse_format_spec (h, sv.print, &vv->print, vv)) goto lossage; /* We do not need this part in the if() condition: || !parse_format_spec (h, sv.write, &vv->write, vv)) as this produces some uncertainty about the format type given https://www.gnu.org/software/pspp/pspp-dev/html_node/Variable-Record.html#Variable-Record tells us on June 9, 2017: "A few system files have been observed in the wild with invalid write fields, in particular with value 0. Readers should probably treat invalid print or write fields as some default format. " */ } /* Some consistency checks. */ if (long_string_count != 0) lose ((_("%s: Long string continuation records omitted at end of dictionary"), h->fn)); if (next_value != ext->case_size) lose ((_("%s: System file header indicates %d variable positions but %d were read from file"), h->fn, ext->case_size, next_value)); dict->var = R_Realloc (dict->var, dict->nvar, struct variable *); /* Construct AVL tree of dictionary in order to speed up later processing and to check for duplicate varnames. */ dict->var_by_name = R_avl_create (cmp_variable, NULL); for (i = 0; i < dict->nvar; i++) if (NULL != R_avl_insert (dict->var_by_name, dict->var[i])) lose ((_("%s: Duplicate variable name `%s' within system file"), h->fn, dict->var[i]->name)); return 1; lossage: for (i = 0; i < dict->nvar; i++) { R_Free (dict->var[i]->label); R_Free (dict->var[i]); } R_Free (dict->var); if (dict->var_by_name) R_avl_destroy (dict->var_by_name, NULL); R_Free (dict); ext->dict = NULL; return 0; } /* Translates the format spec from sysfile format to internal format. */ static int parse_format_spec (struct file_handle *h, R_int32 s, struct fmt_spec *v, struct variable *vv) { if ((size_t) ((s >> 16) & 0xff) >= sizeof translate_fmt / sizeof *translate_fmt) lose ((_("%s: Bad format specifier byte (%d)"), h->fn, (s >> 16) & 0xff)); v->type = translate_fmt[(s >> 16) & 0xff]; v->w = (s >> 8) & 0xff; v->d = s & 0xff; /* FIXME? Should verify the resulting specifier more thoroughly. */ if (v->type == -1) lose ((_("%s: Bad format specifier byte (%d)"), h->fn, (s >> 16) & 0xff)); if ((vv->type == ALPHA) ^ ((formats[v->type].cat & FCAT_STRING) != 0)) lose ((_("%s: %s variable %s has %s format specifier %s"), h->fn, vv->type == ALPHA ? "String" : "Numeric", vv->name, formats[v->type].cat & FCAT_STRING ? "string" : "numeric", formats[v->type].name)); return 1; lossage: return 0; } /* Reads value labels from sysfile H and inserts them into the associated dictionary. */ int read_value_labels (struct file_handle * h, struct variable ** var_by_index) { struct sfm_fhuser_ext *ext = h->ext; /* File extension record. */ R_flt64 *raw_label = NULL; /* Array of raw label values. */ struct value_label **cooked_label = NULL; /* Array of cooked labels. */ R_int32 n_labels; /* Number of labels. */ struct variable **var = NULL; /* Associated variables. */ R_int32 n_vars; /* Number of associated variables. */ int i; /* First step: read the contents of the type 3 record and record its contents. Note that we can't do much with the data since we don't know yet whether it is of numeric or string type. */ /* Read number of labels. */ assertive_bufread(h, &n_labels, sizeof n_labels, 0); if (ext->reverse_endian) bswap_int32 (&n_labels); /* Allocate memory. */ raw_label = R_Calloc (n_labels, R_flt64); cooked_label = R_Calloc (n_labels, struct value_label *); for (i = 0; i < n_labels; i++) cooked_label[i] = NULL; /* But R_Calloc just zeroed it */ /* Read each value/label tuple. */ for (i = 0; i < n_labels; i++) { R_flt64 value; unsigned char label_len; int rem; /* Read value, label length. */ assertive_bufread(h, &value, sizeof value, 0); assertive_bufread(h, &label_len, 1, 0); memcpy (&raw_label[i], &value, sizeof value); /* Read label. */ cooked_label[i] = R_Calloc (1, struct value_label); cooked_label[i]->s = R_Calloc (label_len + 1, char); assertive_bufread(h, cooked_label[i]->s, label_len, 0); cooked_label[i]->s[label_len] = 0; /* Skip padding. */ rem = (int) REM_RND_UP (label_len + 1, sizeof (R_flt64)); if (rem) assertive_bufread(h, &value, rem, 0); } /* Second step: Read the type 4 record that has the list of variables to which the value labels are to be applied. */ /* Read record type of type 4 record. */ { R_int32 rec_type; assertive_bufread(h, &rec_type, sizeof rec_type, 0); if (ext->reverse_endian) bswap_int32 (&rec_type); if (rec_type != 4) lose ((_("%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought"), h->fn)); } /* Read number of variables associated with value label from type 4 record. */ assertive_bufread(h, &n_vars, sizeof n_vars, 0); if (ext->reverse_endian) bswap_int32 (&n_vars); if (n_vars < 1 || n_vars > ext->dict->nvar) lose ((_("%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)"), h->fn, n_vars, ext->dict->nvar)); /* Allocate storage. */ var = R_Calloc (n_vars, struct variable *); /* Read the list of variables. */ for (i = 0; i < n_vars; i++) { R_int32 var_index; struct variable *v; /* Read variable index, check range. */ assertive_bufread(h, &var_index, sizeof var_index, 0); if (ext->reverse_endian) bswap_int32 (&var_index); if (var_index < 1 || var_index > ext->case_size) lose ((_("%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)"), h->fn, var_index, ext->case_size)); /* Make sure it's a real variable. */ v = var_by_index[var_index - 1]; if (v == NULL) lose ((_("%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable"), h->fn, var_index)); if (v->type == ALPHA && v->width > MAX_SHORT_STRING) lose ((_("%s: Value labels are not allowed on long string variables (%s)"), h->fn, v->name)); /* Add it to the list of variables. */ var[i] = v; } /* Type check the variables. */ for (i = 1; i < n_vars; i++) if (var[i]->type != var[0]->type) lose ((_("%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type"), h->fn, var[0]->name, var[0]->type == ALPHA ? "string" : "numeric", var[i]->name, var[i]->type == ALPHA ? "string" : "numeric")); /* Create a value_label for each value/label tuple, now that we know the desired type. */ for (i = 0; i < n_labels; i++) { if (var[0]->type == ALPHA) { const int copy_len = min (sizeof (R_flt64), MAX_SHORT_STRING); memcpy (cooked_label[i]->v.s, (char *) &raw_label[i], copy_len); if (MAX_SHORT_STRING > copy_len) memset (&cooked_label[i]->v.s[copy_len], ' ', MAX_SHORT_STRING - copy_len); } else { cooked_label[i]->v.f = raw_label[i]; if (ext->reverse_endian) bswap_flt64 (&cooked_label[i]->v.f); } cooked_label[i]->ref_count = n_vars; } /* Assign the value_label's to each variable. */ for (i = 0; i < n_vars; i++) { struct variable *v = var[i]; int j; int width = v->width; /* Create AVL tree if necessary. */ if (!v->val_lab) v->val_lab = R_avl_create (val_lab_cmp, (void *) (void *) (void *) (void *) (void *) (void *) (void *) (void *) (void *) &width); /* Add each label to the variable. */ for (j = 0; j < n_labels; j++) { struct value_label *old = R_avl_replace (v->val_lab, cooked_label[j]); if (old == NULL) continue; if (var[0]->type == NUMERIC) warning(_("%s: File contains duplicate label for value %g for variable %s"), h->fn, cooked_label[j]->v.f, v->name); else warning(_("%s: File contains duplicate label for value `%.*s' for variable %s"), h->fn, v->width, cooked_label[j]->v.s, v->name); free_value_label (old); } } R_Free (cooked_label); R_Free (raw_label); R_Free (var); return 1; lossage: if (cooked_label) for (i = 0; i < n_labels; i++) if (cooked_label[i]) { R_Free (cooked_label[i]->s); R_Free (cooked_label[i]); } R_Free (raw_label); R_Free (var); return 0; } /* Reads NBYTES bytes from the file represented by H. If BUF is non-NULL, uses that as the buffer; otherwise allocates at least MINALLOC bytes. Returns a pointer to the buffer on success, NULL on failure. */ static void * bufread (struct file_handle * h, void *buf, size_t nbytes, size_t minalloc) { struct sfm_fhuser_ext *ext = h->ext; if (buf == NULL) buf = R_Calloc (max (nbytes, minalloc), char); if ((nbytes != 0) && (1 != fread (buf, nbytes, 1, ext->file))) { if (ferror (ext->file)) error(_("%s: Reading system file: %s"), h->fn, strerror (errno)); else error(_("%s: Unexpected end of file"), h->fn); return NULL; } return buf; } /* Reads a document record, type 6, from system file H, and sets up the documents and n_documents fields in the associated dictionary. */ static int read_documents (struct file_handle * h) { struct sfm_fhuser_ext *ext = h->ext; struct dictionary *dict = ext->dict; R_int32 n_lines; if (dict->documents != NULL) lose ((_("%s: System file contains multiple type 6 (document) records"), h->fn)); assertive_bufread(h, &n_lines, sizeof n_lines, 0); /* R change, see https://stat.ethz.ch/pipermail/r-devel/2008-July/050194.html */ if (ext->reverse_endian) bswap_int32 (&n_lines); dict->n_documents = n_lines; if (dict->n_documents <= 0) lose ((_("%s: Number of document lines (%d) must be greater than 0"), h->fn, dict->n_documents)); dict->documents = bufread (h, NULL, 80 * n_lines, 0); if (dict->documents == NULL) return 0; return 1; lossage: return 0; } #if GLOBAL_DEBUGGING #define DEBUGGING 1 #include "debug-print.h" /* Displays dictionary DICT on stdout. */ void dump_dictionary (struct dictionary * dict) { int i; printf ("dictionary:\n"); for (i = 0; i < dict->nvar; i++) { char print[32]; struct variable *v = dict->var[i]; int n, j; printf (" var %s", v->name); /*printf ("(indices:%d,%d)", v->index, v->foo);*/ printf("(type:%s,%d)", v->type == NUMERIC ? "num" : (v->type == ALPHA ? "str" : "!!!"), v->width); printf ("(fv:%d,%d)", v->fv, v->nv); /*printf ("(get.fv:%d,%d)", v->get.fv, v->get.nv);*/ printf ("(left:%s)(miss:", v->left ? "left" : "right"); switch (v->miss_type) { case MISSING_NONE: n = 0; printf ("none"); break; case MISSING_1: n = 1; printf ("one"); break; case MISSING_2: n = 2; printf ("two"); break; case MISSING_3: n = 3; printf ("three"); break; case MISSING_RANGE: n = 2; printf ("range"); break; case MISSING_LOW: n = 1; printf ("low"); break; case MISSING_HIGH: n = 1; printf ("high"); break; case MISSING_RANGE_1: n = 3; printf ("range+1"); break; case MISSING_LOW_1: n = 2; printf ("low+1"); break; case MISSING_HIGH_1: n = 2; printf ("high+1"); break; default: if (!(0)) warning("assert failed : 0"); } for (j = 0; j < n; j++) if (v->type == NUMERIC) printf (",%g", v->missing[j].f); else printf (",\"%.*s\"", v->width, v->missing[j].s); strcpy (print, fmt_to_string (&v->print)); printf (")(fmt:%s,%s)(lbl:%s)\n", print, fmt_to_string (&v->write), v->label ? v->label : "nolabel"); } } #endif /* Data reader. */ /* Reads compressed data into H->BUF and sets other pointers appropriately. Returns nonzero only if both no errors occur and data was read. */ static size_t buffer_input (struct file_handle * h) { struct sfm_fhuser_ext *ext = h->ext; size_t amt; if (ext->buf == NULL) ext->buf = R_Calloc (128, R_flt64); amt = fread (ext->buf, sizeof *ext->buf, 128, ext->file); if (ferror (ext->file)) { error(_("%s: Error reading file: %s"), h->fn, strerror (errno)); return 0; } ext->ptr = ext->buf; ext->end = &ext->buf[amt]; return amt; } /* Reads a single case consisting of compressed data from system file H into the array TEMP[] according to dictionary DICT, and returns nonzero only if successful. */ /* Data in system files is compressed in the following manner: data values are grouped into sets of eight; each of the eight has one instruction byte, which are output together in an octet; each byte gives a value for that byte or indicates that the value can be found following the instructions. */ static int read_compressed_data (struct file_handle * h, R_flt64 * temp) { struct sfm_fhuser_ext *ext = h->ext; const unsigned char *p_end = ext->x + sizeof (R_flt64); unsigned char *p = ext->y; const R_flt64 *temp_beg = temp; const R_flt64 *temp_end = &temp[ext->case_size]; for (;;) { for (; p < p_end; p++) switch (*p) { case 0: /* Code 0 is ignored. */ continue; case 252: /* Code 252 is end of file. */ if (temp_beg != temp) lose ((_("%s: Compressed data is corrupted. Data ends partway through a case"), h->fn)); goto lossage; case 253: /* Code 253 indicates that the value is stored explicitly following the instruction bytes. */ if (ext->ptr == NULL || ext->ptr >= ext->end) if (!buffer_input (h)) { lose ((_("%s: Unexpected end of file"), h->fn)); goto lossage; } memcpy (temp++, ext->ptr++, sizeof *temp); if (temp >= temp_end) goto winnage; break; case 254: /* Code 254 indicates a string that is all blanks. */ memset (temp++, ' ', sizeof *temp); if (temp >= temp_end) goto winnage; break; case 255: /* Code 255 indicates the system-missing value. */ *temp = ext->sysmis; if (ext->reverse_endian) bswap_flt64 (temp); temp++; if (temp >= temp_end) goto winnage; break; default: /* Codes 1 through 251 inclusive are taken to indicate a value of (BYTE - BIAS), where BYTE is the byte's value and BIAS is the compression bias (generally 100.0). */ *temp = *p - ext->bias; if (ext->reverse_endian) bswap_flt64 (temp); temp++; if (temp >= temp_end) goto winnage; break; } /* We have reached the end of this instruction octet. Read another. */ if (ext->ptr == NULL || ext->ptr >= ext->end) if (!buffer_input (h)) { if (temp_beg != temp) lose ((_("%s: Unexpected end of file"), h->fn)); goto lossage; } memcpy (ext->x, ext->ptr++, sizeof *temp); p = ext->x; } winnage: /* We have filled up an entire record. Update state and return successfully. */ ext->y = ++p; return 1; lossage: /* We have been unsuccessful at filling a record, either through i/o error or through an end-of-file indication. Update state and return unsuccessfully. */ return 0; } /* Reads one case from system file H into the value array PERM according to the instructions given in associated dictionary DICT, which must have the get.* elements appropriately set. Returns nonzero only if successful. */ int sfm_read_case (struct file_handle * h, union value * perm, struct dictionary * dict) { struct sfm_fhuser_ext *ext = h->ext; size_t nbytes; R_flt64 *temp; int i; /* Make sure the caller remembered to finish polishing the dictionary returned by sfm_read_dictionary(). */ if (!(dict->nval > 0)) error("assert failed : dict->nval > 0"); /* The first concern is to obtain a full case relative to the data file. (Cases in the data file have no particular relationship to cases in the active file.) */ nbytes = sizeof *temp * ext->case_size; temp = R_Calloc(ext->case_size, R_flt64); if (ext->compressed == 0) { size_t amt = fread (temp, 1, nbytes, ext->file); if (amt != nbytes) { if (ferror (ext->file)) error(_("%s: Reading system file: %s"), h->fn, strerror (errno)); else if (amt != 0) error(_("%s: Partial record at end of system file"), h->fn); goto lossage; } } else if (!read_compressed_data (h, temp)) goto lossage; /* Translate a case in data file format to a case in active file format. */ for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; if (v->get.fv == -1) continue; if (v->type == NUMERIC) { R_flt64 src = temp[v->get.fv]; if (ext->reverse_endian) bswap_flt64 (&src); perm[v->fv].f = src == ext->sysmis ? NA_REAL : src; } else memcpy (perm[v->fv].c, &temp[v->get.fv], v->width); } R_Free (temp); return 1; lossage: R_Free (temp); return 0; } #ifndef Macintosh static struct fh_ext_class sfm_r_class = { 3, "reading as a system file", sfm_close, }; #endif foreign/src/Rdbfwrite.c0000644000175100001440000000744513245463602014623 0ustar hornikusers/* Based on code in the shapelib.maptools.org library. * * First version for R's maptools package appears to be * Copyright 2000-2001 (c) Nicholas Lewin-Koh * * Changes for the foreign package * Copyright (C) 2004 the R Code Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include #include "shapefil.h" #include #include #include "foreign.h" static DBFHandle Rdbfwrite(DBFHandle, SEXP, SEXP, SEXP, SEXP); static char* nameMangleOut(char *dbfFldname, int len) { int i; for(i = 0; i < len; i++) if (dbfFldname[i] == '.') dbfFldname[i] = '_'; return dbfFldname; } SEXP DoWritedbf(SEXP file, SEXP df, SEXP pr, SEXP sc, SEXP DataTypes) { DBFHandle hDBF; if (!isValidString(file)) error (_("first argument must be a file name")); hDBF = DBFCreate(R_ExpandFileName(CHAR(STRING_ELT(file, 0)))); if (hDBF == NULL) error(_("unable to open file")); Rdbfwrite(hDBF, df, pr, sc, DataTypes); DBFClose(hDBF); return R_NilValue; } static DBFHandle Rdbfwrite(DBFHandle hDBF, SEXP df, SEXP pr, SEXP sc, SEXP DataTypes) { int i, iRecord, nflds, nrecs, itmp; int nWidth; char szTitle[12]; double rtmp; SEXP names = getAttrib(df, R_NamesSymbol), this; nflds = length(df); nrecs = length(VECTOR_ELT(df, 0)); for(i = 0; i < nflds; i++) { strncpy(szTitle, CHAR(STRING_ELT(names,i)), 11); szTitle[11] = '\0'; nWidth = INTEGER(pr)[i]; switch(CHAR(STRING_ELT(DataTypes, i))[0]) { case 'L': DBFAddField(hDBF, nameMangleOut(szTitle,11), FTLogical, nWidth, 0); break; case 'N': case 'F': if(TYPEOF(VECTOR_ELT(df, i)) == INTSXP) DBFAddField(hDBF, nameMangleOut(szTitle,11), FTInteger, nWidth, 0); else DBFAddField(hDBF, nameMangleOut(szTitle,11), FTDouble, nWidth, INTEGER(sc)[i]); break; case 'C': DBFAddField(hDBF, nameMangleOut(szTitle,11), FTString, nWidth, 0); break; case 'D': DBFAddField(hDBF, nameMangleOut(szTitle,11), FTDate, 8, 0); break; default: error(_("unknown data type")); break; } } for(iRecord = 0; iRecord < nrecs; iRecord++) { for(i = 0; i < nflds; i++) { switch(TYPEOF(VECTOR_ELT(df, i))) { case LGLSXP: itmp = LOGICAL(VECTOR_ELT(df, i))[iRecord]; if(itmp == NA_INTEGER) DBFWriteNULLAttribute(hDBF, iRecord, i); else DBFWriteLogicalAttribute(hDBF, iRecord, i, (itmp != 0) ? 'T' : 'F'); break; case INTSXP: itmp = INTEGER(VECTOR_ELT(df, i))[iRecord]; if(itmp == NA_INTEGER) DBFWriteNULLAttribute(hDBF, iRecord, i); else DBFWriteIntegerAttribute(hDBF, iRecord, i, itmp); break; case REALSXP: rtmp = REAL(VECTOR_ELT(df, i))[iRecord]; if(ISNAN(rtmp)) DBFWriteNULLAttribute(hDBF, iRecord, i); else DBFWriteDoubleAttribute(hDBF, iRecord, i, rtmp); break; case STRSXP: this = STRING_ELT(VECTOR_ELT(df,i), iRecord); if(this == NA_STRING) DBFWriteNULLAttribute(hDBF, iRecord, i); else DBFWriteStringAttribute(hDBF, iRecord, i, CHAR(this)); break; default: error(_("unknown data type")); break; } } } return(hDBF); } foreign/src/minitab.c0000644000175100001440000001153714167602217014314 0ustar hornikusers/* * Read Minitab portable data set format * * Copyright 1999-1999 Douglas M. Bates , * Saikat DebRoy * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include #include #include #include #include "foreign.h" #define MTP_BUF_SIZE 85 #define MTB_INITIAL_ENTRIES 10 typedef struct { int type; /* 3 = column, m = matrix, k = constant */ int cnum; /* column number in the Minitab worksheet */ int len; /* length of column */ int dtype; /* data type: 0 = numeric */ union { double *ndat; char **cdat; } dat; char name[9]; } MTBDATC, *MTB; #define Column 3 #define Matrix 4 #define Constant 2 static /* trim white space from end of string */ char *strtrim(char *str) { int i; for (i = (int) strlen(str) - 1; i >= 0 && isspace((int)str[i]); i--) str[i] = '\0'; return str; } static SEXP MTB2SEXP(MTB mtb[], int len) /* Create a list from a vector of MTB's and Free the MTB storage */ { SEXP ans = PROTECT(allocVector(VECSXP,len)), names = PROTECT(allocVector(STRSXP, len)); int i,j; for (i = 0; i < len; i++) { MTB thisRec = mtb[i]; SET_STRING_ELT(names, i, mkChar(thisRec->name)); switch(mtb[i]->dtype) { case 0: /* numeric data */ SET_VECTOR_ELT(ans, i, allocVector(REALSXP, mtb[i]->len)); Memcpy(REAL(VECTOR_ELT(ans, i)), mtb[i]->dat.ndat, mtb[i]->len); R_Free(mtb[i]->dat.ndat); break; default: if (mtb[i]->type == 4) { int nrow = mtb[i]->len / mtb[i]->dtype; int ncol = mtb[i]->dtype; SEXP aMatrix = PROTECT(allocMatrix(REALSXP,nrow,ncol)); for (j = 0; j < nrow*ncol; j++) { REAL(aMatrix)[j] = mtb[i]->dat.ndat[j]; } SET_VECTOR_ELT(ans, i, aMatrix); R_Free(mtb[i]->dat.ndat); UNPROTECT(1); } else { error(_("non-numeric data types are not yet implemented")); } } R_Free(mtb[i]); } R_Free(mtb); setAttrib(ans, R_NamesSymbol, names); UNPROTECT(2); return(ans); } #include #include SEXP read_mtp(SEXP fname) { FILE *f; char buf[MTP_BUF_SIZE], blank[1], *pres; MTB *mtb, thisRec; int i, j, res, nMTB = MTB_INITIAL_ENTRIES; PROTECT(fname = asChar(fname)); #ifdef WIN32 /* force text-mode read */ if ((f = fopen(R_ExpandFileName(CHAR(fname)), "rt")) == NULL) #else if ((f = fopen(R_ExpandFileName(CHAR(fname)), "r")) == NULL) #endif error(_("unable to open file '%s': '%s'"), CHAR(fname), strerror(errno)); if ((fgets(buf, MTP_BUF_SIZE, f) == NULL) || strncmp(buf, "Minitab Portable Worksheet ", 27) != 0) error(_("file '%s' is not in Minitab Portable Worksheet format"), CHAR(fname)); pres = fgets(buf, MTP_BUF_SIZE, f); if(pres != buf) error(_("file read error")); UNPROTECT(1); mtb = R_Calloc(nMTB, MTB); for (i = 0; !feof(f); i++) { if (i >= nMTB) { nMTB *= 2; mtb = R_Realloc(mtb, nMTB, MTB); } thisRec = mtb[i] = R_Calloc(1, MTBDATC); if (sscanf(buf, "%%%7d%7d%7d%7d%c%8c", &(thisRec->type), &(thisRec->cnum), &(thisRec->len), &(thisRec->dtype), blank, thisRec->name) != 6) error(_("first record for entry %d is corrupt"), i+1); thisRec->name[8] = '\0'; strtrim(thisRec->name); /* trim trailing white space on name */ switch (thisRec->dtype) { case 0: /* numeric data */ thisRec->dat.ndat = R_Calloc(thisRec->len, double); for (j = 0; j < thisRec->len; j++) { res = fscanf(f, "%lg", thisRec->dat.ndat + j); if(res == EOF) error(_("file read error")); } break; default: if (thisRec->type == 4) { /* we have a matrix so dtype is number of columns */ thisRec->dat.ndat = R_Calloc(thisRec->len, double); for (j = 0; j < thisRec->len; j++) { res = fscanf(f, "%lg", thisRec->dat.ndat + j); if(res == EOF) error(_("file read error")); } } else { error(_("non-numeric data types are not yet implemented")); } } pres = fgets(buf, MTP_BUF_SIZE, f); /* clear rest of current line */ if(pres != buf) error(_("file read error")); pres = fgets(buf, MTP_BUF_SIZE, f); /* load next line */ /* don't test here, as we test eof at end of loop */ } return MTB2SEXP(mtb, i); } foreign/src/format.c0000644000175100001440000002073614343565753014173 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #include #include #include "foreign.h" #include "format.h" #define DEFFMT(LABEL, NAME, N_ARGS, IMIN_W, IMAX_W, OMIN_W, OMAX_W, CAT, \ OUTPUT, SPSS_FMT) \ {NAME, N_ARGS, IMIN_W, IMAX_W, OMIN_W, OMAX_W, CAT, OUTPUT, SPSS_FMT}, struct fmt_desc formats[FMT_NUMBER_OF_FORMATS + 1] = { #include "pspp-format-def.h" {"", -1, -1, -1, -1, -1, 0000, -1, -1}, }; const int translate_fmt[40] = { -1, FMT_A, FMT_AHEX, FMT_COMMA, FMT_DOLLAR, FMT_F, FMT_IB, FMT_PIBHEX, FMT_P, FMT_PIB, FMT_PK, FMT_RB, FMT_RBHEX, -1, -1, FMT_Z, FMT_N, FMT_E, -1, -1, FMT_DATE, FMT_TIME, FMT_DATETIME, FMT_ADATE, FMT_JDATE, FMT_DTIME, FMT_WKDAY, FMT_MONTH, FMT_MOYR, FMT_QYR, FMT_WKYR, FMT_PCT, FMT_DOT, FMT_CCA, FMT_CCB, FMT_CCC, FMT_CCD, FMT_CCE, FMT_EDATE, FMT_SDATE, }; #if 0 int parse_format_specifier_name (const char **cp, int allow_xt) { struct fmt_desc *f; char *ep; int x; ep = ds_value (&tokstr); while (isalpha ((unsigned char) *ep)) ep++; x = *ep; *ep = 0; for (f = formats; f->name[0]; f++) if (!strcmp (f->name, ds_value (&tokstr))) { int indx = f - formats; *ep = x; if (cp) *cp = ep; if (!allow_xt && (indx == FMT_T || indx == FMT_X)) { error ("X and T format specifiers not allowed here.")); return -1; } return indx; } error ("%s is not a valid data format.", ds_value (&tokstr)); *ep = x; return -1; } #endif /* Converts F to its string representation (for instance, "F8.2") and returns a pointer to a static buffer containing that string. */ char * fmt_to_string (const struct fmt_spec *f) { static char buf[32]; if (formats[f->type].n_args >= 2) snprintf (buf, 32, "%s%d.%d", formats[f->type].name, f->w, f->d); else snprintf (buf, 32, "%s%d", formats[f->type].name, f->w); return buf; } int check_input_specifier (const struct fmt_spec *spec) { struct fmt_desc *f; char *str; f = &formats[spec->type]; str = fmt_to_string (spec); if (spec->type == FMT_X) return 1; if (f->cat & FCAT_OUTPUT_ONLY) { error(_("format %s may not be used as an input format"), f->name); return 0; } if (spec->w < f->Imin_w || spec->w > f->Imax_w) { error(_("input format %s specifies a bad width %d. Format %s requires a width between %d and %d"), str, spec->w, f->name, f->Imin_w, f->Imax_w); return 0; } if ((f->cat & FCAT_EVEN_WIDTH) && spec->w % 2) { error (_("input format %s specifies an odd width %d, but format %s requires an even width between %d and %d"), str, spec->w, f->name, f->Imin_w, f->Imax_w); return 0; } if (f->n_args > 1 && (spec->d < 0 || spec->d > 16)) { error (_("Input format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal places"), str, spec->d, f->name); return 0; } return 1; } int check_output_specifier (const struct fmt_spec *spec) { struct fmt_desc *f; char *str; f = &formats[spec->type]; str = fmt_to_string (spec); if (spec->type == FMT_X) return 1; if (spec->w < f->Omin_w || spec->w > f->Omax_w) { error (_("output format %s specifies a bad width %d. Format %s requires a width between %d and %d"), str, spec->w, f->name, f->Omin_w, f->Omax_w); return 0; } if (spec->d > 1 && (spec->type == FMT_F || spec->type == FMT_COMMA || spec->type == FMT_DOLLAR) && spec->w < f->Omin_w + 1 + spec->d) { error (_("output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %s"), f->name, f->Omin_w + 1 + spec->d, spec->d, f->name, f->Omin_w + 1 + spec->d, spec->d, str); return 0; } if ((f->cat & FCAT_EVEN_WIDTH) && spec->w % 2) { error (_("output format %s specifies an odd width %d, but output format %s requires an even width between %d and %d"), str, spec->w, f->name, f->Omin_w, f->Omax_w); return 0; } if (f->n_args > 1 && (spec->d < 0 || spec->d > 16)) { error (_("Output format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16"), str, spec->d, f->name); return 0; } return 1; } /* If a string variable has width W, you can't display it with a format specifier with a required width MIN_LEN>W. */ int check_string_specifier (const struct fmt_spec *f, int min_len) { if ((f->type == FMT_A && min_len > f->w) || (f->type == FMT_AHEX && min_len * 2 > f->w)) { error (_("cannot display a string variable of width %d with format specifier %s"), min_len, fmt_to_string (f)); return 0; } return 1; } void convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output) { output->type = formats[input->type].output; output->w = input->w; if (output->w > formats[output->type].Omax_w) output->w = formats[output->type].Omax_w; output->d = input->d; switch (input->type) { case FMT_F: case FMT_N: if (output->d > 1 && output->w < 2 + output->d) output->w = 2 + output->d; break; case FMT_E: output->w = max (max (input->w, input->d+7), 10); output->d = max (input->d, 3); break; case FMT_COMMA: case FMT_DOT: /* nothing is necessary */ break; case FMT_DOLLAR: case FMT_PCT: if (output->w < 2) output->w = 2; break; case FMT_PIBHEX: { static const int map[] = {4, 6, 9, 11, 14, 16, 18, 21}; if (input->w % 2 != 0 || input->w < 2 || input->w > 16) error("convert_fmt_ItoO : assert failed"); output->w = map[input->w / 2 - 1]; break; } case FMT_RBHEX: output->w = 8, output->d = 2; /* FIXME */ break; case FMT_IB: case FMT_PIB: case FMT_P: case FMT_PK: case FMT_RB: if (input->d < 1) output->w = 8, output->d = 2; else output->w = 9 + input->d; break; case FMT_CCA: case FMT_CCB: case FMT_CCC: case FMT_CCD: case FMT_CCE: error("convert_fmt_ItoO : invalid input->type : %d", input->type); case FMT_Z: case FMT_A: /* nothing is necessary */ break; case FMT_AHEX: output->w = input->w / 2; break; case FMT_DATE: case FMT_EDATE: case FMT_SDATE: case FMT_ADATE: case FMT_JDATE: /* nothing is necessary */ break; case FMT_QYR: if (output->w < 6) output->w = 6; break; case FMT_MOYR: /* nothing is necessary */ break; case FMT_WKYR: if (output->w < 8) output->w = 8; break; case FMT_TIME: case FMT_DTIME: case FMT_DATETIME: case FMT_WKDAY: case FMT_MONTH: /* nothing is necessary */ break; default: error("convert_fmt_ItoO : invalid input->type : %d", input->type); } } #if 0 int parse_format_specifier (struct fmt_spec *input, int allow_xt) { struct fmt_spec spec; struct fmt_desc *f; const char *cp; char *cp2; int type, w, d; if (token != T_ID) { error ("format specifier expected"); return 0; } type = parse_format_specifier_name (&cp, allow_xt); if (type == -1) return 0; f = &formats[type]; w = strtol (cp, &cp2, 10); if (cp2 == cp && type != FMT_X) { error ("Data format %s does not specify a width.", ds_value (&tokstr)); return 0; } cp = cp2; if (f->n_args > 1 && *cp == '.') { cp++; d = strtol (cp, &cp2, 10); cp = cp2; } else d = 0; if (*cp) { error ("Data format %s is not valid.", ds_value (&tokstr)); return 0; } lex_get (); spec.type = type; spec.w = w; spec.d = d; *input = spec; return 1; } #endif foreign/src/var.h0000644000175100001440000003777013245463574013504 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified 2000 Saikat DebRoy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #if !var_h #define var_h 1 #include "format.h" /* Values. */ /* Definition of the max length of a short string value, generally eight characters. */ #define MAX_SHORT_STRING 8 // ((SIZEOF_DOUBLE)>=8 ? ((SIZEOF_DOUBLE)+1)/2*2 : 8) #define MIN_LONG_STRING (MAX_SHORT_STRING+1) /* FYI: It is a bad situation if sizeof(R_flt64) < MAX_SHORT_STRING: then short string missing values can be truncated in system files because there's only room for as many characters as can fit in a R_flt64. */ #if MAX_SHORT_STRING > 8 #error MAX_SHORT_STRING must be less than 8. #endif /* VAR_NAME_LEN: the length of a variable. * SPSS supports names of 64 long */ #define VAR_NAME_LEN 64 /* Special values. */ #define SYSMIS (-DBL_MAX) #define LOWEST second_lowest_double_val() #define HIGHEST DBL_MAX /* Describes one value, which is either a floating-point number or a short string. */ union value { /* A numeric value. */ double f; /* A short-string value. */ unsigned char s[MAX_SHORT_STRING]; /* This member is used by data-in.c to return a string result, since it may need to return a long string. As currently implemented, it's a pointer to a static internal buffer in data-in.c. Also used by evaluate_expression() to return a string result. As currently implemented, it's a pointer to a dynamic buffer in the appropriate expression. Also used by the AGGREGATE procedure in handling string values. */ unsigned char *c; /* Sometimes we insert value's in a hash table. */ unsigned long hash[sizeof(double) / sizeof(long)]; }; /* Describes one value label. */ struct value_label { union value v; /* The value being labeled. */ char *s; /* Pointer to malloc()'d label. */ int ref_count; /* Reference count. */ }; /* Frequency tables. */ /* Frequency table entry. */ struct freq { union value v; /* The value. */ double c; /* The number of occurrences of the value. */ }; /* Types of frequency tables. */ enum { FRQM_GENERAL, FRQM_INTEGER }; /* Entire frequency table. */ struct freq_tab { int mode; /* FRQM_GENERAL or FRQM_INTEGER. */ /* General mode. */ struct avl_tree *tree; /* Undifferentiated data. */ /* Integer mode. */ double *vector; /* Frequencies proper. */ int min, max; /* The boundaries of the table. */ double out_of_range; /* Sum of weights of out-of-range values. */ double sysmis; /* Sum of weights of SYSMIS values. */ /* All modes. */ struct freq *valid; /* Valid freqs. */ int n_valid; /* Number of total freqs. */ struct freq *missing; /* Missing freqs. */ int n_missing; /* Number of missing freqs. */ /* Statistics. */ double total_cases; /* Sum of weights of all cases. */ double valid_cases; /* Sum of weights of valid cases. */ }; /* A complete set of 3 frequency tables. */ struct freq_tab_set { struct freq_tab miss; /* Includes user-missing values. */ struct freq_tab no_miss; /* Excludes user-missing values. */ struct freq_tab sel; /* Identical to either miss or no_miss. */ }; /* Procedures' private per-variable data. */ /* Structure name suffixes for private data: _proc: for a procedure (i.e., LIST -> list_proc). _trns: for a transformation (i.e., COMPUTE -> compute_trns. _pgm: for an input program (i.e., DATA LIST -> data_list_pgm). */ /* CROSSTABS private data. */ struct crosstab_proc { /* Integer mode only. */ int min; /* Minimum value. */ int max; /* Maximum value + 1. */ int count; /* max - min. */ }; /* FREQUENCIES private data. */ enum { frq_mean = 0, frq_semean, frq_median, frq_mode, frq_stddev, frq_variance, frq_kurt, frq_sekurt, frq_skew, frq_seskew, frq_range, frq_min, frq_max, frq_sum, frq_n_stats }; struct frequencies_proc { /* General mode. */ struct freq_tab tab; /* Frequencies table to use. */ /* Percentiles. */ int n_groups; /* Number of groups. */ double *groups; /* Groups. */ /* Statistics. */ double stat[frq_n_stats]; }; /* LIST private data. */ struct list_proc { int newline; /* Whether a new line begins here. */ int width; /* Field width. */ int vert; /* Whether to print the varname vertically. */ }; /* DESCRIPTIVES private data. Note that the DESCRIPTIVES procedure also has a transformation, descriptives_trns. */ enum { /* As these are used as bit indexes, there must be 32 or fewer. Be very careful in adjusting these, see the structure below and the table in descriptives.q. */ dsc_mean = 0, dsc_semean, dsc_stddev, dsc_variance, dsc_kurt, dsc_sekurt, dsc_skew, dsc_seskew, dsc_range, dsc_min, dsc_max, dsc_sum, dsc_n_stats }; struct descriptives_proc { /* Miscellaneous. */ int dup; /* Finds duplicates in list of variables. */ char zname[10]; /* Name for z-score variable. */ /* Counts. */ double valid, miss; /* Valid, missing--general. */ /* Mean, moments about the mean. */ double X_bar, M2, M3, M4; double min, max; /* Statistics. */ double stats[dsc_n_stats]; /* Everything glommed together. */ }; /* GET private data. */ struct get_proc { int fv, nv; /* First, last, # of values. */ }; /* Sort order. */ enum { SRT_ASCEND, /* A, B, C, ..., X, Y, Z. */ SRT_DESCEND /* Z, Y, X, ..., C, B, A. */ }; /* SORT CASES private data. */ struct sort_cases_proc { int order; /* SRT_ASCEND or SRT_DESCEND. */ }; /* MODIFY VARS private data. */ struct modify_vars_proc { char new_name[VAR_NAME_LEN +1]; /* Variable's new name. */ int drop_this_var; /* 0=keep this var, 1=drop this var. */ struct variable *next; /* Next in linked list. */ }; /* MEANS private data. */ struct means_proc { double min, max; /* Range for integer mode. */ }; /* Different types of variables for MATRIX DATA procedure. Order is important: these are used for sort keys. */ enum { MXD_SPLIT, /* SPLIT FILE variables. */ MXD_ROWTYPE, /* ROWTYPE_. */ MXD_FACTOR, /* Factor variables. */ MXD_VARNAME, /* VARNAME_. */ MXD_CONTINUOUS, /* Continuous variables. */ MXD_COUNT }; /* MATRIX DATA private data. */ struct matrix_data_proc { int vartype; /* Variable type. */ int subtype; /* Subtype. */ }; /* MATCH FILES private data. */ struct match_files_proc { struct variable *master; /* Corresponding master file variable. */ }; /* Script variables. */ /* Variable type. */ enum { NUMERIC, /* A numeric variable. */ ALPHA /* A string variable. (STRING is pre-empted by lexer.h) */ }; /* Types of missing values. Order is significant, see mis-val.c:parse_numeric(), sfm-read.c:sfm_read_dictionary() sfm-write.c:sfm_write_dictionary(), sysfile-info.c:cmd_sysfile_info(), mis-val.c:copy_missing_values(), pfm-read.c:read_variables(), pfm-write.c:write_variables(), apply-dict.c:cmd_apply_dictionary(), and more (?). */ enum { MISSING_NONE, /* No user-missing values. */ MISSING_1, /* One user-missing value. */ MISSING_2, /* Two user-missing values. */ MISSING_3, /* Three user-missing values. */ MISSING_RANGE, /* [a,b]. */ MISSING_LOW, /* (-inf,a]. */ MISSING_HIGH, /* (a,+inf]. */ MISSING_RANGE_1, /* [a,b], c. */ MISSING_LOW_1, /* (-inf,a], b. */ MISSING_HIGH_1, /* (a,+inf), b. */ MISSING_COUNT }; /* A variable's dictionary entry. Note: don't reorder name[] from the first element; a pointer to `variable' should be a pointer to member `name'.*/ struct variable { /* Required by parse_variables() to be in this order. */ char name[VAR_NAME_LEN +1]; /* As a string. */ int index; /* Index into its dictionary's var[]. */ int type; /* NUMERIC or ALPHA. */ int foo; /* Used for temporary storage. */ /* Also important but parse_variables() doesn't need it. Still, check before reordering. */ int width; /* Size of string variables in chars. */ int fv, nv; /* Index into `value's, number of values. */ int left; /* 0=do not LEAVE, 1=LEAVE. */ /* Missing values. */ int miss_type; /* One of the MISSING_* constants. */ union value missing[3]; /* User-missing value. */ /* Display formats. */ struct fmt_spec print; /* Default format for PRINT. */ struct fmt_spec write; /* Default format for WRITE. */ /* Labels. */ struct avl_tree *val_lab; /* Avltree of value_label structures. */ char *label; /* Variable label. */ /* Per-procedure info. */ struct get_proc get; union { struct crosstab_proc crs; struct descriptives_proc dsc; struct frequencies_proc frq; struct list_proc lst; struct means_proc mns; struct sort_cases_proc srt; struct modify_vars_proc mfv; struct matrix_data_proc mxd; struct match_files_proc mtf; } p; }; /* Cases. */ /* A single case. (This doesn't need to be a struct anymore, but it remains so for hysterical raisins.) */ struct ccase { union value data[1]; }; /* Dictionary. */ /* Complete dictionary state. */ struct dictionary { struct variable **var; /* Variable descriptions. */ struct avl_tree *var_by_name; /* Variables arranged by name. */ int nvar; /* Number of variables. */ int N; /* Current case limit (N command). */ int nval; /* Number of value structures per case. */ int n_splits; /* Number of SPLIT FILE variables. */ struct variable **splits; /* List of SPLIT FILE vars. */ char *label; /* File label. */ int n_documents; /* Number of lines of documents. */ char *documents; /* Documents; 80*n_documents bytes in size. */ int weight_index; /* `value' index of $WEIGHT, or -1 if none. Call update_weighting() before using! */ char weight_var[VAR_NAME_LEN];/* Name of WEIGHT variable. */ char filter_var[VAR_NAME_LEN];/* Name of FILTER variable. */ /* Do not make another field the last field! or see temporary.c:restore_dictionary() before doing so! */ }; /* This is the active file dictionary. */ extern struct dictionary default_dict; /* Transformation state. */ /* Default file handle for DATA LIST, REREAD, REPEATING DATA commands. */ extern struct file_handle *default_handle; /* PROCESS IF expression. */ extern struct expression *process_if_expr; /* TEMPORARY support. */ /* 1=TEMPORARY has been executed at some point. */ extern int temporary; /* If temporary!=0, the saved dictionary. */ extern struct dictionary *temp_dict; /* If temporary!=0, index into t_trns[] (declared far below) that gives the point at which data should be written out. -1 means that the data shouldn't be changed since all transformations are temporary. */ extern int temp_trns; /* If FILTER is active, whether it was executed before or after TEMPORARY. */ extern int FILTER_before_TEMPORARY; void cancel_temporary (void); /* Functions. */ int is_varname (const char *); int is_dict_varname (const struct dictionary *, const char *); /* Flags for passing to fill_all_vars(). */ enum { FV_NONE = 0, /* No flags. */ FV_NO_SYSTEM = 001, /* Don't include system variables. */ FV_NO_SCRATCH = 002 /* Don't include scratch variables. */ }; void fill_all_vars (struct variable ***, int *, int flags); int val_lab_cmp (const void *, const void *, void *); char *get_val_lab (const struct variable *, union value, int); void free_val_lab (void *, void *); void free_value_label (struct value_label *); struct avl_tree *copy_value_labels (struct avl_tree *); void dump_split_vars (const struct ccase *); int is_num_user_missing (double, const struct variable *); int is_str_user_missing (const unsigned char[], const struct variable *); int is_missing (const union value *, const struct variable *); int is_system_missing (const union value *, const struct variable *); int is_user_missing (const union value *, const struct variable *); void copy_missing_values (struct variable *dest, const struct variable *src); int cmp_variable (const void *, const void *, void *); #if GLOBAL_DEBUGGING struct variable *force_create_variable (struct dictionary *, const char *name, int type, int width); struct variable *force_dup_variable (struct dictionary *, const struct variable *src, const char *name); #else #define force_create_variable(A, B, C, D) \ create_variable (A, B, C, D) #define force_dup_variable(A, B, C) \ dup_variable (A, B, C) #endif struct variable *create_variable (struct dictionary *, const char *name, int type, int width); void delete_variable (struct dictionary *, struct variable *v); struct variable *find_variable (const char *name); struct variable *find_dict_variable (const struct dictionary *, const char *name); void init_variable (struct dictionary *, struct variable *, const char *name, int type, int width); void replace_variable (struct variable *, const char *name, int type, int width); void clear_variable (struct dictionary *, struct variable *); void rename_variable (struct dictionary *, struct variable *v, const char *new_name); void discard_variables (void); void clear_default_dict (void); void copy_variable (struct variable *dest, const struct variable *src); struct variable *dup_variable (struct dictionary *dict, const struct variable *src, const char *name); struct variable *update_weighting (struct dictionary *); void stop_weighting (struct dictionary *); struct dictionary *save_dictionary (void); void restore_dictionary (struct dictionary *); void free_dictionary (struct dictionary *); struct dictionary *new_dictionary (int copy); /* Transformations. */ /* Header for all transformations. */ struct trns_header { /* Index into t_trns[]. */ int index; /* Transformation proc. */ int (*proc) (struct trns_header *, struct ccase *); /* Garbage collector proc. */ void (*free) (struct trns_header *); }; /* Array of transformations */ extern struct trns_header **t_trns; /* Number of transformations, maximum number in array currently. */ extern int n_trns, m_trns; /* Index of first transformation that is really a transformation. Any transformations before this belong to INPUT PROGRAM. */ extern int f_trns; void add_transformation (struct trns_header *trns); void cancel_transformations (void); /* Variable parsers. */ /* Only parse_variables() supports options other than PV_APPEND, PV_SINGLE. */ enum { PV_NONE = 0, /* No options. */ PV_SINGLE = 0001, /* Restrict to a single varname or TO use. */ PV_DUPLICATE = 0002, /* Don't merge duplicates. */ PV_APPEND = 0004, /* Append to existing list. */ PV_NO_DUPLICATE = 0010, /* Error on duplicates. */ PV_NUMERIC = 0020, /* Vars must be numeric. */ PV_STRING = 0040, /* Vars must be string. */ PV_SAME_TYPE = 00100, /* All vars must be the same type. */ PV_NO_SCRATCH = 00200 /* Disallow scratch variables. */ }; struct variable *parse_variable (void); struct variable *parse_dict_variable (struct dictionary *); int parse_variables (struct dictionary *dict, struct variable ***v, int *nv, int pv_opts); int parse_DATA_LIST_vars (char ***names, int *nnames, int pv_opts); int parse_mixed_vars (char ***names, int *nnames, int pv_opts); #endif /* !var_h */ foreign/src/SASxport.c0000644000175100001440000004610014167602074014407 0ustar hornikusers/* * * Read SAS transport data set format * * Copyright 1999-1999 Douglas M. Bates , * Saikat DebRoy * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ #include #include #include #include #include #include #include "foreign.h" #include "SASxport.h" #define HEADER_BEG "HEADER RECORD*******" #define HEADER_TYPE_LIBRARY "LIBRARY " #define HEADER_TYPE_MEMBER "MEMBER " #define HEADER_TYPE_DSCRPTR "DSCRPTR " #define HEADER_TYPE_NAMESTR "NAMESTR " #define HEADER_TYPE_OBS "OBS " #define HEADER_END "HEADER RECORD!!!!!!!000000000000000000000000000000 " #define LIB_HEADER HEADER_BEG HEADER_TYPE_LIBRARY HEADER_END #define MEM_HEADER HEADER_BEG HEADER_TYPE_MEMBER \ "HEADER RECORD!!!!!!!000000000000000001600000000" #define DSC_HEADER HEADER_BEG HEADER_TYPE_DSCRPTR HEADER_END #define NAM_HEADER HEADER_BEG HEADER_TYPE_NAMESTR \ "HEADER RECORD!!!!!!!000000" #define OBS_HEADER HEADER_BEG HEADER_TYPE_OBS HEADER_END #define BLANK24 " " #define GET_RECORD(rec, fp, len) \ (int) fread((rec), sizeof(char), (size_t) (len), (fp)) #define IS_SASNA_CHAR(c) ((c) == 0x5f || (c) == 0x2e || \ (0x41 <= (c) && (c) <= 0x5a)) #ifndef NULL #define NULL ((void *) 0) #endif #define Two32 4294967296.0 static double get_IBM_double(char* c, size_t len) { /* Conversion from IBM 360 format to double */ /* * IBM format: * 6 5 0 * 3 1 0 * * SEEEEEEEMMMM ......... MMMM * * Sign bit, 7 bit exponent, 56 bit fraction. Exponent is * excess 64. The fraction is multiplied by a power of 16 of * the actual exponent. Normalized floating point numbers are * represented with the radix point immediately to the left of * the high order hex fraction digit. */ unsigned int i, upper, lower; /* exponent is expressed here as excess 70 (=64+6) to accomodate integer conversion of c[1] to c[4] */ char negative = c[0] & 0x80; // needs to be signed: char is not on Raspbian signed char exponent = (c[0] & 0x7f) - 70; double value; char buf[4], ibuf[8]; if (len < 2 || len > 8) error(_("invalid field length in numeric variable")); /* this effectively zero-pads c: */ memset(ibuf, 0, (size_t) 8); memcpy(ibuf, c, len); c = ibuf; /* check for missing value */ /* This isn't really right: NAs are ' ', '.', A-Z plus zero fill */ if (c[1] == '\0' && c[0] != '\0') return R_NaReal; /* convert c[1] to c[3] to an int */ buf[0] = '\0'; for (i = 1; i < 4; i++) buf[i] = c[i]; char_to_uint(buf, upper); /* convert c[4] to c[7] to an int */ for (i = 0; i < 4; i++) buf[i] = c[i + 4]; char_to_uint(buf, lower); /* initialize the constant if needed */ value = ((double) upper + ((double) lower)/Two32) * pow(16., (double) exponent); if (negative) value = -value; return value; } static int get_nam_header(FILE *fp, struct SAS_XPORT_namestr *namestr, int length) { char record[141]; int n; record[length] = '\0'; n = GET_RECORD(record, fp, length); if(n != length) return 0; char_to_short(record, namestr->ntype); char_to_short(record+2, namestr->nhfun); char_to_short(record+4, namestr->nlng); char_to_short(record+6, namestr->nvar0); memcpy(namestr->nname, record + 8, 8); memcpy(namestr->nlabel, record + 16, 40); memcpy(namestr->nform, record + 56, 8); char_to_short(record+64, namestr->nfl); char_to_short(record+66, namestr->nfd); char_to_short(record+68, namestr->nfj); memcpy(namestr->nfill, record + 70, 2); memcpy(namestr->niform, record + 72, 8); char_to_short(record+80, namestr->nifl); char_to_short(record+82, namestr->nifd); char_to_int(record+84, namestr->npos); return 1; } static int get_lib_header(FILE *fp, struct SAS_XPORT_header *head) { char record[81]; int n; n = GET_RECORD(record, fp, 80); /* GRW: Fail if not enough bytes OR wrong header record */ if(n != 80 || strncmp(LIB_HEADER, record, 80) != 0) error(_("file not in SAS transfer format")); n = GET_RECORD(record, fp, 80); if(n != 80) return 0; record[80] = '\0'; memcpy(head->sas_symbol[0], record, 8); memcpy(head->sas_symbol[1], record+8, 8); memcpy(head->saslib, record+16, 8); memcpy(head->sasver, record+24, 8); memcpy(head->sas_os, record+32, 8); if((strrchr(record+40, ' ') - record) != 63) return 0; memcpy(head->sas_create, record+64, 16); n = GET_RECORD(record, fp, 80); if(n != 80) return 0; record[80] = '\0'; memcpy(head->sas_mod, record, 16); /*GRW: The remaining field is an optional dataset label, which may contain data. */ /*if((strrchr(record+16, ' ') - record) != 79)*/ /*return 0;*/ return 1; } static int get_mem_header(FILE *fp, struct SAS_XPORT_member *member) { char record[81]; int n; n = GET_RECORD(record, fp, 80); if(n != 80 || strncmp(DSC_HEADER, record, 80) != 0) error(_("file not in SAS transfer format")); n = GET_RECORD(record, fp, 80); if(n != 80) return 0; record[80] = '\0'; memcpy(member->sas_symbol, record, 8); memcpy(member->sas_dsname, record+8, 8); memcpy(member->sasdata, record+16, 8); memcpy(member->sasver, record+24, 8); memcpy(member->sas_osname, record+32, 8); if((strrchr(record+40, ' ') - record) != 63) return 0; memcpy(member->sas_create, record+64, 16); n = GET_RECORD(record, fp, 80); if(n != 80) return 0; memcpy(member->sas_mod, record, 16); if((strrchr(record+16, ' ') - record) != 79) return 0; return 1; } static int init_xport_info(FILE *fp) { char record[81]; int n; int namestr_length; struct SAS_XPORT_header *lib_head; lib_head = R_Calloc(1, struct SAS_XPORT_header); if(!get_lib_header(fp, lib_head)) { R_Free(lib_head); error(_("SAS transfer file has incorrect library header")); } R_Free(lib_head); n = GET_RECORD(record, fp, 80); if(n != 80 || strncmp(MEM_HEADER, record, 75) != 0 || strncmp(" ", record+78, 2) != 0) error(_("file not in SAS transfer format")); record[78] = '\0'; sscanf(record+75, "%d", &namestr_length); return namestr_length; } static int init_mem_info(FILE *fp, char *name) { int length, n; char record[81]; char *tmp; struct SAS_XPORT_member *mem_head; mem_head = R_Calloc(1, struct SAS_XPORT_member); if(!get_mem_header(fp, mem_head)) { R_Free(mem_head); error(_("SAS transfer file has incorrect member header")); } n = GET_RECORD(record, fp, 80); record[80] = '\0'; if(n != 80 || strncmp(NAM_HEADER, record, 54) != 0 || (strrchr(record+58, ' ') - record) != 79) { R_Free(mem_head); error(_("file not in SAS transfer format")); } record[58] = '\0'; sscanf(record+54, "%d", &length); tmp = strchr(mem_head->sas_dsname, ' '); n = (int)(tmp - mem_head->sas_dsname); if(n > 0) { if (n > 8) n = 8; strncpy(name, mem_head->sas_dsname, n); name[n] = '\0'; } else name[0] = '\0'; R_Free(mem_head); return length; } static int next_xport_info(FILE *fp, int namestr_length, int nvars, int *headpad, int *tailpad, int *length, int *ntype, int *nlng, int *nvar0, SEXP nname, SEXP nlabel, SEXP nform, int *npos) { char *tmp; char record[81]; int i, n, totwidth, nlength, restOfCard; struct SAS_XPORT_namestr *nam_head; nam_head = R_Calloc(nvars, struct SAS_XPORT_namestr); for(i = 0; i < nvars; i++) { if(!get_nam_header(fp, nam_head+i, namestr_length)) { R_Free(nam_head); error(_("SAS transfer file has incorrect library header")); } } *headpad = 480 + nvars * namestr_length; i = *headpad % 80; if(i > 0) { i = 80 - i; if (fseek(fp, i, SEEK_CUR) != 0) { R_Free(nam_head); error(_("file not in SAS transfer format")); } (*headpad) += i; } n = GET_RECORD(record, fp, 80); if(n != 80 || strncmp(OBS_HEADER, record, 80) != 0) { R_Free(nam_head); error(_("file not in SAS transfer format")); } for(i = 0; i < nvars; i++) { int nname_len = 0, nlabel_len = 0, nform_len = 0; char tmpname[41]; ntype[i] = (int) ((nam_head[i].ntype == 1) ? REALSXP : STRSXP); nlng[i] = nam_head[i].nlng; nvar0[i] = nam_head[i].nvar0; npos[i] = nam_head[i].npos; /* Variable name */ nname_len = 8; while (nname_len && nam_head[i].nname[nname_len-1] == ' ') nname_len--; strncpy(tmpname, nam_head[i].nname, nname_len); tmpname[nname_len] = '\0'; SET_STRING_ELT(nname, i, mkChar(tmpname)); /* Variable label */ nlabel_len = 40; while (nlabel_len && nam_head[i].nlabel[nlabel_len-1] == ' ') nlabel_len--; strncpy(tmpname, nam_head[i].nlabel, nlabel_len); tmpname[nlabel_len] = '\0'; SET_STRING_ELT(nlabel, i, mkChar(tmpname)); /* Variable format name */ nform_len = 8; while (nform_len && nam_head[i].nform[nform_len-1] == ' ') nform_len--; strncpy(tmpname, nam_head[i].nform, nform_len); tmpname[nform_len] = '\0'; SET_STRING_ELT(nform, i, mkChar(tmpname)); } R_Free(nam_head); totwidth = 0; for(i = 0; i < nvars; i++) totwidth += nlng[i]; nlength = 0; tmp = R_Calloc(totwidth <= 80 ? 81 : (totwidth+1), char); restOfCard = 0; *tailpad = 0; while(!feof(fp)) { int allSpace = 1; fpos_t currentPos; /* restOfCard = 80 - (ftell(fp) % 80); */ if (fgetpos(fp, ¤tPos)) { error(_("problem accessing SAS XPORT file")); } n = GET_RECORD(tmp, fp, restOfCard); if (n != restOfCard) { allSpace = 0; } else { for (i = 0; i < restOfCard; i++) { if (tmp[i] != ' ') { allSpace = 0; break; } } } if (allSpace) { n = GET_RECORD(record, fp, 80); if (n < 1) { *tailpad = restOfCard; break; } if(n == 80 && strncmp(MEM_HEADER, record, 75) == 0 && strncmp(" ", record+78, 2) == 0) { *tailpad = restOfCard; record[78] = '\0'; sscanf(record+75, "%d", &namestr_length); break; } } else /* beware that the previous member can end on card * boundary with no padding */ if (restOfCard == 80 && n == 80 && strncmp(MEM_HEADER, tmp, 75) == 0 && strncmp(" ", tmp+78, 2) == 0) { strncpy(record, tmp, 80); *tailpad = 0; record[78] = '\0'; sscanf(record+75, "%d", &namestr_length); break; } if (fsetpos(fp, ¤tPos)) { error(_("problem accessing SAS XPORT file")); } n = GET_RECORD(tmp, fp, totwidth); if (n != totwidth) { if (!feof(fp)) { error(_("problem accessing SAS XPORT file")); } *tailpad = n; break; } restOfCard = (restOfCard >= totwidth)? (restOfCard - totwidth): (80 - (totwidth - restOfCard)%80); nlength++; } *length = nlength; R_Free(tmp); return (feof(fp)?-1:namestr_length); } /* * get the list element named str. */ static SEXP getListElement(SEXP list, char *str) { SEXP names; SEXP elmt = (SEXP) NULL; const char *tempChar; int i; names = getAttrib(list, R_NamesSymbol); for (i = 0; i < LENGTH(list); i++) { tempChar = CHAR(STRING_ELT(names, i)); if( strcmp(tempChar,str) == 0) { elmt = VECTOR_ELT(list, i); break; } } return elmt; } #define VAR_INFO_LENGTH 11 const char *cVarInfoNames[] = { "headpad", "type", "width", "index", "position", "name", "label", "format", "sexptype", "tailpad", "length" }; #define XPORT_VAR_HEADPAD(varinfo) VECTOR_ELT(varinfo, 0) #define XPORT_VAR_TYPE(varinfo) VECTOR_ELT(varinfo, 1) #define XPORT_VAR_WIDTH(varinfo) VECTOR_ELT(varinfo, 2) #define XPORT_VAR_INDEX(varinfo) VECTOR_ELT(varinfo, 3) #define XPORT_VAR_POSITION(varinfo) VECTOR_ELT(varinfo, 4) #define XPORT_VAR_NAME(varinfo) VECTOR_ELT(varinfo, 5) #define XPORT_VAR_LABEL(varinfo) VECTOR_ELT(varinfo, 6) #define XPORT_VAR_FORM(varinfo) VECTOR_ELT(varinfo, 7) #define XPORT_VAR_SEXPTYPE(varinfo) VECTOR_ELT(varinfo, 8) #define XPORT_VAR_TAILPAD(varinfo) VECTOR_ELT(varinfo, 9) #define XPORT_VAR_LENGTH(varinfo) VECTOR_ELT(varinfo, 10) #define SET_XPORT_VAR_HEADPAD(varinfo, val) SET_VECTOR_ELT(varinfo, 0, val) #define SET_XPORT_VAR_TYPE(varinfo, val) SET_VECTOR_ELT(varinfo, 1, val) #define SET_XPORT_VAR_WIDTH(varinfo, val) SET_VECTOR_ELT(varinfo, 2, val) #define SET_XPORT_VAR_INDEX(varinfo, val) SET_VECTOR_ELT(varinfo, 3, val) #define SET_XPORT_VAR_POSITION(varinfo, val) SET_VECTOR_ELT(varinfo, 4, val) #define SET_XPORT_VAR_NAME(varinfo, val) SET_VECTOR_ELT(varinfo, 5, val) #define SET_XPORT_VAR_LABEL(varinfo, val) SET_VECTOR_ELT(varinfo, 6, val) #define SET_XPORT_VAR_FORM(varinfo, val) SET_VECTOR_ELT(varinfo, 7, val) #define SET_XPORT_VAR_SEXPTYPE(varinfo, val) SET_VECTOR_ELT(varinfo, 8, val) #define SET_XPORT_VAR_TAILPAD(varinfo, val) SET_VECTOR_ELT(varinfo, 9, val) #define SET_XPORT_VAR_LENGTH(varinfo, val) SET_VECTOR_ELT(varinfo, 10, val) #include #include SEXP xport_info(SEXP xportFile) { FILE *fp; int i, namestrLength, memLength, ansLength; char dsname[9]; SEXP ans, ansNames, varInfoNames, varInfo; SEXP char_numeric, char_character; PROTECT(varInfoNames = allocVector(STRSXP, VAR_INFO_LENGTH)); for(i = 0; i < VAR_INFO_LENGTH; i++) SET_STRING_ELT(varInfoNames, i, mkChar(cVarInfoNames[i])); PROTECT(char_numeric = mkChar("numeric")); PROTECT(char_character = mkChar("character")); if(!isValidString(xportFile)) error(_("first argument must be a file name")); fp = fopen(R_ExpandFileName(CHAR(STRING_ELT(xportFile, 0))), "rb"); if (!fp) error(_("unable to open file: '%s'"), strerror(errno)); namestrLength = init_xport_info(fp); ansLength = 0; PROTECT(ans = allocVector(VECSXP, 0)); PROTECT(ansNames = allocVector(STRSXP, 0)); /*GRW: File may contain *empty* datasets, so don't rely on namestrLength==0 or memLength==0 to determine when to stop looping. */ while(!feof(fp)) { memLength = init_mem_info(fp, dsname); PROTECT(varInfo = allocVector(VECSXP, VAR_INFO_LENGTH)); setAttrib(varInfo, R_NamesSymbol, varInfoNames); SET_XPORT_VAR_TYPE(varInfo, allocVector(STRSXP, memLength)); SET_XPORT_VAR_WIDTH(varInfo, allocVector(INTSXP, memLength)); SET_XPORT_VAR_INDEX(varInfo, allocVector(INTSXP, memLength)); SET_XPORT_VAR_POSITION(varInfo, allocVector(INTSXP, memLength)); SET_XPORT_VAR_NAME(varInfo, allocVector(STRSXP, memLength)); SET_XPORT_VAR_LABEL(varInfo, allocVector(STRSXP, memLength)); SET_XPORT_VAR_FORM(varInfo, allocVector(STRSXP, memLength)); SET_XPORT_VAR_SEXPTYPE(varInfo, allocVector(INTSXP, memLength)); SET_XPORT_VAR_HEADPAD(varInfo, allocVector(INTSXP, 1)); SET_XPORT_VAR_TAILPAD(varInfo, allocVector(INTSXP, 1)); SET_XPORT_VAR_LENGTH(varInfo, allocVector(INTSXP, 1)); namestrLength = next_xport_info(fp, namestrLength, memLength, INTEGER(XPORT_VAR_HEADPAD(varInfo)), INTEGER(XPORT_VAR_TAILPAD(varInfo)), INTEGER(XPORT_VAR_LENGTH(varInfo)), INTEGER(XPORT_VAR_SEXPTYPE(varInfo)), INTEGER(XPORT_VAR_WIDTH(varInfo)), INTEGER(XPORT_VAR_INDEX(varInfo)), XPORT_VAR_NAME(varInfo), XPORT_VAR_LABEL(varInfo), XPORT_VAR_FORM(varInfo), INTEGER(XPORT_VAR_POSITION(varInfo))); for(i = 0; i < memLength; i++) { int *ntype = INTEGER(XPORT_VAR_SEXPTYPE(varInfo)); SET_STRING_ELT(XPORT_VAR_TYPE(varInfo), i, (ntype[i] == REALSXP) ? char_numeric : char_character); } PROTECT(ans = lengthgets(ans, ansLength+1)); PROTECT(ansNames = lengthgets(ansNames, ansLength+1)); /* PROTECT(newAns = allocVector(VECSXP, ansLength+1)); */ /* PROTECT(newAnsNames = allocVector(STRSXP, ansLength+1)); */ /* for(i = 0; i < ansLength; i++) { */ /* SET_VECTOR_ELT(newAns, i, VECTOR_ELT(ans, i)); */ /* SET_STRING_ELT(newAnsNames, i, STRING_ELT(ansNames, i)); */ /* } */ /* ans = newAns; */ /* ansNames = newAnsNames; */ SET_STRING_ELT(ansNames, ansLength, mkChar(dsname)); SET_VECTOR_ELT(ans, ansLength, varInfo); ansLength++; UNPROTECT(5); PROTECT(ans); PROTECT(ansNames); } setAttrib(ans, R_NamesSymbol, ansNames); UNPROTECT(5); fclose(fp); return ans; } SEXP xport_read(SEXP xportFile, SEXP xportInfo) { int i, j, k, n; int nvar; int ansLength, dataLength, totalWidth; int dataHeadPad, dataTailPad; int *dataWidth; int *dataPosition; SEXPTYPE *dataType; char *record, *tmpchar, *c; FILE *fp; SEXP ans, names, data, dataInfo, dataName; ansLength = LENGTH(xportInfo); PROTECT(ans = allocVector(VECSXP, ansLength)); names = getAttrib(xportInfo, R_NamesSymbol); setAttrib(ans, R_NamesSymbol, names); if(!isValidString(xportFile)) error(_("first argument must be a file name")); fp = fopen(R_ExpandFileName(CHAR(STRING_ELT(xportFile, 0))), "rb"); if (!fp) error(_("unable to open file: '%s'"), strerror(errno)); if (fseek(fp, 240, SEEK_SET) != 0) error(_("problem reading SAS XPORT file '%s'"), CHAR(STRING_ELT(xportFile, 0))); for(i = 0; i < ansLength; i++) { dataInfo = VECTOR_ELT(xportInfo, i); dataName = getListElement(dataInfo, "name"); nvar = LENGTH(dataName); dataLength = asInteger(getListElement(dataInfo, "length")); SET_VECTOR_ELT(ans, i, data = allocVector(VECSXP, nvar)); setAttrib(data, R_NamesSymbol, dataName); dataType = (SEXPTYPE *) INTEGER(getListElement(dataInfo, "sexptype")); for(j = 0; j < nvar; j++) SET_VECTOR_ELT(data, j, allocVector(dataType[j], dataLength)); dataWidth = INTEGER(getListElement(dataInfo, "width")); dataPosition = INTEGER(getListElement(dataInfo, "position")); totalWidth = 0; for(j = 0; j < nvar; j++) totalWidth += dataWidth[j]; record = R_Calloc(totalWidth + 1, char); dataHeadPad = asInteger(getListElement(dataInfo, "headpad")); dataTailPad = asInteger(getListElement(dataInfo, "tailpad")); fseek(fp, dataHeadPad, SEEK_CUR); for(j = 0; j < dataLength; j++) { n = GET_RECORD(record, fp, totalWidth); if(n != totalWidth) { error(_("problem reading SAS transport file")); } for(k = nvar-1; k >= 0; k--) { tmpchar = record + dataPosition[k]; if(dataType[k] == REALSXP) { REAL(VECTOR_ELT(data, k))[j] = get_IBM_double(tmpchar, dataWidth[k]); } else { tmpchar[dataWidth[k]] = '\0'; /* strip trailing blanks */ c = tmpchar + dataWidth[k]; while (c-- > tmpchar && *c == ' ') *c ='\0'; SET_STRING_ELT(VECTOR_ELT(data, k), j, (c < tmpchar) ? R_BlankString : mkChar(tmpchar)); } } } fseek(fp, dataTailPad, SEEK_CUR); R_Free(record); } UNPROTECT(1); fclose(fp); return ans; } foreign/src/dbfopen.c0000644000175100001440000014530514344111600014273 0ustar hornikusers/****************************************************************************** * * Project: Shapelib * Purpose: Implementation of .dbf access API documented in dbf_api.html. * Author: Frank Warmerdam, warmerdam@pobox.com * ****************************************************************************** * Copyright (c) 1999, Frank Warmerdam * * This software is available under the following "MIT Style" license, * or at the option of the licensee under the LGPL (see LICENSE.LGPL). This * option is discussed in more detail in shapelib.html. * * -- * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************** * * Revision 1.50 2003/04/21 18:58:25 warmerda * ensure current record is flushed at same time as header is updated * * Revision 1.49 2003/04/21 18:30:37 warmerda * added header write/update public methods * * Revision 1.48 2003/03/10 14:51:27 warmerda * DBFWrite* calls now return FALSE if they have to truncate * * Revision 1.47 2002/11/20 03:32:22 warmerda * Ensure field name in DBFGetFieldIndex() is properly terminated. * * Revision 1.46 2002/10/09 13:10:21 warmerda * Added check that width is positive. * * Revision 1.45 2002/09/29 00:00:08 warmerda * added FTLogical and logical attribute read/write calls * * Revision 1.44 2002/05/07 13:46:11 warmerda * Added DBFWriteAttributeDirectly(). * * Revision 1.43 2002/02/13 19:39:21 warmerda * Fix casting issues in DBFCloneEmpty(). * * Revision 1.42 2002/01/15 14:36:07 warmerda * updated email address * * Revision 1.41 2002/01/15 14:31:49 warmerda * compute rather than copying nHeaderLength in DBFCloneEmpty() * * Revision 1.40 2002/01/09 04:32:35 warmerda * fixed to read correct amount of header * * Revision 1.39 2001/12/11 22:41:03 warmerda * improve io related error checking when reading header * * Revision 1.38 2001/11/28 16:07:31 warmerda * Cleanup to avoid compiler warnings as suggested by Richard Hash. * * Revision 1.37 2001/07/04 05:18:09 warmerda * do last fix properly * * Revision 1.36 2001/07/04 05:16:09 warmerda * fixed fieldname comparison in DBFGetFieldIndex * * Revision 1.35 2001/06/22 02:10:06 warmerda * fixed NULL shape support with help from Jim Matthews * * Revision 1.33 2001/05/31 19:20:13 warmerda * added DBFGetFieldIndex() * * Revision 1.32 2001/05/31 18:15:40 warmerda * Added support for NULL fields in DBF files * * Revision 1.31 2001/05/23 13:36:52 warmerda * added use of SHPAPI_CALL * * Revision 1.30 2000/12/05 14:43:38 warmerda * DBReadAttribute() white space trimming bug fix * * Revision 1.29 2000/10/05 14:36:44 warmerda * fix bug with writing very wide numeric fields * * Revision 1.28 2000/09/25 14:18:07 warmerda * Added some casts of strlen() return result to fix warnings on some * systems, as submitted by Daniel. * * Revision 1.27 2000/09/25 14:15:51 warmerda * added DBFGetNativeFieldType() * * Revision 1.26 2000/07/07 13:39:45 warmerda * removed unused variables, and added system include files * * Revision 1.25 2000/05/29 18:19:13 warmerda * avoid use of uchar, and adding casting fix * * Revision 1.24 2000/05/23 13:38:27 warmerda * Added error checks on return results of fread() and fseek(). * * Revision 1.23 2000/05/23 13:25:49 warmerda * Avoid crashing if field or record are out of range in dbfread*attribute(). * * Revision 1.22 1999/12/15 13:47:24 warmerda * Added stdlib.h to ensure that atof() is prototyped. * * Revision 1.21 1999/12/13 17:25:46 warmerda * Added support for upper case .DBF extention. * * Revision 1.20 1999/11/30 16:32:11 warmerda * Use atof() instead of sscanf(). * * Revision 1.19 1999/11/05 14:12:04 warmerda * updated license terms * * Revision 1.18 1999/07/27 00:53:28 warmerda * ensure that whole old field value clear on write of string * * Revision 1.1 1999/07/05 18:58:07 warmerda * New * * Revision 1.17 1999/06/11 19:14:12 warmerda * Fixed some memory leaks. * * Revision 1.16 1999/06/11 19:04:11 warmerda * Remoted some unused variables. * * Revision 1.15 1999/05/11 03:19:28 warmerda * added new Tuple api, and improved extension handling - add from candrsn * * Revision 1.14 1999/05/04 15:01:48 warmerda * Added 'F' support. * * Revision 1.13 1999/03/23 17:38:59 warmerda * DBFAddField() now actually does return the new field number, or -1 if * it fails. * * Revision 1.12 1999/03/06 02:54:46 warmerda * Added logic to convert shapefile name to dbf filename in DBFOpen() * for convenience. * * Revision 1.11 1998/12/31 15:30:34 warmerda * Improved the interchangability of numeric and string attributes. Add * white space trimming option for attributes. * * Revision 1.10 1998/12/03 16:36:44 warmerda * Use r+b instead of rb+ for binary access. * * Revision 1.9 1998/12/03 15:34:23 warmerda * Updated copyright message. * * Revision 1.8 1997/12/04 15:40:15 warmerda * Added newline character after field definitions. * * Revision 1.7 1997/03/06 14:02:10 warmerda * Ensure bUpdated is initialized. * * Revision 1.6 1996/02/12 04:54:41 warmerda * Ensure that DBFWriteAttribute() returns TRUE if it succeeds. * * Revision 1.5 1995/10/21 03:15:12 warmerda * Changed to use binary file access, and ensure that the * field name field is zero filled, and limited to 10 chars. * * Revision 1.4 1995/08/24 18:10:42 warmerda * Added use of SfRealloc() to avoid pre-ANSI realloc() functions such * as on the Sun. * * Revision 1.3 1995/08/04 03:15:16 warmerda * Fixed up header. * * Revision 1.2 1995/08/04 03:14:43 warmerda * Added header. */ #include "shapefil.h" #include /* for NA_INTEGER, NA_REAL */ #include #include #include #include #include #include #include #if R_VERSION >= R_Version(2,7,0) # include #else # define R_atof atof #endif #ifndef FALSE # define FALSE 0 # define TRUE 1 #endif static int nStringFieldLen = 0; static char * pszStringField = NULL; /************************************************************************/ /* SfRealloc() */ /* */ /* A realloc cover function that will access a NULL pointer as */ /* a valid input. */ /************************************************************************/ static void * SfRealloc( void * pMem, int nNewSize ) { if( pMem == NULL ) return( (void *) malloc(nNewSize) ); else return( (void *) realloc(pMem,nNewSize) ); } /************************************************************************/ /* DBFWriteHeader() */ /* */ /* This is called to write out the file header, and field */ /* descriptions before writing any actual data records. This */ /* also computes all the DBFDataSet field offset/size/decimals */ /* and so forth values. */ /************************************************************************/ static void DBFWriteHeader(DBFHandle psDBF) { unsigned char abyHeader[XBASE_FLDHDR_SZ]; int i; if( !psDBF->bNoHeader ) return; psDBF->bNoHeader = FALSE; /* -------------------------------------------------------------------- */ /* Initialize the file header information. */ /* -------------------------------------------------------------------- */ for( i = 0; i < XBASE_FLDHDR_SZ; i++ ) abyHeader[i] = 0; abyHeader[0] = 0x03; /* memo field? - just copying */ /* write out a dummy date */ abyHeader[1] = 95; /* YY */ abyHeader[2] = 7; /* MM */ abyHeader[3] = 26; /* DD */ /* record count preset at zero */ abyHeader[8] = (unsigned char) (psDBF->nHeaderLength % 256); abyHeader[9] = (unsigned char) (psDBF->nHeaderLength / 256); abyHeader[10] = (unsigned char) (psDBF->nRecordLength % 256); abyHeader[11] = (unsigned char) (psDBF->nRecordLength / 256); /* -------------------------------------------------------------------- */ /* Write the initial 32 byte file header, and all the field */ /* descriptions. */ /* -------------------------------------------------------------------- */ fseek( psDBF->fp, 0, 0 ); if (fwrite( abyHeader, XBASE_FLDHDR_SZ, 1, psDBF->fp ) != 1) error("binary write error"); if (fwrite( psDBF->pszHeader, XBASE_FLDHDR_SZ, psDBF->nFields, psDBF->fp ) != psDBF->nFields) error("binary write error"); /* -------------------------------------------------------------------- */ /* Write out the newline character if there is room for it. */ /* -------------------------------------------------------------------- */ if( psDBF->nHeaderLength > 32*psDBF->nFields + 32 ) { char cNewline; cNewline = 0x0d; if (fwrite( &cNewline, 1, 1, psDBF->fp ) != 1) error("binary write error"); } } /************************************************************************/ /* DBFFlushRecord() */ /* */ /* Write out the current record if there is one. */ /************************************************************************/ static void DBFFlushRecord( DBFHandle psDBF ) { int nRecordOffset; if( psDBF->bCurrentRecordModified && psDBF->nCurrentRecord > -1 ) { psDBF->bCurrentRecordModified = FALSE; nRecordOffset = psDBF->nRecordLength * psDBF->nCurrentRecord + psDBF->nHeaderLength; fseek( psDBF->fp, nRecordOffset, 0 ); if (fwrite( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1) error("binary write error"); } } /************************************************************************/ /* DBFUpdateHeader() */ /************************************************************************/ void SHPAPI_CALL DBFUpdateHeader( DBFHandle psDBF ) { unsigned char abyFileHeader[32]; if( psDBF->bNoHeader ) DBFWriteHeader( psDBF ); DBFFlushRecord( psDBF ); fseek( psDBF->fp, 0, 0 ); if(fread( abyFileHeader, 32, 1, psDBF->fp ) != 1) error("binary read error"); abyFileHeader[4] = (unsigned char) (psDBF->nRecords % 256); abyFileHeader[5] = (unsigned char) ((psDBF->nRecords/256) % 256); abyFileHeader[6] = (unsigned char) ((psDBF->nRecords/(256*256)) % 256); abyFileHeader[7] = (unsigned char) ((psDBF->nRecords/(256*256*256)) % 256); fseek( psDBF->fp, 0, 0 ); if (fwrite( abyFileHeader, 32, 1, psDBF->fp ) != 1) error("binary write error"); fflush( psDBF->fp ); } /************************************************************************/ /* DBFOpen() */ /* */ /* Open a .dbf file. */ /************************************************************************/ DBFHandle SHPAPI_CALL DBFOpen( const char * pszFilename, const char * pszAccess ) { DBFHandle psDBF; unsigned char *pabyBuf; int nFields, nHeadLen, nRecLen, iField; /* -------------------------------------------------------------------- */ /* We only allow the access strings "rb" and "r+". */ /* -------------------------------------------------------------------- */ if( strcmp(pszAccess,"r") != 0 && strcmp(pszAccess,"r+") != 0 && strcmp(pszAccess,"rb") != 0 && strcmp(pszAccess,"rb+") != 0 && strcmp(pszAccess,"r+b") != 0 ) return( NULL ); if( strcmp(pszAccess,"r") == 0 ) pszAccess = "rb"; if( strcmp(pszAccess,"r+") == 0 ) pszAccess = "rb+"; /* Changed in 0.8-40 to use name as supplied */ psDBF = (DBFHandle) calloc( 1, sizeof(DBFInfo) ); psDBF->fp = fopen( pszFilename, pszAccess ); if( psDBF->fp == NULL ) { free( psDBF ); return( NULL ); } psDBF->bNoHeader = FALSE; psDBF->nCurrentRecord = -1; psDBF->bCurrentRecordModified = FALSE; /* -------------------------------------------------------------------- */ /* Read Table Header info */ /* -------------------------------------------------------------------- */ pabyBuf = (unsigned char *) malloc(500); if( fread( pabyBuf, 32, 1, psDBF->fp ) != 1 ) { fclose( psDBF->fp ); free( pabyBuf ); free( psDBF ); return NULL; } psDBF->nRecords = pabyBuf[4] + pabyBuf[5]*256 + pabyBuf[6]*256*256 + pabyBuf[7]*256*256*256; psDBF->nHeaderLength = nHeadLen = pabyBuf[8] + pabyBuf[9]*256; psDBF->nRecordLength = nRecLen = pabyBuf[10] + pabyBuf[11]*256; psDBF->nFields = nFields = (nHeadLen - 32) / 32; psDBF->pszCurrentRecord = (char *) malloc(nRecLen); /* -------------------------------------------------------------------- */ /* Read in Field Definitions */ /* -------------------------------------------------------------------- */ pabyBuf = (unsigned char *) SfRealloc(pabyBuf,nHeadLen); psDBF->pszHeader = (char *) pabyBuf; fseek( psDBF->fp, 32, 0 ); if( nHeadLen <= 32 || fread( pabyBuf, nHeadLen-32, 1, psDBF->fp ) != 1 ) { fclose( psDBF->fp ); free( pabyBuf ); free( psDBF ); return NULL; } psDBF->panFieldOffset = (int *) malloc(sizeof(int) * nFields); psDBF->panFieldSize = (int *) malloc(sizeof(int) * nFields); psDBF->panFieldDecimals = (int *) malloc(sizeof(int) * nFields); psDBF->pachFieldType = (char *) malloc(sizeof(char) * nFields); for( iField = 0; iField < nFields; iField++ ) { unsigned char *pabyFInfo; pabyFInfo = pabyBuf+iField*32; if( pabyFInfo[11] == 'N' || pabyFInfo[11] == 'F' ) { psDBF->panFieldSize[iField] = pabyFInfo[16]; psDBF->panFieldDecimals[iField] = pabyFInfo[17]; } else { psDBF->panFieldSize[iField] = pabyFInfo[16]; psDBF->panFieldDecimals[iField] = 0; /* ** The following seemed to be used sometimes to handle files with long ** string fields, but in other cases (such as bug 1202) the decimals field ** just seems to indicate some sort of preferred formatting, not very ** wide fields. So I have disabled this code. FrankW. psDBF->panFieldSize[iField] = pabyFInfo[16] + pabyFInfo[17]*256; psDBF->panFieldDecimals[iField] = 0; */ /* The above change has been back-ported from shapelib per PR#15248 */ } psDBF->pachFieldType[iField] = (char) pabyFInfo[11]; if( iField == 0 ) psDBF->panFieldOffset[iField] = 1; else psDBF->panFieldOffset[iField] = psDBF->panFieldOffset[iField-1] + psDBF->panFieldSize[iField-1]; } return( psDBF ); } /************************************************************************/ /* DBFClose() */ /************************************************************************/ void SHPAPI_CALL DBFClose(DBFHandle psDBF) { /* -------------------------------------------------------------------- */ /* Write out header if not already written. */ /* -------------------------------------------------------------------- */ if( psDBF->bNoHeader ) DBFWriteHeader( psDBF ); DBFFlushRecord( psDBF ); /* -------------------------------------------------------------------- */ /* Update last access date, and number of records if we have */ /* write access. */ /* -------------------------------------------------------------------- */ if( psDBF->bUpdated ) DBFUpdateHeader( psDBF ); /* -------------------------------------------------------------------- */ /* Close, and free resources. */ /* -------------------------------------------------------------------- */ fclose( psDBF->fp ); if( psDBF->panFieldOffset != NULL ) { free( psDBF->panFieldOffset ); free( psDBF->panFieldSize ); free( psDBF->panFieldDecimals ); free( psDBF->pachFieldType ); } free( psDBF->pszHeader ); free( psDBF->pszCurrentRecord ); free( psDBF ); if( pszStringField != NULL ) { free( pszStringField ); pszStringField = NULL; nStringFieldLen = 0; } } /************************************************************************/ /* DBFCreate() */ /* */ /* Create a new .dbf file. */ /************************************************************************/ DBFHandle SHPAPI_CALL DBFCreate( const char * pszFilename ) { DBFHandle psDBF; FILE *fp; char *pszFullname, *pszBasename; size_t i; /* -------------------------------------------------------------------- */ /* Compute the base (layer) name. If there is any extension */ /* on the passed in filename we will strip it off. */ /* -------------------------------------------------------------------- */ pszBasename = (char *) malloc(strlen(pszFilename)+5); strcpy( pszBasename, pszFilename ); for( i = strlen(pszBasename)-1; i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/' && pszBasename[i] != '\\'; i-- ) {} if( pszBasename[i] == '.' ) pszBasename[i] = '\0'; size_t sz = strlen(pszBasename) + 5; pszFullname = (char *) malloc(sz); snprintf( pszFullname, sz, "%s.dbf", pszBasename ); free( pszBasename ); /* -------------------------------------------------------------------- */ /* Create the file. */ /* -------------------------------------------------------------------- */ fp = fopen( pszFullname, "wb" ); if( fp == NULL ) return( NULL ); fputc( 0, fp ); fclose( fp ); fp = fopen( pszFullname, "rb+" ); if( fp == NULL ) return( NULL ); free( pszFullname ); /* -------------------------------------------------------------------- */ /* Create the info structure. */ /* -------------------------------------------------------------------- */ psDBF = (DBFHandle) malloc(sizeof(DBFInfo)); psDBF->fp = fp; psDBF->nRecords = 0; psDBF->nFields = 0; psDBF->nRecordLength = 1; psDBF->nHeaderLength = 33; psDBF->panFieldOffset = NULL; psDBF->panFieldSize = NULL; psDBF->panFieldDecimals = NULL; psDBF->pachFieldType = NULL; psDBF->pszHeader = NULL; psDBF->nCurrentRecord = -1; psDBF->bCurrentRecordModified = FALSE; psDBF->pszCurrentRecord = NULL; psDBF->bNoHeader = TRUE; return( psDBF ); } /************************************************************************/ /* DBFAddField() */ /* */ /* Add a field to a newly created .dbf file before any records */ /* are written. */ /************************************************************************/ int SHPAPI_CALL DBFAddField(DBFHandle psDBF, const char * pszFieldName, DBFFieldType eType, int nWidth, int nDecimals ) { char *pszFInfo; int i; /* -------------------------------------------------------------------- */ /* Do some checking to ensure we can add records to this file. */ /* -------------------------------------------------------------------- */ if( psDBF->nRecords > 0 ) return( -1 ); if( !psDBF->bNoHeader ) return( -1 ); if( eType != FTDouble && nDecimals != 0 ) return( -1 ); if( nWidth < 1 ) return -1; /* -------------------------------------------------------------------- */ /* SfRealloc all the arrays larger to hold the additional field */ /* information. */ /* -------------------------------------------------------------------- */ psDBF->nFields++; psDBF->panFieldOffset = (int *) SfRealloc( psDBF->panFieldOffset, sizeof(int) * psDBF->nFields ); psDBF->panFieldSize = (int *) SfRealloc( psDBF->panFieldSize, sizeof(int) * psDBF->nFields ); psDBF->panFieldDecimals = (int *) SfRealloc( psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields ); psDBF->pachFieldType = (char *) SfRealloc( psDBF->pachFieldType, sizeof(char) * psDBF->nFields ); /* -------------------------------------------------------------------- */ /* Assign the new field information fields. */ /* -------------------------------------------------------------------- */ psDBF->panFieldOffset[psDBF->nFields-1] = psDBF->nRecordLength; psDBF->nRecordLength += nWidth; psDBF->panFieldSize[psDBF->nFields-1] = nWidth; psDBF->panFieldDecimals[psDBF->nFields-1] = nDecimals; if( eType == FTLogical ) psDBF->pachFieldType[psDBF->nFields-1] = 'L'; else if( eType == FTString ) psDBF->pachFieldType[psDBF->nFields-1] = 'C'; else if( eType == FTDate ) psDBF->pachFieldType[psDBF->nFields-1] = 'D'; else psDBF->pachFieldType[psDBF->nFields-1] = 'N'; /* -------------------------------------------------------------------- */ /* Extend the required header information. */ /* -------------------------------------------------------------------- */ psDBF->nHeaderLength += 32; psDBF->bUpdated = FALSE; psDBF->pszHeader = (char *) SfRealloc(psDBF->pszHeader,psDBF->nFields*32); pszFInfo = psDBF->pszHeader + 32 * (psDBF->nFields-1); for( i = 0; i < 32; i++ ) pszFInfo[i] = '\0'; if( (int) strlen(pszFieldName) < 10 ) strcpy( pszFInfo, pszFieldName); else { strncpy( pszFInfo, pszFieldName, 10); pszFInfo[10] = '\0'; } pszFInfo[11] = psDBF->pachFieldType[psDBF->nFields-1]; if( eType == FTString ) { pszFInfo[16] = (char)(nWidth % 256); pszFInfo[17] = (char)(nWidth / 256); } else { pszFInfo[16] = (char) nWidth; pszFInfo[17] = (char) nDecimals; } /* -------------------------------------------------------------------- */ /* Make the current record buffer appropriately larger. */ /* -------------------------------------------------------------------- */ psDBF->pszCurrentRecord = (char *) SfRealloc(psDBF->pszCurrentRecord, psDBF->nRecordLength + 1); return( psDBF->nFields-1 ); } /************************************************************************/ /* DBFReadAttribute() */ /* */ /* Read one of the attribute fields of a record. */ /************************************************************************/ static void *DBFReadAttribute(DBFHandle psDBF, int hEntity, int iField, char chReqType ) { int nRecordOffset; unsigned char *pabyRec; void *pReturnField = NULL; static double dDoubleField; /* -------------------------------------------------------------------- */ /* Verify selection. */ /* -------------------------------------------------------------------- */ if( hEntity < 0 || hEntity >= psDBF->nRecords ) return( NULL ); if( iField < 0 || iField >= psDBF->nFields ) return( NULL ); /* -------------------------------------------------------------------- */ /* Have we read the record? */ /* -------------------------------------------------------------------- */ if( psDBF->nCurrentRecord != hEntity ) { DBFFlushRecord( psDBF ); nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; if( fseek( psDBF->fp, nRecordOffset, 0 ) != 0 ) { REprintf("fseek(%d) failed on DBF file", nRecordOffset); return NULL; } if( fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1 ) { REprintf("fread(%d) failed on DBF file", psDBF->nRecordLength ); return NULL; } psDBF->nCurrentRecord = hEntity; } pabyRec = (unsigned char *) psDBF->pszCurrentRecord; /* -------------------------------------------------------------------- */ /* Ensure our field buffer is large enough to hold this buffer. */ /* -------------------------------------------------------------------- */ if( psDBF->panFieldSize[iField]+1 > nStringFieldLen ) { nStringFieldLen = psDBF->panFieldSize[iField]*2 + 10; pszStringField = (char *) SfRealloc(pszStringField,nStringFieldLen); } /* -------------------------------------------------------------------- */ /* Extract the requested field. */ /* -------------------------------------------------------------------- */ strncpy( pszStringField, ((const char *) pabyRec) + psDBF->panFieldOffset[iField], psDBF->panFieldSize[iField] ); pszStringField[psDBF->panFieldSize[iField]] = '\0'; pReturnField = pszStringField; /* -------------------------------------------------------------------- */ /* Decode the field. */ /* -------------------------------------------------------------------- */ if( chReqType == 'N' ) { dDoubleField = R_atof(pszStringField); pReturnField = &dDoubleField; } /* -------------------------------------------------------------------- */ /* Should we trim white space off the string attribute value? */ /* -------------------------------------------------------------------- */ #ifdef TRIM_DBF_WHITESPACE else { char *pchSrc, *pchDst; pchDst = pchSrc = pszStringField; while( *pchSrc == ' ' ) pchSrc++; while( *pchSrc != '\0' ) *(pchDst++) = *(pchSrc++); *pchDst = '\0'; while( pchDst != pszStringField && *(--pchDst) == ' ' ) *pchDst = '\0'; } #endif return( pReturnField ); } /************************************************************************/ /* DBFReadIntAttribute() */ /* */ /* Read an integer attribute. */ /************************************************************************/ int SHPAPI_CALL DBFReadIntegerAttribute( DBFHandle psDBF, int iRecord, int iField ) { double *pdValue; pdValue = (double *) DBFReadAttribute( psDBF, iRecord, iField, 'N' ); if( pdValue == NULL ) return NA_INTEGER; else return( (int) *pdValue ); } /************************************************************************/ /* DBFReadDoubleAttribute() */ /* */ /* Read a double attribute. */ /************************************************************************/ double SHPAPI_CALL DBFReadDoubleAttribute( DBFHandle psDBF, int iRecord, int iField ) { double *pdValue; pdValue = (double *) DBFReadAttribute( psDBF, iRecord, iField, 'N' ); if( pdValue == NULL ) return NA_REAL; else return( *pdValue ); } /************************************************************************/ /* DBFReadStringAttribute() */ /* */ /* Read a string attribute. */ /************************************************************************/ const char SHPAPI_CALL1(*) DBFReadStringAttribute( DBFHandle psDBF, int iRecord, int iField ) { return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'C' ) ); } /************************************************************************/ /* DBFReadLogicalAttribute() */ /* */ /* Read a logical attribute. */ /************************************************************************/ const char SHPAPI_CALL1(*) DBFReadLogicalAttribute( DBFHandle psDBF, int iRecord, int iField ) { return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'L' ) ); } /************************************************************************/ /* DBFIsAttributeNULL() */ /* */ /* Return TRUE if value for field is NULL. */ /* */ /* Contributed by Jim Matthews. */ /************************************************************************/ int SHPAPI_CALL DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField ) { const char *pszValue; int i; pszValue = DBFReadStringAttribute( psDBF, iRecord, iField ); if(pszValue == NULL) return TRUE; switch(psDBF->pachFieldType[iField]) { case 'N': case 'F': /* ** We accept all asterisks or all blanks as NULL ** though according to the spec I think it should be all ** asterisks. */ if(pszValue[0] == '*') return TRUE; for(i = 0; pszValue[i] != '\0'; i++) if(pszValue[i] != ' ') return FALSE; return TRUE; case 'D': /* NULL date fields have value "00000000" */ return strlen(pszValue) == 0 || strncmp(pszValue,"00000000",8) == 0; case 'L': /* NULL boolean fields have value "?" */ return pszValue[0] == '?'; default: /* empty string fields are considered NULL */ return strlen(pszValue) == 0; } } /************************************************************************/ /* DBFGetFieldCount() */ /* */ /* Return the number of fields in this table. */ /************************************************************************/ int SHPAPI_CALL DBFGetFieldCount( DBFHandle psDBF ) { return( psDBF->nFields ); } /************************************************************************/ /* DBFGetRecordCount() */ /* */ /* Return the number of records in this table. */ /************************************************************************/ int SHPAPI_CALL DBFGetRecordCount( DBFHandle psDBF ) { return( psDBF->nRecords ); } /************************************************************************/ /* DBFGetFieldInfo() */ /* */ /* Return any requested information about the field. */ /************************************************************************/ DBFFieldType SHPAPI_CALL DBFGetFieldInfo( DBFHandle psDBF, int iField, char * pszFieldName, int * pnWidth, int * pnDecimals ) { if( iField < 0 || iField >= psDBF->nFields ) return( FTInvalid ); if( pnWidth != NULL ) *pnWidth = psDBF->panFieldSize[iField]; if( pnDecimals != NULL ) *pnDecimals = psDBF->panFieldDecimals[iField]; if( pszFieldName != NULL ) { int i; strncpy( pszFieldName, (char *) psDBF->pszHeader+iField*32, 11 ); pszFieldName[11] = '\0'; for( i = 10; i > 0 && pszFieldName[i] == ' '; i-- ) pszFieldName[i] = '\0'; } if ( psDBF->pachFieldType[iField] == 'L' ) return( FTLogical); else if( psDBF->pachFieldType[iField] == 'N' || psDBF->pachFieldType[iField] == 'F' ) /* || psDBF->pachFieldType[iField] == 'D' ) D is Date */ { if( psDBF->panFieldDecimals[iField] > 0 ) return( FTDouble ); else return( FTInteger ); } else { return( FTString ); } } /************************************************************************/ /* DBFWriteAttribute() */ /* */ /* Write an attribute record to the file. */ /************************************************************************/ static int DBFWriteAttribute(DBFHandle psDBF, int hEntity, int iField, void * pValue ) { int nRecordOffset, i, j, nRetResult = TRUE; unsigned char *pabyRec; char szSField[400], szFormat[20]; /* -------------------------------------------------------------------- */ /* Is this a valid record? */ /* -------------------------------------------------------------------- */ if( hEntity < 0 || hEntity > psDBF->nRecords ) return( FALSE ); if( psDBF->bNoHeader ) DBFWriteHeader(psDBF); /* -------------------------------------------------------------------- */ /* Is this a brand new record? */ /* -------------------------------------------------------------------- */ if( hEntity == psDBF->nRecords ) { DBFFlushRecord( psDBF ); psDBF->nRecords++; for( i = 0; i < psDBF->nRecordLength; i++ ) psDBF->pszCurrentRecord[i] = ' '; psDBF->nCurrentRecord = hEntity; } /* -------------------------------------------------------------------- */ /* Is this an existing record, but different than the last one */ /* we accessed? */ /* -------------------------------------------------------------------- */ if( psDBF->nCurrentRecord != hEntity ) { DBFFlushRecord( psDBF ); nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; fseek( psDBF->fp, nRecordOffset, 0 ); if (fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1) error("binary read error"); psDBF->nCurrentRecord = hEntity; } pabyRec = (unsigned char *) psDBF->pszCurrentRecord; psDBF->bCurrentRecordModified = TRUE; psDBF->bUpdated = TRUE; /* -------------------------------------------------------------------- */ /* Translate NULL value to valid DBF file representation. */ /* */ /* Contributed by Jim Matthews. */ /* -------------------------------------------------------------------- */ if( pValue == NULL ) { switch(psDBF->pachFieldType[iField]) { case 'N': case 'F': /* NULL numeric fields have value "****************" */ memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '*', psDBF->panFieldSize[iField] ); break; case 'D': /* NULL date fields have value "00000000" */ memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '0', psDBF->panFieldSize[iField] ); break; case 'L': /* NULL boolean fields have value "?" */ memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '?', psDBF->panFieldSize[iField] ); break; default: /* empty string fields are considered NULL */ memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '\0', psDBF->panFieldSize[iField] ); break; } return TRUE; } /* -------------------------------------------------------------------- */ /* Assign all the record fields. */ /* -------------------------------------------------------------------- */ switch( psDBF->pachFieldType[iField] ) { /* case 'D': is Date */ case 'N': case 'F': if( psDBF->panFieldDecimals[iField] == 0 ) { int nWidth = psDBF->panFieldSize[iField]; if( sizeof(szSField)-2 < nWidth ) nWidth = sizeof(szSField)-2; snprintf( szFormat, 20, "%%%dd", nWidth ); snprintf(szSField, 400, szFormat, (int) *((double *) pValue) ); if( (int)strlen(szSField) > psDBF->panFieldSize[iField] ) { szSField[psDBF->panFieldSize[iField]] = '\0'; nRetResult = FALSE; } strcpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), szSField); } else { int nWidth = psDBF->panFieldSize[iField]; if( sizeof(szSField)-2 < nWidth ) nWidth = sizeof(szSField)-2; snprintf( szFormat, 20, "%%%d.%df", nWidth, psDBF->panFieldDecimals[iField] ); snprintf(szSField, 400, szFormat, *((double *) pValue) ); if( (int) strlen(szSField) > psDBF->panFieldSize[iField] ) { szSField[psDBF->panFieldSize[iField]] = '\0'; nRetResult = FALSE; } strcpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), szSField); } break; case 'L': if (psDBF->panFieldSize[iField] >= 1 && (*(char*)pValue == 'F' || *(char*)pValue == 'T')) *(pabyRec+psDBF->panFieldOffset[iField]) = *(char*)pValue; break; default: if( (int) strlen((char *) pValue) > psDBF->panFieldSize[iField] ) { j = psDBF->panFieldSize[iField]; nRetResult = FALSE; } else { memset( pabyRec+psDBF->panFieldOffset[iField], ' ', psDBF->panFieldSize[iField] ); j = (int) strlen((char *) pValue); } strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), (char *) pValue, j ); break; } return( nRetResult ); } /************************************************************************/ /* DBFWriteAttributeDirectly() */ /* */ /* Write an attribute record to the file, but without any */ /* reformatting based on type. The provided buffer is written */ /* as is to the field position in the record. */ /************************************************************************/ int DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, void * pValue ) { int nRecordOffset, i, j; unsigned char *pabyRec; /* -------------------------------------------------------------------- */ /* Is this a valid record? */ /* -------------------------------------------------------------------- */ if( hEntity < 0 || hEntity > psDBF->nRecords ) return( FALSE ); if( psDBF->bNoHeader ) DBFWriteHeader(psDBF); /* -------------------------------------------------------------------- */ /* Is this a brand new record? */ /* -------------------------------------------------------------------- */ if( hEntity == psDBF->nRecords ) { DBFFlushRecord( psDBF ); psDBF->nRecords++; for( i = 0; i < psDBF->nRecordLength; i++ ) psDBF->pszCurrentRecord[i] = ' '; psDBF->nCurrentRecord = hEntity; } /* -------------------------------------------------------------------- */ /* Is this an existing record, but different than the last one */ /* we accessed? */ /* -------------------------------------------------------------------- */ if( psDBF->nCurrentRecord != hEntity ) { DBFFlushRecord( psDBF ); nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; fseek( psDBF->fp, nRecordOffset, 0 ); if (fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1) error("binary read error"); psDBF->nCurrentRecord = hEntity; } pabyRec = (unsigned char *) psDBF->pszCurrentRecord; /* -------------------------------------------------------------------- */ /* Assign all the record fields. */ /* -------------------------------------------------------------------- */ if( (int)strlen((char *) pValue) > psDBF->panFieldSize[iField] ) j = psDBF->panFieldSize[iField]; else { memset( pabyRec+psDBF->panFieldOffset[iField], ' ', psDBF->panFieldSize[iField] ); j = (int) strlen((char *) pValue); } strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), (char *) pValue, j ); psDBF->bCurrentRecordModified = TRUE; psDBF->bUpdated = TRUE; return( TRUE ); } /************************************************************************/ /* DBFWriteDoubleAttribute() */ /* */ /* Write a double attribute. */ /************************************************************************/ int SHPAPI_CALL DBFWriteDoubleAttribute( DBFHandle psDBF, int iRecord, int iField, double dValue ) { return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) &dValue ) ); } /************************************************************************/ /* DBFWriteIntegerAttribute() */ /* */ /* Write a integer attribute. */ /************************************************************************/ int SHPAPI_CALL DBFWriteIntegerAttribute( DBFHandle psDBF, int iRecord, int iField, int nValue ) { double dValue = nValue; return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) &dValue ) ); } /************************************************************************/ /* DBFWriteStringAttribute() */ /* */ /* Write a string attribute. */ /************************************************************************/ int SHPAPI_CALL DBFWriteStringAttribute( DBFHandle psDBF, int iRecord, int iField, const char * pszValue ) { return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) pszValue ) ); } /************************************************************************/ /* DBFWriteNULLAttribute() */ /* */ /* Write a string attribute. */ /************************************************************************/ int SHPAPI_CALL DBFWriteNULLAttribute( DBFHandle psDBF, int iRecord, int iField ) { return( DBFWriteAttribute( psDBF, iRecord, iField, NULL ) ); } /************************************************************************/ /* DBFWriteLogicalAttribute() */ /* */ /* Write a logical attribute. */ /************************************************************************/ int SHPAPI_CALL DBFWriteLogicalAttribute( DBFHandle psDBF, int iRecord, int iField, const char lValue) { return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) (&lValue) ) ); } /************************************************************************/ /* DBFWriteTuple() */ /* */ /* Write an attribute record to the file. */ /************************************************************************/ int SHPAPI_CALL DBFWriteTuple(DBFHandle psDBF, int hEntity, void * pRawTuple ) { int nRecordOffset, i; unsigned char *pabyRec; /* -------------------------------------------------------------------- */ /* Is this a valid record? */ /* -------------------------------------------------------------------- */ if( hEntity < 0 || hEntity > psDBF->nRecords ) return( FALSE ); if( psDBF->bNoHeader ) DBFWriteHeader(psDBF); /* -------------------------------------------------------------------- */ /* Is this a brand new record? */ /* -------------------------------------------------------------------- */ if( hEntity == psDBF->nRecords ) { DBFFlushRecord( psDBF ); psDBF->nRecords++; for( i = 0; i < psDBF->nRecordLength; i++ ) psDBF->pszCurrentRecord[i] = ' '; psDBF->nCurrentRecord = hEntity; } /* -------------------------------------------------------------------- */ /* Is this an existing record, but different than the last one */ /* we accessed? */ /* -------------------------------------------------------------------- */ if( psDBF->nCurrentRecord != hEntity ) { DBFFlushRecord( psDBF ); nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; fseek( psDBF->fp, nRecordOffset, 0 ); if (fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1) error("binary read error"); psDBF->nCurrentRecord = hEntity; } pabyRec = (unsigned char *) psDBF->pszCurrentRecord; memcpy ( pabyRec, pRawTuple, psDBF->nRecordLength ); psDBF->bCurrentRecordModified = TRUE; psDBF->bUpdated = TRUE; return( TRUE ); } /************************************************************************/ /* DBFReadTuple() */ /* */ /* Read one of the attribute fields of a record. */ /************************************************************************/ const char SHPAPI_CALL1(*) DBFReadTuple(DBFHandle psDBF, int hEntity ) { int nRecordOffset; unsigned char *pabyRec; static char *pReturnTuple = NULL; static int nTupleLen = 0; /* -------------------------------------------------------------------- */ /* Have we read the record? */ /* -------------------------------------------------------------------- */ if( hEntity < 0 || hEntity >= psDBF->nRecords ) return( NULL ); if( psDBF->nCurrentRecord != hEntity ) { DBFFlushRecord( psDBF ); nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; fseek( psDBF->fp, nRecordOffset, 0 ); if (fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1) error("binary read error"); psDBF->nCurrentRecord = hEntity; } pabyRec = (unsigned char *) psDBF->pszCurrentRecord; if ( nTupleLen < psDBF->nRecordLength) { nTupleLen = psDBF->nRecordLength; pReturnTuple = (char *) SfRealloc(pReturnTuple, psDBF->nRecordLength); } memcpy ( pReturnTuple, pabyRec, psDBF->nRecordLength ); return( pReturnTuple ); } /************************************************************************/ /* DBFCloneEmpty() */ /* */ /* Read one of the attribute fields of a record. */ /************************************************************************/ DBFHandle SHPAPI_CALL DBFCloneEmpty(DBFHandle psDBF, const char * pszFilename ) { DBFHandle newDBF; newDBF = DBFCreate ( pszFilename ); if ( newDBF == NULL ) return ( NULL ); newDBF->pszHeader = (char *) malloc ( 32 * psDBF->nFields ); memcpy ( newDBF->pszHeader, psDBF->pszHeader, 32 * psDBF->nFields ); newDBF->nFields = psDBF->nFields; newDBF->nRecordLength = psDBF->nRecordLength; newDBF->nHeaderLength = 32 * (psDBF->nFields+1); newDBF->panFieldOffset = (int *) malloc ( sizeof(int) * psDBF->nFields ); memcpy ( newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields ); newDBF->panFieldSize = (int *) malloc ( sizeof(int) * psDBF->nFields ); memcpy ( newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields ); newDBF->panFieldDecimals = (int *) malloc ( sizeof(int) * psDBF->nFields ); memcpy ( newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields ); newDBF->pachFieldType = (char *) malloc ( sizeof(int) * psDBF->nFields ); memcpy ( newDBF->pachFieldType, psDBF->pachFieldType, sizeof(int) * psDBF->nFields ); newDBF->bNoHeader = TRUE; newDBF->bUpdated = TRUE; DBFWriteHeader ( newDBF ); DBFClose ( newDBF ); newDBF = DBFOpen ( pszFilename, "rb+" ); return ( newDBF ); } /************************************************************************/ /* DBFGetNativeFieldType() */ /* */ /* Return the DBase field type for the specified field. */ /* */ /* Value can be one of: 'C' (String), 'D' (Date), 'F' (Float), */ /* 'N' (Numeric, with or without decimal), */ /* 'L' (Logical), */ /* 'M' (Memo: 10 digits .DBT block ptr) */ /************************************************************************/ char SHPAPI_CALL DBFGetNativeFieldType( DBFHandle psDBF, int iField ) { if( iField >=0 && iField < psDBF->nFields ) return psDBF->pachFieldType[iField]; return ' '; } /************************************************************************/ /* str_to_upper() */ /************************************************************************/ /* FIXME: this is incorrect in a MBCS */ static void str_to_upper (char *string) { size_t len; short i = -1; len = strlen (string); while (++i < len) if (isalpha((int)string[i]) && islower((int)string[i])) string[i] = (char)toupper ((int)string[i]); } /************************************************************************/ /* DBFGetFieldIndex() */ /* */ /* Get the index number for a field in a .dbf file. */ /* */ /* Contributed by Jim Matthews. */ /************************************************************************/ int SHPAPI_CALL DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName) { char name[12], name1[12], name2[12]; int i; strncpy(name1, pszFieldName,11); name1[11] = '\0'; str_to_upper(name1); for( i = 0; i < DBFGetFieldCount(psDBF); i++ ) { DBFGetFieldInfo( psDBF, i, name, NULL, NULL ); strncpy(name2, name, 12); // this copied the terminator, but be sure name2[11] = '\0'; str_to_upper(name2); if(!strncmp(name1,name2,10)) return(i); } return(-1); } foreign/src/file-handle.c0000644000175100001440000001263114167602146015036 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #include #include #include #include #include "avl.h" #include "file-handle.h" #include "var.h" #include "foreign.h" /* (headers) */ #undef DEBUGGING /*#define DEBUGGING 1*/ avl_tree *files; struct file_handle *inline_file; static void init_file_handle (struct file_handle * handle); /* (specification) "FILE HANDLE" (fh_): name=string; recform=recform:fixed/!variable/spanned; lrecl=integer; mode=mode:!character/image/binary/multipunch/_360. */ /* (declarations) */ /* (functions) */ /* File handle functions. */ /* Sets up some fields in H; caller should fill in H->{NAME,NORM_FN,FN}. */ static void init_file_handle (struct file_handle *h) { h->recform = FH_RF_VARIABLE; h->mode = FH_MD_CHARACTER; h->ext = NULL; h->class = NULL; } /* Returns the handle corresponding to FILENAME. Creates the handle if no handle exists for that file. All filenames are normalized first, so different filenames referring to the same file will return the same file handle. */ struct file_handle * fh_get_handle_by_filename (const char *filename) { struct file_handle f, *fp; char *fn; char *name; size_t len; /* Get filename. */ len = strlen (filename); fn = R_Calloc(len + 1, char); strcpy(fn, filename); /* Create handle name with invalid identifier character to prevent conflicts with handles created with FILE HANDLE. */ name = R_Calloc (len + 2, char); name[0] = '*'; strcpy (&name[1], fn); f.name = name; fp = R_avl_find (files, &f); if (!fp) { fp = R_Calloc (1, struct file_handle); init_file_handle (fp); fp->name = name; fp->where.filename = fp->fn = fp->norm_fn = fn; R_avl_insert (files, fp); } else { R_Free (fn); R_Free (name); } return fp; } /* Returns the handle with identifier NAME, if it exists; otherwise reports error to user and returns NULL. */ struct file_handle * fh_get_handle_by_name (const char name[9]) { struct file_handle f, *fp; f.name = (char *) name; fp = R_avl_find (files, &f); if (!fp) error (_("file handle `%s' has not been previously declared on FILE HANDLE"), name); return fp; } /* Returns the identifier of file HANDLE. If HANDLE was created by referring to a filename (i.e., DATA LIST FILE='yyy' instead of FILE HANDLE XXX='yyy'), returns the filename, enclosed in double quotes. Return value is in a static buffer. Useful for printing error messages about use of file handles. */ const char * fh_handle_name (struct file_handle *h) { static char *buf = NULL; if (buf) { R_Free (buf); buf = NULL; } if (!h) return NULL; if (h->name[0] == '*') { size_t len = strlen (h->fn); buf = R_Calloc (len + 3, char); strcpy (&buf[1], h->fn); buf[0] = buf[len + 1] = '"'; buf[len + 2] = 0; return buf; } return h->name; } /* Closes the stdio FILE associated with handle H. Frees internal buffers associated with that file. Does *not* destroy the file handle H. (File handles are permanent during a session.) */ void fh_close_handle (struct file_handle *h) { if (h == NULL) return; #if 0 warning ("Closing %s%s.\n", fh_handle_name (h), h->class == NULL ? " (already closed)" : ""); #endif if (h->class) h->class->close (h); h->class = NULL; if(h->ext) R_Free(h->ext); h->ext = NULL; } /* Compares names of file handles A and B. */ static int cmp_file_handle (const void *a, const void *b, void *foo) { return strcmp (((struct file_handle *) a)->name, ((struct file_handle *) b)->name); } /* Initialize the AVL tree of file handles; inserts the "inline file" inline_file. */ static char inline_filename[] = ""; void fh_init_files (void) { /* Create AVL tree. */ files = R_avl_create (cmp_file_handle, NULL); /* Insert inline file. */ inline_file = R_Calloc (1, struct file_handle); init_file_handle (inline_file); inline_file->name = "INLINE"; inline_file->where.filename = inline_file->fn = inline_file->norm_fn = inline_filename; inline_file->where.line_number = 0; R_avl_insert (files, inline_file); } /* Returns the (normalized) filename associated with file handle H. */ char * fh_handle_filename (struct file_handle * h) { return h->norm_fn; } /* Returns the width of a logical record on file handle H. */ size_t fh_record_width (struct file_handle *h) { if (h == inline_file) return 80; else if (h->recform == FH_RF_FIXED) return h->lrecl; else return 1024; } /* Local variables: mode: c End: */ foreign/src/stataread.c0000644000175100001440000007575614343565701014660 0ustar hornikusers/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * http://www.r-project.org/Licenses/ */ /** Read Stata version 8.0, 7.0, 7/SE, 6.0 and 5.0 .dta files, write version 7.0, 6.0. (c) 1999, 2000, 2001, 2002 Thomas Lumley. 2000 Saikat DebRoy Patches by the R Core Team and Brian Quistorff, 2002, 2007-2020. Frozen 2013-10-07 at Stata version 10 aka 114 (11 is the same as 10, and 12 seems compatible despite being described separately as 115). The format of Stata files is documented under 'file formats' in the Stata manual and at http://www.stata.com/help.cgi?dta (with, currently, links to various versions). This code currently does not make use of the print format information in a .dta file (except for dates). It cannot handle files with 'int', 'float' or 'double' that differ from IEEE 4-byte integer, 4-byte real and 8-byte real respectively: it's not clear whether such files can exist. Versions of Stata before 4.0 and after 12 used different file formats. **/ #include #include /* for abs */ #include #include "foreign.h" #include "swap_bytes.h" /* versions */ #define VERSION_5 0x69 #define VERSION_6 'l' #define VERSION_7 0x6e #define VERSION_7SE 111 #define VERSION_8 113 #define VERSION_114 114 #define VERSION_115 115 /* http://statacorp.com/statalist/archive/2007-06/msg01021.html says 113 is versions 8-9, 114 is version 10/11. */ /* Stata format constants */ #define STATA_FLOAT 'f' #define STATA_DOUBLE 'd' #define STATA_INT 'l' #define STATA_SHORTINT 'i' #define STATA_BYTE 'b' #define STATA_SE_STRINGOFFSET 0 #define STATA_SE_FLOAT 254 #define STATA_SE_DOUBLE 255 #define STATA_SE_INT 253 #define STATA_SE_SHORTINT 252 #define STATA_SE_BYTE 251 #define STATA_STRINGOFFSET 0x7f #define STATA_BYTE_NA 127 #define STATA_SHORTINT_NA 32767 #define STATA_INT_NA 2147483647 #define STATA_FLOAT_NA pow(2.0, 127) #define STATA_DOUBLE_NA pow(2.0, 1023) static int stata_endian; /** Low-level input **/ static int InIntegerBinary(FILE * fp, int naok, int swapends) { int i; if (fread(&i, sizeof(int), 1, fp) != 1) error(_("a binary read error occurred")); if (swapends) reverse_int(i); return (((i == STATA_INT_NA) & !naok) ? NA_INTEGER : i); } /* read a 1-byte signed integer */ static int InByteBinary(FILE * fp, int naok) { signed char i; if (fread(&i, sizeof(char), 1, fp) != 1) error(_("a binary read error occurred")); return (((i == STATA_BYTE_NA) & !naok) ? NA_INTEGER : (int) i); } /* read a single byte */ static int RawByteBinary(FILE * fp, int naok) { unsigned char i; if (fread(&i, sizeof(char), 1, fp) != 1) error(_("a binary read error occurred")); return (((i == STATA_BYTE_NA) & !naok) ? NA_INTEGER : (int) i); } static int InShortIntBinary(FILE * fp, int naok,int swapends) { unsigned first,second; int result; first = RawByteBinary(fp,1); second = RawByteBinary(fp,1); if (stata_endian == CN_TYPE_BIG){ result= (first<<8) | second; } else { result= (second<<8) | first; } if (result > STATA_SHORTINT_NA) result -= 65536; return (((result == STATA_SHORTINT_NA) & !naok) ? NA_INTEGER : result); } static double InDoubleBinary(FILE * fp, int naok, int swapends) { unsigned char b[sizeof(double)]; double i; if (fread(b, sizeof(double), 1, fp) != 1) error(_("a binary read error occurred")); if (swapends) reverse_bytes_double(b); i = *(double *) b; return (((i == STATA_DOUBLE_NA) & !naok) ? NA_REAL : i); } static double InFloatBinary(FILE * fp, int naok, int swapends) { unsigned char b[sizeof(float)]; float i; if (fread(b, sizeof(float), 1, fp) != 1) error(_("a binary read error occurred")); if (swapends) reverse_bytes_float(b); i = *(float *) b; return (((i == STATA_FLOAT_NA) & !naok) ? NA_REAL : (double) i); } static void InStringBinary(FILE * fp, int nchar, char* buffer) { if (fread(buffer, nchar, 1, fp) != 1) error(_("a binary read error occurred")); } /** now optional and done at R level **/ static char* nameMangle(char *stataname, int len){ return stataname; } /**static char* nameMangle(char *stataname, int len){ int i; for(i=0;i 0){ for(i = 0; i < nvar; i++){ abyte = (unsigned char) RawByteBinary(fp, 1); INTEGER(types)[i] = abyte; switch (abyte) { case STATA_FLOAT: case STATA_DOUBLE: SET_VECTOR_ELT(df, i, allocVector(REALSXP, nobs)); break; case STATA_INT: case STATA_SHORTINT: case STATA_BYTE: SET_VECTOR_ELT(df, i, allocVector(INTSXP, nobs)); break; default: if (abyte < STATA_STRINGOFFSET) error(_("unknown data type")); SET_VECTOR_ELT(df, i, allocVector(STRSXP, nobs)); break; } } } else { for(i = 0; i < nvar; i++){ abyte = (unsigned char) RawByteBinary(fp, 1); INTEGER(types)[i] = abyte; switch (abyte) { case STATA_SE_FLOAT: case STATA_SE_DOUBLE: SET_VECTOR_ELT(df, i, allocVector(REALSXP, nobs)); break; case STATA_SE_INT: case STATA_SE_SHORTINT: case STATA_SE_BYTE: SET_VECTOR_ELT(df, i, allocVector(INTSXP, nobs)); break; default: if (abyte > 244) error(_("unknown data type")); SET_VECTOR_ELT(df, i, allocVector(STRSXP, nobs)); break; } } } /** names **/ PROTECT(names = allocVector(STRSXP, nvar)); for (i = 0; i < nvar; i++) { InStringBinary(fp, varnamelength+1, aname); SET_STRING_ELT(names, i, mkChar(nameMangle(aname, varnamelength+1))); } setAttrib(df, R_NamesSymbol, names); UNPROTECT(1); /** sortlist -- not relevant **/ for (i = 0; i < 2*(nvar+1); i++) RawByteBinary(fp, 1); /** format list passed back to R as attributes. Used to identify date variables. **/ PROTECT(tmp = allocVector(STRSXP, nvar)); for (i = 0; i < nvar; i++) { InStringBinary(fp, fmtlist_len, timestamp); SET_STRING_ELT(tmp, i, mkChar(timestamp)); } setAttrib(df, install("formats"), tmp); UNPROTECT(1); setAttrib(df, install("types"), types); /** value labels. These are stored as the names of label formats, which are themselves stored later in the file. **/ PROTECT(tmp = allocVector(STRSXP, nvar)); for(i = 0; i < nvar; i++) { InStringBinary(fp, varnamelength+1, aname); SET_STRING_ELT(tmp ,i, mkChar(aname)); } setAttrib(df,install("val.labels"), tmp); UNPROTECT(1); /*tmp*/ /** Variable Labels **/ PROTECT(varlabels=allocVector(STRSXP,nvar)); switch(abs(version)){ case 5: for(i = 0; i < nvar; i++) { InStringBinary(fp, 32, datalabel); SET_STRING_ELT(varlabels, i, mkChar(datalabel)); } break; case 6: case 7: case 8: case 10: case 12: for(i = 0; i < nvar; i++) { InStringBinary(fp, 81, datalabel); SET_STRING_ELT(varlabels, i, mkChar(datalabel)); } } setAttrib(df, install("var.labels"), varlabels); UNPROTECT(1); /* Expansion Fields. These include variable/dataset 'characteristics' (-char-) variable/dataset 'notes' (-notes-) variable/dataset/values non-current language labels (-label language-) */ PROTECT(labeltable = allocVector(VECSXP, 0)); j = 0; while(RawByteBinary(fp, 1)) { if (abs(version) >= 7) /* manual is wrong here */ charlen = (InIntegerBinary(fp, 1, swapends)); else charlen = (InShortIntBinary(fp, 1, swapends)); if((charlen > 66)) { labeltable = lengthgets(labeltable, j+1); UNPROTECT(1); PROTECT(labeltable); PROTECT(tmp = allocVector(STRSXP, 3)); InStringBinary(fp, 33, datalabel); SET_STRING_ELT(tmp, 0, mkChar(datalabel)); InStringBinary(fp, 33, datalabel); SET_STRING_ELT(tmp, 1, mkChar(datalabel)); txt = R_Calloc((size_t) (charlen-66), char); InStringBinary(fp, (charlen-66), txt); SET_STRING_ELT(tmp, 2, mkChar(txt)); SET_VECTOR_ELT(labeltable, j, tmp); R_Free(txt); UNPROTECT(1); j++; } else for (i = 0; i < charlen; i++) InByteBinary(fp, 1); } if(j > 0) setAttrib(df, install("expansion.fields"), labeltable); UNPROTECT(1); //labeltable if (abs(version) >= 7) charlen = (InIntegerBinary(fp, 1, swapends)); else charlen = (InShortIntBinary(fp, 1, swapends)); if (charlen != 0) error(_("something strange in the file\n (Type 0 characteristic of nonzero length)")); /** The Data **/ if (version > 0) { /* not Stata/SE */ for(i = 0; i < nobs; i++){ for(j = 0; j < nvar; j++){ switch (INTEGER(types)[j]) { case STATA_FLOAT: REAL(VECTOR_ELT(df,j))[i] = InFloatBinary(fp, 0, swapends); break; case STATA_DOUBLE: REAL(VECTOR_ELT(df,j))[i] = InDoubleBinary(fp, 0, swapends); break; case STATA_INT: INTEGER(VECTOR_ELT(df,j))[i] = InIntegerBinary(fp, 0, swapends); break; case STATA_SHORTINT: INTEGER(VECTOR_ELT(df,j))[i] = InShortIntBinary(fp, 0, swapends); break; case STATA_BYTE: INTEGER(VECTOR_ELT(df,j))[i] = (int) InByteBinary(fp, 0); break; default: charlen = INTEGER(types)[j] - STATA_STRINGOFFSET; if(charlen > 244) { warning("invalid character string length -- truncating to 244 bytes"); charlen = 244; } InStringBinary(fp, charlen, stringbuffer); stringbuffer[charlen] = 0; SET_STRING_ELT(VECTOR_ELT(df, j), i, mkChar(stringbuffer)); break; } } } } else { for(i = 0; i < nobs; i++){ for(j = 0;j < nvar; j++){ switch (INTEGER(types)[j]) { case STATA_SE_FLOAT: REAL(VECTOR_ELT(df,j))[i] = InFloatBinary(fp, 0, swapends); break; case STATA_SE_DOUBLE: REAL(VECTOR_ELT(df,j))[i] = InDoubleBinary(fp, 0, swapends); break; case STATA_SE_INT: INTEGER(VECTOR_ELT(df,j))[i] = InIntegerBinary(fp, 0, swapends); break; case STATA_SE_SHORTINT: INTEGER(VECTOR_ELT(df,j))[i] = InShortIntBinary(fp, 0, swapends); break; case STATA_SE_BYTE: INTEGER(VECTOR_ELT(df,j))[i] = (int) InByteBinary(fp, 0); break; default: charlen = INTEGER(types)[j]-STATA_SE_STRINGOFFSET; if(charlen > 244) { warning("invalid character string length -- truncating to 244 bytes"); charlen = 244; } InStringBinary(fp, charlen, stringbuffer); stringbuffer[charlen] = 0; SET_STRING_ELT(VECTOR_ELT(df,j), i, mkChar(stringbuffer)); break; } } } } /** value labels **/ if (abs(version) > 5) { PROTECT_INDEX ipl, ipt; PROTECT_WITH_INDEX(labeltable = allocVector(VECSXP, 0), &ipl); PROTECT_WITH_INDEX(tmp = allocVector(STRSXP, 0), &ipt); for(j = 0; ; j++) { /* first int not needed, use fread directly to trigger EOF */ res = (int) fread((int *) aname, sizeof(int), 1, fp); if (feof(fp)) break; if (res != 1) warning(_("a binary read error occurred")); //resize the vectors REPROTECT(labeltable = lengthgets(labeltable, j+1), ipl); REPROTECT(tmp = lengthgets(tmp, j+1), ipt); InStringBinary(fp, varnamelength+1, aname); SET_STRING_ELT(tmp, j, mkChar(aname)); RawByteBinary(fp, 1); RawByteBinary(fp, 1); RawByteBinary(fp, 1); /*padding*/ nlabels = InIntegerBinary(fp, 1, swapends); totlen = InIntegerBinary(fp, 1, swapends); off = R_Calloc((size_t) nlabels, int); PROTECT(levels = allocVector(INTSXP, nlabels)); PROTECT(labels = allocVector(STRSXP, nlabels)); for(i = 0; i < nlabels; i++) off[i] = InIntegerBinary(fp, 1, swapends); for(i = 0; i < nlabels; i++) INTEGER(levels)[i] = InIntegerBinary(fp, 0, swapends); txt = R_Calloc((size_t) totlen, char); InStringBinary(fp, totlen, txt); for(i = 0; i < nlabels; i++) SET_STRING_ELT(labels, i, mkChar(txt+off[i])); namesgets(levels, labels); SET_VECTOR_ELT(labeltable, j, levels); R_Free(off); R_Free(txt); UNPROTECT(2);/* levels, labels */ } namesgets(labeltable, tmp); UNPROTECT(1); /*tmp*/ } /** tidy up **/ PROTECT(row_names = allocVector(STRSXP, nobs)); for (i = 0; i < nobs; i++) { snprintf(datalabel, 81, "%d", i+1); SET_STRING_ELT(row_names,i,mkChar(datalabel)); } setAttrib(df, R_RowNamesSymbol, row_names); UNPROTECT(1); PROTECT(sversion = allocVector(INTSXP,1)); INTEGER(sversion)[0] = (version == -7)? version : abs(version); setAttrib(df, install("version"), sversion); UNPROTECT(1); if (abs(version) > 5) { if(j > 0) setAttrib(df, install("label.table"), labeltable); UNPROTECT(1); /*labeltable*/; } UNPROTECT(2); /* types, df */ return(df); } #include #include SEXP do_readStata(SEXP call) { SEXP fname, result; FILE *fp; if ((sizeof(double)!=8) | (sizeof(int)!=4) | (sizeof(float)!=4)) error(_("can not yet read Stata .dta on this platform")); if (!isValidString(fname = CADR(call))) error(_("first argument must be a file name\n")); fp = fopen(R_ExpandFileName(CHAR(STRING_ELT(fname,0))), "rb"); if (!fp) error(_("unable to open file: '%s'"), strerror(errno)); result = R_LoadStataData(fp); fclose(fp); return result; } /** low level output **/ static void OutIntegerBinary(int i, FILE * fp, int naok) { i = (((i == NA_INTEGER) & !naok) ? STATA_INT_NA : i); if (fwrite(&i, sizeof(int), 1, fp) != 1) error(_("a binary write error occurred")); } static void OutByteBinary(unsigned char i, FILE * fp) { if (fwrite(&i, sizeof(char), 1, fp) != 1) error(_("a binary write error occurred")); } static void OutDataByteBinary(int i, FILE * fp) { i=(unsigned char) ((i == NA_INTEGER) ? STATA_BYTE_NA : i); if (fwrite(&i, sizeof(char), 1, fp) != 1) error(_("a binary write error occurred")); } static void OutShortIntBinary(int i,FILE * fp) { unsigned char first,second; #ifdef WORDS_BIGENDIAN first = (unsigned char)(i >> 8); second = i & 0xff; #else first = i & 0xff; second = (unsigned char)(i >> 8); #endif if (fwrite(&first, sizeof(char), 1, fp) != 1) error(_("a binary write error occurred")); if (fwrite(&second, sizeof(char), 1, fp) != 1) error(_("a binary write error occurred")); } static void OutDoubleBinary(double d, FILE * fp, int naok) { d = (R_FINITE(d) ? d : STATA_DOUBLE_NA); if (fwrite(&d, sizeof(double), 1, fp) != 1) error(_("a binary write error occurred")); } static void OutStringBinary(const char *buffer, FILE * fp, int nchar) { if (nchar == 0) return; if (fwrite(buffer, nchar, 1, fp) != 1) error(_("a binary write error occurred")); } static char* nameMangleOut(char *stataname, int len) { for(int i = 0; i < len; i++) if (stataname[i] == '.') stataname[i] = '_'; return stataname; } /* Writes out a value label (name, and then labels and levels). * theselevels can be R_NilValue in which case the level values will be * written out as 1,2,3, ... */ static Rboolean writeStataValueLabel(const char *labelName, const SEXP theselabels, const SEXP theselevels, const int namelength, FILE *fp) { int i, txtlen; size_t len; if(!isString(theselabels)) return FALSE; if (!isNull(theselevels) && ((TYPEOF(theselevels)!=INTSXP && TYPEOF(theselevels)!=REALSXP) || LENGTH(theselabels) != LENGTH(theselevels))) return FALSE; len = 4*2*(length(theselabels)+1); txtlen = 0; for (i = 0; i < length(theselabels); i++) txtlen += strlen(CHAR(STRING_ELT(theselabels, i))) + 1; len += txtlen; OutIntegerBinary((int)len, fp, 0); /* length of table */ char labelName2[namelength + 1]; strncpy(labelName2, labelName, namelength + 1); // nameMangleOut changes its arg. OutStringBinary(nameMangleOut(labelName2, (int)strlen(labelName)), fp, namelength); OutByteBinary(0, fp); /* label format name */ OutByteBinary(0, fp); OutByteBinary(0, fp); OutByteBinary(0, fp); /*padding*/ OutIntegerBinary(length(theselabels), fp, 0); OutIntegerBinary(txtlen, fp, 0); /* offsets */ len = 0; for (i = 0; i < length(theselabels); i++){ OutIntegerBinary((int)len, fp, 0); len += strlen(CHAR(STRING_ELT(theselabels,i))) + 1; } /* values: just 1,2,3,...*/ if(isNull(theselevels)){ for (i = 0; i < length(theselabels); i++) OutIntegerBinary(i+1, fp, 0); } else{ if(TYPEOF(theselevels) == INTSXP){ for (i = 0; i < length(theselevels); i++) OutIntegerBinary(INTEGER(theselevels)[i], fp, 0); } else{ for (i = 0; i < length(theselevels); i++) OutIntegerBinary((int) REAL(theselevels)[i], fp, 0); } } /* the actual labels */ for(i = 0; i < length(theselabels); i++) { len = strlen(CHAR(STRING_ELT(theselabels, i))); OutStringBinary(CHAR(STRING_ELT(theselabels,i)), fp, (int)len); OutByteBinary(0, fp); txtlen -= len+1; if (txtlen < 0) error(_("this should happen: overrun")); } if (txtlen > 0) error(_("this should happen: underrun")); return TRUE; } // workhorse of R's write.dta() : void R_SaveStataData(FILE *fp, SEXP df, int version, SEXP leveltable) { int i, j, k = 0, l, nvar, nobs, charlen; char datalabel[81] = "Written by R. ", timestamp[18], aname[33]; char format9g[50] = "%9.0g", strformat[50] = ""; const char *thisnamechar; SEXP names, types, theselabels, orig_names, vlabels, dlabel, exp_fields, exp_field, curr_val_labels, label_table, names_lt, theselabelslevels; int namelength = 8; int fmtlist_len = 12; if (version >= 7) namelength=32; if (version >= 10) fmtlist_len = 49; /* names are 32 characters in version 7 */ /** first write the header **/ if (version == 6) OutByteBinary((char) VERSION_6, fp); /* release */ else if (version == 7) OutByteBinary((char) VERSION_7, fp); else if (version == 8) /* and also 9, mapped in R code */ OutByteBinary((char) VERSION_8, fp); else if (version == 10) /* see comment above */ OutByteBinary((char) VERSION_114, fp); OutByteBinary((char) CN_TYPE_NATIVE, fp); OutByteBinary(1, fp); /* filetype */ OutByteBinary(0, fp); /* padding */ nvar = length(df); OutShortIntBinary(nvar, fp); nobs = length(VECTOR_ELT(df, 0)); OutIntegerBinary(nobs, fp, 1); /* number of cases */ PROTECT(dlabel = getAttrib(df, install("datalabel"))); if(!isNull(dlabel) && isString(dlabel) && LENGTH(dlabel) == 1) strncpy(datalabel, CHAR(STRING_ELT(dlabel, 0)), 80); UNPROTECT(1); datalabel[80] = '\0'; OutStringBinary(datalabel, fp, 81); /* FIXME: use a real time */ for(i = 0; i < 18; i++) timestamp[i] = 0; OutStringBinary(timestamp, fp, 18); /* file creation time - zero terminated string */ /** write variable descriptors **/ /** types **/ /* FIXME: writes everything as double or integer to save effort*/ /* we should honor the "Csingle" attribute and also write logicals as byte rather than long */ PROTECT(types = allocVector(INTSXP, nvar)); if (version <= 7) { for(i = 0;i < nvar; i++){ switch(TYPEOF(VECTOR_ELT(df, i))){ case LGLSXP: OutByteBinary(STATA_BYTE, fp); break; case INTSXP: OutByteBinary(STATA_INT, fp); break; case REALSXP: OutByteBinary(STATA_DOUBLE, fp); break; case STRSXP: /* NB: there is a 244 byte limit on strings */ charlen = 0; for(j = 0; j < nobs; j++){ k = (int) strlen(CHAR(STRING_ELT(VECTOR_ELT(df, i), j))); if (k > charlen) charlen = k; } if(charlen > 244) warning("character strings of >244 bytes in column %d will be truncated", i+1); charlen = (charlen < 244) ? charlen : 244; OutByteBinary((unsigned char)(charlen+STATA_STRINGOFFSET), fp); INTEGER(types)[i] = charlen; break; default: error(_("unknown data type")); break; } } } else { /* version 8, 10 */ for(i = 0; i < nvar; i++){ switch(TYPEOF(VECTOR_ELT(df, i))){ case LGLSXP: OutByteBinary(STATA_SE_BYTE, fp); break; case INTSXP: OutByteBinary(STATA_SE_INT, fp); break; case REALSXP: OutByteBinary(STATA_SE_DOUBLE, fp); break; case STRSXP: /* NB: there is a 244 byte limit on strings */ charlen = 0; for(j = 0;j < nobs; j++){ k = (int) strlen(CHAR(STRING_ELT(VECTOR_ELT(df, i),j))); if (k > charlen) charlen = k; } if(charlen > 244) warning("character strings of >244 bytes in column %d will be truncated", i+1); charlen = (charlen < 244) ? charlen : 244; OutByteBinary((unsigned char)(charlen+STATA_SE_STRINGOFFSET), fp); INTEGER(types)[i] = charlen; break; default: error(_("unknown data type")); break; } } } /** names truncated to 8 (or 32 for v>=7) characters**/ PROTECT(names = getAttrib(df, R_NamesSymbol)); for (i = 0; i < nvar;i ++){ strncpy(aname, CHAR(STRING_ELT(names, i)), namelength); OutStringBinary(nameMangleOut(aname, namelength), fp, namelength); OutByteBinary(0, fp); } /** sortlist -- not relevant **/ for (i = 0; i < 2*(nvar+1); i++) OutByteBinary(0, fp); /** format list: arbitrarily write numbers as %9g format but strings need accurate types */ for (i = 0; i < nvar; i++) { if (TYPEOF(VECTOR_ELT(df,i)) == STRSXP){ /* string types are at most 244 characters so we can't get a buffer overflow in sprintf **/ snprintf(strformat, 50, "%%%ds", INTEGER(types)[i]); OutStringBinary(strformat, fp, fmtlist_len); } else { OutStringBinary(format9g, fp, fmtlist_len); } } /** value labels. These are stored as the names of label formats, which are themselves stored later in the file. The label format has the same name as the variable. **/ PROTECT(curr_val_labels = getAttrib(df, install("val.labels"))); for(i = 0; i < nvar; i++) { if (VECTOR_ELT(leveltable, i) == R_NilValue){ /* no label */ for(j = 0; j < namelength+1; j++) OutByteBinary(0, fp); } else { /* label */ //If we remember what the value label was called, use that. Otherwise use the var name if(!isNull(curr_val_labels) && isString(curr_val_labels) && LENGTH(curr_val_labels) > i) strncpy(aname, CHAR(STRING_ELT(curr_val_labels, i)), namelength); else strncpy(aname, CHAR(STRING_ELT(names, i)), namelength); OutStringBinary(nameMangleOut(aname, namelength), fp, namelength); OutByteBinary(0, fp); } } UNPROTECT(1); /** Variable Labels -- Uses "var.labels" attribute if is a string vector of the right length, otherwise the the variable name (FIXME: this is now just the same abbreviated name) **/ PROTECT(vlabels = getAttrib(df, install("var.labels"))); if(!isNull(vlabels) && isString(vlabels) && LENGTH(vlabels) == nvar){ for(i = 0; i < nvar; i++) { strncpy(datalabel,CHAR(STRING_ELT(vlabels,i)),80); datalabel[80] = '\0'; OutStringBinary(datalabel, fp, 81); } } else{ PROTECT(orig_names = getAttrib(df,install("orig.names"))); for(i = 0; i < nvar; i++) { strncpy(datalabel,CHAR(STRING_ELT(orig_names,i)),80); datalabel[80] = '\0'; OutStringBinary(datalabel, fp, 81); } UNPROTECT(1); } UNPROTECT(1); /** Expansion fields. Only existing ones are type-1 fields (first byte is 1). This includes dataset/variables characteristics, multilingual data (dataset/variable labels, value label attachments, language list), and notes. Don't have documentation for pre-version7 format (are the first two fields still 33 bytes?) **/ PROTECT(exp_fields = getAttrib(df, install("expansion.fields"))); if(!isNull(exp_fields) && TYPEOF(exp_fields) == VECSXP && abs(version) >= 7){ for(i = 0; i< LENGTH(exp_fields); i++) { char tmp[namelength]; PROTECT(exp_field = VECTOR_ELT(exp_fields, i)); if(!isNull(exp_field) && isString(exp_field) && LENGTH(exp_field) == 3) { OutByteBinary(1, fp); OutIntegerBinary(2*(namelength+1) + (length(STRING_ELT(exp_field,2))+1), fp, 1); memset(tmp, 0, namelength); strncpy(tmp, CHAR(STRING_ELT(exp_field, 0)), namelength); OutStringBinary(tmp, fp, namelength); OutByteBinary(0, fp); memset(tmp, 0, namelength); strncpy(tmp, CHAR(STRING_ELT(exp_field, 1)), namelength); OutStringBinary(tmp, fp, namelength); OutByteBinary(0, fp); OutStringBinary(CHAR(STRING_ELT(exp_field, 2)), fp, length(STRING_ELT(exp_field, 2))); OutByteBinary(0, fp); } UNPROTECT(1); } } UNPROTECT(1); //The last block is always zeros OutByteBinary(0, fp); OutByteBinary(0, fp); OutByteBinary(0, fp); if (version >= 7) { /*longer in version 7. This is wrong in the manual*/ OutByteBinary(0, fp); OutByteBinary(0, fp); } /** The Data **/ for(i = 0; i < nobs; i++){ for(j = 0;j < nvar; j++){ switch (TYPEOF(VECTOR_ELT(df, j))) { case LGLSXP: OutDataByteBinary(LOGICAL(VECTOR_ELT(df, j))[i], fp); break; case INTSXP: OutIntegerBinary(INTEGER(VECTOR_ELT(df, j))[i], fp, 0); break; case REALSXP: OutDoubleBinary(REAL(VECTOR_ELT(df, j))[i], fp, 0); break; case STRSXP: /* Up to 244 bytes should be written, zero-padded */ k = length(STRING_ELT(VECTOR_ELT(df, j), i)); if (k == 0) error("empty string is not valid in Stata's documented format"); if(k > 244) k = 244; OutStringBinary(CHAR(STRING_ELT(VECTOR_ELT(df, j), i)), fp, k); for(l = INTEGER(types)[j]-k; l > 0; l--) OutByteBinary(0, fp); break; default: error(_("this should not happen.")); break; } } } /** value labels: pp92-94 of 'Programming' manual in v7.0 **/ PROTECT(curr_val_labels = getAttrib(df, install("val.labels"))); for(i = 0;i < nvar; i++){ theselabels = VECTOR_ELT(leveltable, i); if (!isNull(theselabels)){ //If we remember what the value label was called, use that. Otherwise use the var name if(!isNull(curr_val_labels) && isString(curr_val_labels) && LENGTH(curr_val_labels) > i) strncpy(aname, CHAR(STRING_ELT(curr_val_labels, i)), namelength); else strncpy(aname, CHAR(STRING_ELT(names, i)), namelength); writeStataValueLabel(aname, theselabels, R_NilValue, namelength, fp); } } PROTECT(label_table = getAttrib(df, install("label.table"))); if(TYPEOF(label_table) == VECSXP){ PROTECT(names_lt = getAttrib(label_table, R_NamesSymbol)); if(!isNull(names_lt) && LENGTH(label_table) == LENGTH(names_lt)){ for(i=0; i 10)) error(_("can only write version 6-10 formats")); leveltable = CAD4R(call); R_SaveStataData(fp, df, version, leveltable); fclose(fp); return R_NilValue; } foreign/src/sfm.h0000644000175100001440000000466613245463577013502 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified 2000 Saikat DebRoy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #if !sfm_h #define sfm_h 1 #include "foreign.h" /* System file manager (sfm). This module is in charge of reading and writing system files. For now, only ordinary system files are supported; in the future, PC+ compatible system files should be supported, too. sfm is an fhuser, so see file-handle.h for the fhuser interface. */ /* Information produced by sfm_read_dictionary() that doesn't fit into a dictionary struct. */ struct sfm_read_info { char creation_date[10]; /* `dd mmm yy' plus a null. */ char creation_time[9]; /* `hh:mm:ss' plus a null. */ int endianness; /* BIG or LITTLE. */ int compressed; /* 0=no, 1=yes. */ int ncases; /* -1 if unknown. */ char product[61]; /* Product name plus a null. */ int encoding; /* 2 or 3 or Windows codepage? */ }; struct dictionary; struct file_handle; union value; struct dictionary *sfm_read_dictionary (struct file_handle *, struct sfm_read_info *); int sfm_read_case (struct file_handle *, union value *, struct dictionary *); void sfm_maybe_close (struct file_handle *); /* Information needed by sfm_write_dictionary(). */ struct sfm_write_info { /* Read by sfm_write_dictionary(). */ struct file_handle *h; /* File handle. */ struct dictionary *dict; /* Primary dictionary. */ int compress; /* 1=compress, 0=do not compress. */ /* Written by sfm_write_dictionary(). */ int case_size; /* Number of R_flt64 elements per case. */ }; int sfm_write_dictionary (struct sfm_write_info *); int sfm_write_case (struct file_handle *, const R_flt64* elem, int n_elem); #endif /* !sfm_h */ foreign/src/pfm-read.c0000644000175100001440000006224714530662000014356 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2001 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #include #include #include #include #include #include #include #include #include #include "foreign.h" #include "avl.h" #include "file-handle.h" #include "format.h" #include "pfm.h" #include "var.h" #if !PSPP && !__GCC__ #define inline #endif /* Clamps A to be between B and C. */ #define range(A, B, C) \ ((A) < (B) ? (B) : ((A) > (C) ? (C) : (A))) /* Divides nonnegative X by positive Y, rounding up. */ #define DIV_RND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y)) /* Returns nonnegative difference between {nonnegative X} and {the least multiple of positive Y greater than or equal to X}. */ #if __GNUC__ && !__STRICT_ANSI__ #define REM_RND_UP(X, Y) \ ({ \ int rem = (X) % (Y); \ rem ? (Y) - rem : 0; \ }) #else #define REM_RND_UP(X, Y) \ ((X) % (Y) ? (Y) - (X) % (Y) : 0) #endif /* Rounds X up to the next multiple of Y. */ #define ROUND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y) * (Y)) /* Rounds X down to the previous multiple of Y. */ #define ROUND_DOWN(X, Y) \ ((X) / (Y) * (Y)) #undef DEBUGGING /*#define DEBUGGING 1*/ /* pfm's file_handle extension. */ struct pfm_fhuser_ext { FILE *file; /* Actual file. */ struct dictionary *dict; /* File's dictionary. */ int weight_index; /* 0-based index of weight variable, or -1. */ unsigned char *trans; /* 256-byte character set translation table. */ int nvars; /* Number of variables. */ int *vars; /* Variable widths, 0 for numeric. */ int case_size; /* Number of `value's per case. */ unsigned char buf[83]; /* Input buffer. */ unsigned char *bp; /* Buffer pointer. */ int cc; /* Current character. */ }; #ifndef Macintosh static struct fh_ext_class pfm_r_class; #else static void pfm_close (struct file_handle * h); static struct fh_ext_class pfm_r_class = { 5, "reading as a portable file", pfm_close, }; #endif extern char *xstrdup(const char *s); /* Closes a portable file after we're done with it. */ static void pfm_close (struct file_handle * h) { struct pfm_fhuser_ext *ext = h->ext; R_Free (ext->vars); R_Free (ext->trans); if (EOF == fclose (ext->file)) error(_("%s: Closing portable file: %s"), h->fn, strerror (errno)); } /* Displays the message X with corrupt_msg, then jumps to the lossage label. */ #define lose(X) \ do \ { \ warning X; \ goto lossage; \ } \ while (0) /* Read an 80-character line into handle H's buffer. Return success. */ static int fill_buf (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; if (80 != fread (ext->buf, 1, 80, ext->file)) lose ((_("Unexpected end of file"))); /* PORTME: line ends. */ { int c; c = getc (ext->file); if (c != '\n' && c != '\r') lose ((_("Bad line end"))); c = getc (ext->file); if (c != '\n' && c != '\r') ungetc (c, ext->file); } if (ext->trans) { int i; for (i = 0; i < 80; i++) ext->buf[i] = ext->trans[ext->buf[i]]; } ext->bp = ext->buf; return 1; lossage: return 0; } /* Read a single character into cur_char. Return success; */ static int read_char (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; if (ext->bp >= &ext->buf[80] && !fill_buf (h)) return 0; ext->cc = *ext->bp++; return 1; } /* Advance a single character. */ #define advance() if (!read_char (h)) goto lossage /* Skip a single character if present, and return whether it was skipped. */ static inline int skip_char (struct file_handle *h, int c) { struct pfm_fhuser_ext *ext = h->ext; if (ext->cc == c) { advance (); return 1; } lossage: return 0; } /* Skip a single character if present, and return whether it was skipped. */ #define pfm_match(C) skip_char (h, C) static int read_header (struct file_handle *h); static int read_version_data (struct file_handle *h, struct pfm_read_info *inf); static int read_variables (struct file_handle *h); static int read_value_label (struct file_handle *h); void dump_dictionary (struct dictionary *dict); /* Reads the dictionary from file with handle H, and returns it in a dictionary structure. This dictionary may be modified in order to rename, reorder, and delete variables, etc. */ struct dictionary * pfm_read_dictionary (struct file_handle *h, struct pfm_read_info *inf) { /* The file handle extension record. */ struct pfm_fhuser_ext *ext; /* Check whether the file is already open. */ if (h->class == &pfm_r_class) { ext = h->ext; return ext->dict; } else if (h->class != NULL) { error(_("cannot read file %s as portable file: already opened for %s"), fh_handle_name (h), h->class->name); return NULL; } #if 0 msg (VM (1), ("%s: Opening portable-file handle %s for reading"), fh_handle_filename (h), fh_handle_name (h)); #endif /* Open the physical disk file. */ ext = (struct pfm_fhuser_ext *) R_Calloc(1, struct pfm_fhuser_ext); ext->file = fopen (R_ExpandFileName(h->norm_fn), "rb"); if (ext->file == NULL) { R_Free (ext); error(_("an error occurred while opening \"%s\" for reading as a portable file: %s"), h->fn, strerror (errno)); return NULL; } /* Initialize the sfm_fhuser_ext structure. */ h->class = &pfm_r_class; h->ext = ext; ext->dict = NULL; ext->trans = NULL; if (!fill_buf (h)) goto lossage; advance (); /* Read the header. */ if (!read_header (h)) goto lossage; /* Read version, date info, product identification. */ if (!read_version_data (h, inf)) goto lossage; /* Read variables. */ if (!read_variables (h)) goto lossage; /* Value labels. */ while (pfm_match (77 /* D */)) if (!read_value_label (h)) goto lossage; if (!pfm_match (79 /* F */)) lose ((_("Data record expected"))); #if 0 msg (VM (2), ("Read portable-file dictionary successfully")); #endif #if DEBUGGING dump_dictionary (ext->dict); #endif return ext->dict; lossage: /* Come here on unsuccessful completion. */ fclose (ext->file); if (ext && ext->dict) free_dictionary (ext->dict); R_Free (ext); h->class = NULL; h->ext = NULL; error(_("error reading portable-file dictionary")); return NULL; } /* Read a floating point value and return its value, or NA_REAL on error. */ static double read_float (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; double num = 0.; int got_dot = 0; int got_digit = 0; int exponent = 0; int neg = 0; /* Skip leading spaces. */ while (pfm_match (126 /* space */)) ; if (pfm_match (137 /* * */)) { advance (); /* Probably a dot (.) but doesn't appear to matter. */ return NA_REAL; } else if (pfm_match (141 /* - */)) neg = 1; for (;;) { if (ext->cc >= 64 /* 0 */ && ext->cc <= 93 /* T */) { got_digit++; /* Make sure that multiplication by 30 will not overflow. */ if (num > DBL_MAX * (1. / 30.)) /* The value of the digit doesn't matter, since we have already gotten as many digits as can be represented in a `double'. This doesn't necessarily mean the result will overflow. The exponent may reduce it to within range. We just need to record that there was another digit so that we can multiply by 10 later. */ ++exponent; else num = (num * 30.0) + (ext->cc - 64); /* Keep track of the number of digits after the decimal point. If we just divided by 30 here, we would lose precision. */ if (got_dot) --exponent; } else if (!got_dot && ext->cc == 127 /* . */) /* Record that we have found the decimal point. */ got_dot = 1; else /* Any other character terminates the number. */ break; advance (); } if (!got_digit) lose ((_("Number expected"))); if (ext->cc == 130 /* + */ || ext->cc == 141 /* - */) { /* Get the exponent. */ long int exp = 0; int neg_exp = ext->cc == 141 /* - */; for (;;) { advance (); if (ext->cc < 64 /* 0 */ || ext->cc > 93 /* T */) break; if (exp > LONG_MAX / 30) goto overflow; exp = exp * 30 + (ext->cc - 64); } /* We don't check whether there were actually any digits, but we probably should. */ if (neg_exp) exp = -exp; exponent += exp; } if (!pfm_match (142 /* / */)) lose ((_("Missing numeric terminator"))); /* Multiply NUM by 30 to the EXPONENT power, checking for overflow. */ if (exponent < 0) num *= pow (30.0, (double) exponent); else if (exponent > 0) { if (num > DBL_MAX * pow (30.0, (double) -exponent)) goto overflow; num *= pow (30.0, (double) exponent); } if (neg) return -num; else return num; overflow: if (neg) return R_NegInf; else return R_PosInf; lossage: return NA_REAL; } /* Read an integer and return its value, or NA_INTEGER on failure. */ int read_int (struct file_handle *h) { double f = read_float (h); if (f == NA_REAL) goto lossage; if (floor (f) != f || f >= INT_MAX || f <= INT_MIN) lose ((_("Bad integer format"))); return (int) f; lossage: return NA_INTEGER; } /* Reads a string and returns its value in a static buffer, or NULL on failure. The buffer can be deallocated by calling with a NULL argument. */ static unsigned char * read_string (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; static unsigned char *buf; int n; if (h == NULL) { R_Free (buf); buf = NULL; return NULL; } else if (buf == NULL) buf = R_Calloc (65536, unsigned char); n = read_int (h); if (n == NA_INTEGER) return NULL; if (n < 0 || n > 65535) lose ((_("Bad string length %d"), n)); { int i; for (i = 0; i < n; i++) { buf[i] = (unsigned char) ext->cc; advance (); } } buf[n] = 0; return buf; lossage: return NULL; } /* Reads the 464-byte file header. */ static int read_header (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; /* For now at least, just ignore the vanity splash strings. */ { int i; for (i = 0; i < 200; i++) advance (); } { unsigned char src[256]; int trans_temp[256]; int i; for (i = 0; i < 256; i++) { src[i] = (unsigned char) ext->cc; advance (); } for (i = 0; i < 256; i++) trans_temp[i] = -1; /* 0 is used to mark untranslatable characters, so we have to mark it specially. */ trans_temp[src[64]] = 64; for (i = 0; i < 256; i++) if (trans_temp[src[i]] == -1) trans_temp[src[i]] = i; ext->trans = R_Calloc (256, unsigned char); for (i = 0; i < 256; i++) ext->trans[i] = trans_temp[i] == -1 ? 0 : (unsigned char) trans_temp[i]; /* Translate the input buffer. */ for (i = 0; i < 80; i++) ext->buf[i] = ext->trans[ext->buf[i]]; ext->cc = ext->trans[ext->cc]; } { unsigned char sig[8] = {92, 89, 92, 92, 89, 88, 91, 93}; int i; for (i = 0; i < 8; i++) if (!pfm_match (sig[i])) lose ((_("Missing SPSSPORT signature"))); } return 1; lossage: return 0; } /* Reads the version and date info record, as well as product and subproduct identification records if present. */ int read_version_data (struct file_handle *h, struct pfm_read_info *inf) { struct pfm_fhuser_ext *ext = h->ext; /* Version. */ if (!pfm_match (74 /* A */)) lose ((_("Unrecognized version code %d"), ext->cc)); /* Date. */ { static const int map[] = {6, 7, 8, 9, 3, 4, 0, 1}; char *date = (char *) read_string (h); int i; if (!date) return 0; if (strlen (date) != 8) lose ((_("Bad date string length %lu"), strlen (date))); if (date[0] == ' ') /* the first field of date can be ' ' in some windows versions of SPSS */ date[0] = '0'; for (i = 0; i < 8; i++) { if (date[i] < 64 /* 0 */ || date[i] > 73 /* 9 */) lose ((_("Bad character in date"))); if (inf) inf->creation_date[map[i]] = date[i] - 64 /* 0 */ + '0'; } if (inf) { inf->creation_date[2] = inf->creation_date[5] = ' '; inf->creation_date[10] = 0; } } /* Time. */ { static const int map[] = {0, 1, 3, 4, 6, 7}; char *time = (char *) read_string (h); int i; if (!time) return 0; if (strlen (time) != 6) lose ((_("Bad time string length %lu"), strlen (time))); if (time[0] == ' ') /* the first field of date can be ' ' in some windows versions of SPSS */ time[0] = '0'; for (i = 0; i < 6; i++) { if (time[i] < 64 /* 0 */ || time[i] > 73 /* 9 */) lose ((_("Bad character in time"))); if (inf) inf->creation_time[map[i]] = time[i] - 64 /* 0 */ + '0'; } if (inf) { inf->creation_time[2] = inf->creation_time[5] = ' '; inf->creation_time[8] = 0; } } /* Product. */ if (pfm_match (65 /* 1 */)) { char *product; product = (char *) read_string (h); if (product == NULL) return 0; if (inf) { // placate gcc 8 strncpy (inf->product, product, 60); inf->product[60] = '\0'; } } else if (inf) inf->product[0] = 0; /* Subproduct. */ if (pfm_match (67 /* 3 */)) { char *subproduct; subproduct = (char *) read_string (h); if (subproduct == NULL) return 0; if (inf) { strncpy (inf->subproduct, subproduct, 60); inf->subproduct[60] = '\0'; } } else if (inf) inf->subproduct[0] = 0; return 1; lossage: return 0; } static int convert_format (struct file_handle *h, int fmt[3], struct fmt_spec *v, struct variable *vv) { if (fmt[0] < 0 || (size_t) fmt[0] >= sizeof translate_fmt / sizeof *translate_fmt) lose ((_("%s: Bad format specifier byte %d"), vv->name, fmt[0])); v->type = translate_fmt[fmt[0]]; v->w = fmt[1]; v->d = fmt[2]; /* FIXME? Should verify the resulting specifier more thoroughly. */ if (v->type == -1) lose ((_("%s: Bad format specifier byte (%d)"), vv->name, fmt[0])); if ((vv->type == ALPHA) ^ ((formats[v->type].cat & FCAT_STRING) != 0)) lose ((_("%s variable %s has %s format specifier %s"), vv->type == ALPHA ? "String" : "Numeric", vv->name, formats[v->type].cat & FCAT_STRING ? "string" : "numeric", formats[v->type].name)); return 1; lossage: return 0; } /* Translation table from SPSS character code to this computer's native character code (which is probably ASCII). */ static const unsigned char spss2ascii[256] = { " " "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ." "<(+|&[]!$*);^-/|,%_>?`:$@'=\" ~- 0123456789 -() {}\\ " " " }; /* Translate string S into ASCII. */ static void asciify (char *s) { for (; *s; s++) *s = spss2ascii[(unsigned char) *s]; } static int parse_value (struct file_handle *, union value *, struct variable *); /* Read information on all the variables. */ static int read_variables (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; int i; if (!pfm_match (68 /* 4 */)) lose ((_("Expected variable count record"))); ext->nvars = read_int (h); if (ext->nvars <= 0 || ext->nvars == NA_INTEGER) lose ((_("Invalid number of variables %d"), ext->nvars)); ext->vars = R_Calloc (ext->nvars, int); /* Purpose of this value is unknown. It is typically 161. */ { int x = read_int (h); if (x == NA_INTEGER) goto lossage; /* According to Akio Sone, there are cases where this is 160 */ /* if (x != 161) */ /* warning("Unexpected flag value %d.", x); */ } ext->dict = new_dictionary (0); if (pfm_match (70 /* 6 */)) { char *name = (char *) read_string (h); if (!name) goto lossage; strcpy (ext->dict->weight_var, name); asciify (ext->dict->weight_var); } for (i = 0; i < ext->nvars; i++) { int width; unsigned char *name; int fmt[6]; struct variable *v; int j; if (!pfm_match (71 /* 7 */)) lose ((_("Expected variable record"))); width = read_int (h); if (width == NA_INTEGER) goto lossage; if (width < 0) lose ((_("Invalid variable width %d"), width)); ext->vars[i] = width; name = read_string (h); if (name == NULL) goto lossage; for (j = 0; j < 6; j++) { fmt[j] = read_int (h); if (fmt[j] == NA_INTEGER) goto lossage; } /* Verify first character of variable name. Weirdly enough, there is no # character in the SPSS portable character set, so we can't check for it. */ if (strlen ((char *) name) > 8) lose ((_("position %d: Variable name has %lu characters"), i, strlen ((char *) name))); if ((name[0] < 74 /* A */ || name[0] > 125 /* Z */) && name[0] != 152 /* @ */) lose ((_("position %d: Variable name begins with invalid character"), i)); if (name[0] >= 100 /* a */ && name[0] <= 125 /* z */) { warning(_("position %d: Variable name begins with lowercase letter %c"), i, name[0] - 100 + 'a'); name[0] -= 26 /* a - A */; } /* Verify remaining characters of variable name. */ for (j = 1; j < (int) strlen ((char *) name); j++) { int c = name[j]; if (c >= 100 /* a */ && c <= 125 /* z */) { warning(_("position %d: Variable name character %d is lowercase letter %c"), i, j + 1, c - 100 + 'a'); name[j] -= 26 /* z - Z */; } else if ((c >= 64 /* 0 */ && c <= 99 /* Z */) || c == 127 /* . */ || c == 152 /* @ */ || c == 136 /* $ */ || c == 146 /* _ */) name[j] = (unsigned char) c; else lose ((_("position %d: character `\\%03o' is not valid in a variable name"), i, c)); } asciify ((char *) name); if (width < 0 || width > 65535) lose ((_("Bad width %d for variable %s"), width, name)); v = create_variable (ext->dict, (char *) name, width ? ALPHA : NUMERIC, width); v->get.fv = v->fv; if (v == NULL) lose ((_("Duplicate variable name %s"), name)); if (!convert_format (h, &fmt[0], &v->print, v)) goto lossage; if (!convert_format (h, &fmt[3], &v->write, v)) goto lossage; /* Range missing values. */ if (pfm_match (75 /* B */)) { v->miss_type = MISSING_RANGE; if (!parse_value (h, &v->missing[0], v) || !parse_value (h, &v->missing[1], v)) goto lossage; } else if (pfm_match (74 /* A */)) { v->miss_type = MISSING_HIGH; if (!parse_value (h, &v->missing[0], v)) goto lossage; } else if (pfm_match (73 /* 9 */)) { v->miss_type = MISSING_LOW; if (!parse_value (h, &v->missing[0], v)) goto lossage; } /* Single missing values. */ while (pfm_match (72 /* 8 */)) { static const int map_next[MISSING_COUNT] = { MISSING_1, MISSING_2, MISSING_3, -1, MISSING_RANGE_1, MISSING_LOW_1, MISSING_HIGH_1, -1, -1, -1, }; static const int map_ofs[MISSING_COUNT] = { -1, 0, 1, 2, -1, -1, -1, 2, 1, 1, }; v->miss_type = map_next[v->miss_type]; if (v->miss_type == -1) lose ((_("Bad missing values for %s"), v->name)); if (map_ofs[v->miss_type] == -1) error("read_variables : map_ofs[v->miss_type] == -1"); if (!parse_value (h, &v->missing[map_ofs[v->miss_type]], v)) goto lossage; } if (pfm_match (76 /* C */)) { char *label = (char *) read_string (h); if (label == NULL) goto lossage; v->label = xstrdup (label); asciify (v->label); } } ext->case_size = ext->dict->nval; if (ext->dict->weight_var[0] != 0 && !find_dict_variable (ext->dict, ext->dict->weight_var)) lose ((_("Weighting variable %s not present in dictionary"), ext->dict->weight_var)); return 1; lossage: return 0; } /* Parse a value for variable VV into value V. Returns success. */ static int parse_value (struct file_handle *h, union value *v, struct variable *vv) { if (vv->type == ALPHA) { char *mv = (char *) read_string (h); int j; if (mv == NULL) return 0; // do it this way as strings might not be nul-terminated. // strncpy ((char *) v->s, mv, 8); /* Value labels are always padded with spaces. */ memset(v->s, ' ', 8); for (j = 0; j < 8; j++) if (mv[j]) v->s[j] = spss2ascii[(unsigned char)mv[j]]; else break; } else { v->f = read_float (h); if (v->f == NA_REAL) return 0; } return 1; } /* Parse a value label record and return success. */ static int read_value_label (struct file_handle *h) { struct pfm_fhuser_ext *ext = h->ext; /* Variables. */ int nv; struct variable **v; /* Labels. */ int n_labels; int i; nv = read_int (h); if (nv == NA_INTEGER) return 0; v = R_Calloc (nv, struct variable *); for (i = 0; i < nv; i++) { char *name = (char *) read_string (h); if (name == NULL) goto lossage; asciify (name); v[i] = find_dict_variable (ext->dict, name); if (v[i] == NULL) lose ((_("Unknown variable %s while parsing value labels"), name)); if (v[0]->width != v[i]->width) lose ((_("Cannot assign value labels to %s and %s, which have different variable types or widths"), v[0]->name, v[i]->name)); } n_labels = read_int (h); if (n_labels == NA_INTEGER) goto lossage; for (i = 0; i < n_labels; i++) { union value val; char *label; struct value_label *vl; int j; if (!parse_value (h, &val, v[0])) goto lossage; label = (char *) read_string (h); if (label == NULL) goto lossage; asciify (label); /* Create a label. */ vl = R_Calloc (1, struct value_label); vl->v = val; vl->s = xstrdup (label); vl->ref_count = nv; /* Assign the value_label's to each variable. */ for (j = 0; j < nv; j++) { struct variable *var = v[j]; struct value_label *old; int width = var->width; /* Create AVL tree if necessary. */ if (!var->val_lab) var->val_lab = R_avl_create (val_lab_cmp, (void *) &width); old = R_avl_replace (var->val_lab, vl); if (old == NULL) continue; if (var->type == NUMERIC) lose ((_("Duplicate label for value %g for variable %s"), vl->v.f, var->name)); else lose ((_("Duplicate label for value `%.*s' for variable %s"), var->width, vl->v.s, var->name)); free_value_label (old); } } R_Free (v); return 1; lossage: R_Free (v); return 0; } /* Copies SRC to DEST, truncating to N characters or right-padding with spaces to N characters as necessary. Does not append a null character. SRC must be null-terminated. */ static void st_bare_pad_copy (char *dest, const char *src, size_t n) { size_t len = strlen (src); if (len >= n) memcpy (dest, src, n); else { memcpy (dest, src, len); memset (&dest[len], ' ', n - len); } } /* Reads one case from portable file H into the value array PERM according to the instuctions given in associated dictionary DICT, which must have the get.fv elements appropriately set. Returns nonzero only if successful. */ int pfm_read_case (struct file_handle *h, union value *perm, struct dictionary *dict) { struct pfm_fhuser_ext *ext = h->ext; union value *temp, *tp; int i; /* Check for end of file. */ if (ext->cc == 99 /* Z */) return 0; /* The first concern is to obtain a full case relative to the data file. (Cases in the data file have no particular relationship to cases in the active file.) */ tp = temp = R_Calloc (ext->case_size, union value); for (tp = temp, i = 0; i < ext->nvars; i++) if (ext->vars[i] == 0) { tp->f = read_float (h); if (tp->f == NA_REAL) goto unexpected_eof; tp++; } else { char *s = (char *) read_string (h); if (s == NULL) goto unexpected_eof; asciify (s); st_bare_pad_copy ((char *) tp->s, s, ext->vars[i]); tp += DIV_RND_UP (ext->vars[i], MAX_SHORT_STRING); } /* Translate a case in data file format to a case in active file format. */ for (i = 0; i < dict->nvar; i++) { struct variable *v = dict->var[i]; if (v->get.fv == -1) continue; if (v->type == NUMERIC) perm[v->fv].f = temp[v->get.fv].f; else memcpy (perm[v->fv].c, &temp[v->get.fv], v->width); } R_Free (temp); return 1; unexpected_eof: lose ((_("End of file midway through case"))); lossage: R_Free (temp); return 0; } #ifndef Macintosh static struct fh_ext_class pfm_r_class = { 5, "reading as a portable file", pfm_close, }; #endif foreign/src/format.h0000644000175100001440000000632413245463577014176 0ustar hornikusers/* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ */ #if !format_h #define format_h 1 /* Display format types. */ /* See the definitions of these functions and variables when modifying this list: misc.c:convert_fmt_ItoO() sfm-read.c:parse_format_spec() data-in.c:parse_string_as_format() data-out.c:convert_format_to_string(). */ #define DEFFMT(LABEL, NAME, N_ARGS, IMIN_W, IMAX_W, OMIN_W, OMAX_W, \ CAT, OUTPUT, SPSS_FMT) \ LABEL, enum { #include "pspp-format-def.h" FMT_NUMBER_OF_FORMATS }; #undef DEFFMT /* Describes one of the display formats above. */ struct fmt_desc { char name[9]; /* `DATETIME' is the longest name. */ int n_args; /* 1=width; 2=width.decimals. */ int Imin_w, Imax_w; /* Bounds on input width. */ int Omin_w, Omax_w; /* Bounds on output width. */ int cat; /* Categories. */ int output; /* Output format. */ int spss; /* Equivalent SPSS output format. */ }; /* Display format categories. */ enum { FCAT_BLANKS_SYSMIS = 001, /* 1=All-whitespace means SYSMIS. */ FCAT_EVEN_WIDTH = 002, /* 1=Width must be even. */ FCAT_STRING = 004, /* 1=String input/output format. */ FCAT_SHIFT_DECIMAL = 010, /* 1=Automatically shift decimal point on output--used for fixed-point formats. */ FCAT_OUTPUT_ONLY = 020 /* 1=This is not an input format. */ }; /* Display format. */ struct fmt_spec { int type; /* One of the above constants. */ int w; /* Width. */ int d; /* Number of implied decimal places. */ }; /* Descriptions of all the display formats above. */ extern struct fmt_desc formats[]; /* Translates SPSS formats to PSPP formats. */ extern const int translate_fmt[40]; union value; int parse_format_specifier (struct fmt_spec *input, int allow_xt); int parse_format_specifier_name (const char **cp, int allow_xt); int check_input_specifier (const struct fmt_spec *spec); int check_output_specifier (const struct fmt_spec *spec); int check_string_specifier (const struct fmt_spec *spec, int min_len); void convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output); int parse_string_as_format (const char *s, int len, const struct fmt_spec *fp, int fc, union value *v); int data_out (char *s, const struct fmt_spec *fp, const union value *v); char *fmt_to_string (const struct fmt_spec *); void num_to_string (double v, char *s, int w, int d); #endif /* !format_h */ foreign/src/avl.c0000644000175100001440000004161614167602122013447 0ustar hornikusers/* libavl - manipulates AVL trees. Copyright (C) 1998-9, 2000 Free Software Foundation, Inc. Modified for R foreign library by Saikat DebRoy . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, a copy is available at http://www.r-project.org/Licenses/ The author may be contacted at on the Internet, or as Ben Pfaff, 12167 Airport Rd, DeWitt MI 48820, USA through more mundane means. */ /* This is file avl.c in libavl. */ #include #include #include #include "avl.h" #if !PSPP && !__GCC__ #define inline #endif #if !PSPP #if __GNUC__ >= 2 #define unused __attribute__ ((unused)) #else #define unused #endif #endif static void Free_fn(void *x, void *y) { R_Free(x); } /* Creates an AVL tree in POOL (which can be NULL). POOL is owned by the caller, not by the AVL tree. CMP is a order function for the data to be stored in the tree. PARAM is arbitrary data that becomes an argument to the comparison function. */ avl_tree * R_avl_create (MAYBE_POOL avl_comparison_func cmp, void *param) { avl_tree *tree; if (!(cmp != NULL)) error("assert failed : cmp != NULL"); #if PSPP if (pool) tree = pool_alloc (pool, sizeof *tree); else #endif tree = R_Calloc (1, avl_tree); #if PSPP tree->pool = pool; #endif tree->root.link[0] = NULL; tree->root.link[1] = NULL; tree->cmp = cmp; tree->count = 0; tree->param = param; return tree; } /* Destroy tree TREE. Function FREE_FUNC is called for every node in the tree as it is destroyed. No effect if the tree has an pool owner and free_func is NULL. The caller owns the pool and must destroy it itself. Do not attempt to reuse the tree after it has been freed. Create a new one. */ void R_avl_destroy (avl_tree *tree, avl_node_func free_func) { if (!(tree != NULL)) error("assert failed : tree != NULL"); #if PSPP if (free_func || tree->pool == NULL) #endif { /* Uses Knuth's Algorithm 2.3.1T as modified in exercise 13 (postorder traversal). */ /* T1. */ avl_node *an[AVL_MAX_HEIGHT]; /* Stack A: nodes. */ char ab[AVL_MAX_HEIGHT]; /* Stack A: bits. */ int ap = 0; /* Stack A: height. */ avl_node *p = tree->root.link[0]; for (;;) { /* T2. */ while (p != NULL) { /* T3. */ ab[ap] = 0; an[ap++] = p; p = p->link[0]; } /* T4. */ for (;;) { if (ap == 0) goto done; p = an[--ap]; if (ab[ap] == 0) { ab[ap++] = 1; p = p->link[1]; break; } if (free_func) free_func (p->data, tree->param); #if PSPP if (tree->pool == NULL) #endif R_Free (p); } } } done: #if PSPP if (tree->pool == NULL) #endif R_Free (tree); } /* avl_destroy() with FREE_FUNC hardcoded as free(). */ void R_avl_free (avl_tree *tree) { R_avl_destroy (tree, Free_fn); } /* Return the number of nodes in TREE. */ int R_avl_count (const avl_tree *tree) { if (!(tree != NULL)) error("assert failed : tree != NULL"); return tree->count; } /* Allocates room for a new avl_node in POOL, or using R_Calloc() if POOL is NULL. */ #if PSPP static inline avl_node * new_node (struct pool *pool) { if (pool != NULL) return pool_alloc (pool, sizeof (avl_node)); else return R_Calloc (1, avl_node); } #else static inline avl_node * new_node (void) { return R_Calloc (1, avl_node); } #define new_node(POOL) \ new_node () #endif #ifdef UNUSED /* Copy the contents of TREE to a new tree in POOL. If COPY is non-NULL, then each data item is passed to function COPY, and the return values are inserted into the new tree; otherwise, the items are copied verbatim from the old tree to the new tree. Returns the new tree. */ avl_tree * R_avl_copy (MAYBE_POOL const avl_tree *tree, avl_copy_func copy) { /* This is a combination of Knuth's Algorithm 2.3.1C (copying a binary tree) and Algorithm 2.3.1T as modified by exercise 12 (preorder traversal). */ avl_tree *new_tree; /* PT1. */ const avl_node *pa[AVL_MAX_HEIGHT]; /* Stack PA: nodes. */ const avl_node **pp = pa; /* Stack PA: stack pointer. */ const avl_node *p = &tree->root; /* QT1. */ avl_node *qa[AVL_MAX_HEIGHT]; /* Stack QA: nodes. */ avl_node **qp = qa; /* Stack QA: stack pointer. */ avl_node *q; if (!(tree != NULL)) error("assert failed : tree != NULL"); #if PSPP new_tree = R_avl_create (pool, tree->cmp, tree->param); #else new_tree = R_avl_create (tree->cmp, tree->param); #endif new_tree->count = tree->count; q = &new_tree->root; for (;;) { /* C4. */ if (p->link[0] != NULL) { avl_node *r = new_node (pool); r->link[0] = r->link[1] = NULL; q->link[0] = r; } /* C5: Find preorder successors of P and Q. */ goto start; for (;;) { /* PT2. */ while (p != NULL) { goto escape; start: /* PT3. */ *pp++ = p; *qp++ = q; p = p->link[0]; q = q->link[0]; } /* PT4. */ if (pp == pa) { if (!(qp == qa)) error("assert failed : qp == qa"); return new_tree; } p = *--pp; q = *--qp; /* PT5. */ p = p->link[1]; q = q->link[1]; } escape: /* C2. */ if (p->link[1]) { avl_node *r = new_node (pool); r->link[0] = r->link[1] = NULL; q->link[1] = r; } /* C3. */ q->bal = p->bal; if (copy == NULL) q->data = p->data; else q->data = copy (p->data, tree->param); } } /* Walk tree TREE in inorder, calling WALK_FUNC at each node. Passes PARAM to WALK_FUNC. */ void R_avl_walk (const avl_tree *tree, avl_node_func walk_func, void *param) { /* Uses Knuth's algorithm 2.3.1T (inorder traversal). */ if (!(tree && walk_func)) error("assert failed : tree && walk_func"); { /* T1. */ const avl_node *an[AVL_MAX_HEIGHT]; /* Stack A: nodes. */ const avl_node **ap = an; /* Stack A: stack pointer. */ const avl_node *p = tree->root.link[0]; for (;;) { /* T2. */ while (p != NULL) { /* T3. */ *ap++ = p; p = p->link[0]; } /* T4. */ if (ap == an) return; p = *--ap; /* T5. */ walk_func (p->data, param); p = p->link[1]; } } } /* Each call to this function for a given TREE and TRAV return the next item in the tree in inorder. Initialize the first element of TRAV (init) to 0 before calling the first time. Returns NULL when out of elements. */ void * R_avl_traverse (const avl_tree *tree, avl_traverser *trav) { if (!(tree && trav)) error("assert failed : tree && trav"); /* Uses Knuth's algorithm 2.3.1T (inorder traversal). */ if (trav->init == 0) { /* T1. */ trav->init = 1; trav->nstack = 0; trav->p = tree->root.link[0]; } else /* T5. */ trav->p = trav->p->link[1]; for (;;) { /* T2. */ while (trav->p != NULL) { /* T3. */ trav->stack[trav->nstack++] = trav->p; trav->p = trav->p->link[0]; } /* T4. */ if (trav->nstack == 0) { trav->init = 0; return NULL; } trav->p = trav->stack[--trav->nstack]; /* T5. */ return trav->p->data; } } #endif /* Search TREE for an item matching ITEM. If found, returns a pointer to the address of the item. If none is found, ITEM is inserted into the tree, and a pointer to the address of ITEM is returned. In either case, the pointer returned can be changed by the caller, or the returned data item can be directly edited, but the key data in the item must not be changed. */ static void ** avl_probe (avl_tree *tree, void *item) { /* Uses Knuth's Algorithm 6.2.3A (balanced tree search and insertion), but caches results of comparisons. In empirical tests this eliminates about 25% of the comparisons seen under random insertions. */ /* A1. */ avl_node *t; avl_node *s, *p, *q, *r; if (!(tree != NULL)) error("assert failed : tree != NULL"); t = &tree->root; s = p = t->link[0]; if (s == NULL) { tree->count++; if (!(tree->count == 1)) error("assert failed : tree->count == 1"); q = t->link[0] = new_node (tree->pool); q->data = item; q->link[0] = q->link[1] = NULL; q->bal = 0; return &q->data; } for (;;) { /* A2. */ int diff = tree->cmp (item, p->data, tree->param); /* A3. */ if (diff < 0) { p->cache = 0; q = p->link[0]; if (q == NULL) { p->link[0] = q = new_node (tree->pool); break; } } /* A4. */ else if (diff > 0) { p->cache = 1; q = p->link[1]; if (q == NULL) { p->link[1] = q = new_node (tree->pool); break; } } else /* A2. */ return &p->data; /* A3, A4. */ if (q->bal != 0) t = p, s = q; p = q; } /* A5. */ tree->count++; q->data = item; q->link[0] = q->link[1] = NULL; q->bal = 0; /* A6. */ r = p = s->link[(int) s->cache]; while (p != q) { p->bal = p->cache * 2 - 1; p = p->link[(int) p->cache]; } /* A7. */ if (s->cache == 0) { /* a = -1. */ if (s->bal == 0) { s->bal = -1; return &q->data; } else if (s->bal == +1) { s->bal = 0; return &q->data; } if (!(s->bal == -1)) error("assert failed : s->bal == -1"); if (r->bal == -1) { /* A8. */ p = r; s->link[0] = r->link[1]; r->link[1] = s; s->bal = r->bal = 0; } else { /* A9. */ if (!(r->bal == +1)) error("assert failed : r->bal == +1"); p = r->link[1]; r->link[1] = p->link[0]; p->link[0] = r; s->link[0] = p->link[1]; p->link[1] = s; if (p->bal == -1) s->bal = 1, r->bal = 0; else if (p->bal == 0) s->bal = r->bal = 0; else { if (!(p->bal == +1)) error("assert failed : p->bal == +1"); s->bal = 0, r->bal = -1; } p->bal = 0; } } else { /* a == +1. */ if (s->bal == 0) { s->bal = 1; return &q->data; } else if (s->bal == -1) { s->bal = 0; return &q->data; } if (!(s->bal == +1)) error("assert failed : s->bal == +1"); if (r->bal == +1) { /* A8. */ p = r; s->link[1] = r->link[0]; r->link[0] = s; s->bal = r->bal = 0; } else { /* A9. */ if (!(r->bal == -1)) error("assert failed : r->bal == -1"); p = r->link[0]; r->link[0] = p->link[1]; p->link[1] = r; s->link[1] = p->link[0]; p->link[0] = s; if (p->bal == +1) s->bal = -1, r->bal = 0; else if (p->bal == 0) s->bal = r->bal = 0; else { if (!(p->bal == -1)) error("assert failed : p->bal == -1"); s->bal = 0, r->bal = 1; } p->bal = 0; } } /* A10. */ if (t != &tree->root && s == t->link[1]) t->link[1] = p; else t->link[0] = p; return &q->data; } /* Search TREE for an item matching ITEM, and return it if found. */ void * R_avl_find (const avl_tree *tree, const void *item) { const avl_node *p; if (!(tree != NULL)) error("assert failed : tree != NULL"); for (p = tree->root.link[0]; p; ) { int diff = tree->cmp (item, p->data, tree->param); if (diff < 0) p = p->link[0]; else if (diff > 0) p = p->link[1]; else return p->data; } return NULL; } #ifdef UNUSED /* Searches AVL tree TREE for an item matching ITEM. If found, the item is removed from the tree and the actual item found is returned to the caller. If no item matching ITEM exists in the tree, returns NULL. */ void * R_avl_delete (avl_tree *tree, const void *item) { /* Uses my Algorithm D, which can be found at http://www.msu.edu/user/pfaffben/avl. Algorithm D is based on Knuth's Algorithm 6.2.2D (Tree deletion) and 6.2.3A (Balanced tree search and insertion), as well as the notes on pages 465-466 of Vol. 3. */ /* D1. */ avl_node *pa[AVL_MAX_HEIGHT]; /* Stack P: Nodes. */ char a[AVL_MAX_HEIGHT]; /* Stack P: Bits. */ int k = 1; /* Stack P: Pointer. */ avl_node **q; avl_node *p; if (!(tree != NULL)) error("assert failed : tree != NULL"); a[0] = 0; pa[0] = &tree->root; p = tree->root.link[0]; for (;;) { /* D2. */ int diff; if (p == NULL) return NULL; diff = tree->cmp (item, p->data, tree->param); if (diff == 0) break; /* D3, D4. */ pa[k] = p; if (diff < 0) { p = p->link[0]; a[k] = 0; } else if (diff > 0) { p = p->link[1]; a[k] = 1; } k++; } tree->count--; item = p->data; /* D5. */ q = &pa[k - 1]->link[(int) a[k - 1]]; if (p->link[1] == NULL) { *q = p->link[0]; if (*q) (*q)->bal = 0; } else { /* D6. */ avl_node *r = p->link[1]; if (r->link[0] == NULL) { r->link[0] = p->link[0]; *q = r; r->bal = p->bal; a[k] = 1; pa[k++] = r; } else { /* D7. */ avl_node *s = r->link[0]; int l = k++; a[k] = 0; pa[k++] = r; /* D8. */ while (s->link[0] != NULL) { r = s; s = r->link[0]; a[k] = 0; pa[k++] = r; } /* D9. */ a[l] = 1; pa[l] = s; s->link[0] = p->link[0]; r->link[0] = s->link[1]; s->link[1] = p->link[1]; s->bal = p->bal; *q = s; } } #if PSPP if (tree->pool == NULL) #endif Free (p); if (!(k > 0)) error("assert failed : k > 0"); /* D10. */ while (--k) { avl_node *s = pa[k], *r; if (a[k] == 0) { /* D10. */ if (s->bal == -1) { s->bal = 0; continue; } else if (s->bal == 0) { s->bal = 1; break; } if (!(s->bal == +1)) error("assert failed : s->bal == +1"); r = s->link[1]; if (!(r != NULL)) error("assert failed : r != NULL"); if (r->bal == 0) { /* D11. */ s->link[1] = r->link[0]; r->link[0] = s; r->bal = -1; pa[k - 1]->link[(int) a[k - 1]] = r; break; } else if (r->bal == +1) { /* D12. */ s->link[1] = r->link[0]; r->link[0] = s; s->bal = r->bal = 0; pa[k - 1]->link[(int) a[k - 1]] = r; } else { /* D13. */ if (!(r->bal == -1)) error("assert failed : r->bal == -1"); p = r->link[0]; r->link[0] = p->link[1]; p->link[1] = r; s->link[1] = p->link[0]; p->link[0] = s; if (p->bal == +1) s->bal = -1, r->bal = 0; else if (p->bal == 0) s->bal = r->bal = 0; else { if (!(p->bal == -1)) error("assert failed : p->bal == -1"); s->bal = 0, r->bal = +1; } p->bal = 0; pa[k - 1]->link[(int) a[k - 1]] = p; } } else { if (!(a[k] == 1)) error("assert failed : a[k] == 1"); /* D10. */ if (s->bal == +1) { s->bal = 0; continue; } else if (s->bal == 0) { s->bal = -1; break; } if (!(s->bal == -1)) error("assert failed : s->bal == -1"); r = s->link[0]; if (r == NULL || r->bal == 0) { /* D11. */ s->link[0] = r->link[1]; r->link[1] = s; r->bal = 1; pa[k - 1]->link[(int) a[k - 1]] = r; break; } else if (r->bal == -1) { /* D12. */ s->link[0] = r->link[1]; r->link[1] = s; s->bal = r->bal = 0; pa[k - 1]->link[(int) a[k - 1]] = r; } else if (r->bal == +1) { /* D13. */ p = r->link[1]; r->link[1] = p->link[0]; p->link[0] = r; s->link[0] = p->link[1]; p->link[1] = s; if (p->bal == -1) s->bal = 1, r->bal = 0; else if (p->bal == 0) s->bal = r->bal = 0; else { if (!(p->bal == 1)) error("assert failed : p->bal == 1"); s->bal = 0, r->bal = -1; } p->bal = 0; pa[k - 1]->link[(int) a[k - 1]] = p; } } } return (void *) item; } #endif /* Inserts ITEM into TREE. Returns NULL if the item was inserted, otherwise a pointer to the duplicate item. */ void * R_avl_insert (avl_tree *tree, void *item) { void **p; if (!(tree != NULL)) error("assert failed : tree != NULL"); p = avl_probe (tree, item); return (*p == item) ? NULL : *p; } /* If ITEM does not exist in TREE, inserts it and returns NULL. If a matching item does exist, it is replaced by ITEM and the item replaced is returned. The caller is responsible for freeing the item returned. */ void * R_avl_replace (avl_tree *tree, void *item) { void **p; if (!(tree != NULL)) error("assert failed : tree != NULL"); p = avl_probe (tree, item); if (*p == item) return NULL; else { void *r = *p; *p = item; return r; } } foreign/src/foreign.h0000644000175100001440000000365713245463574014342 0ustar hornikusers/* * * Common header file for the foreign package for R * * Copyright 2000-2000 Saikat DebRoy * Douglas M. Bates , * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * */ #ifndef FOREIGN_H #define FOREIGN_H #include #include #include #ifdef ENABLE_NLS #include #define _(String) dgettext ("foreign", String) #define gettext_noop(String) (String) #else #define _(String) (String) #define gettext_noop(String) (String) #endif #define CN_TYPE_BIG 1 #define CN_TYPE_LITTLE 2 #define CN_TYPE_XPORT 3 #define CN_TYPE_IEEEB CN_TYPE_BIG #define CN_TYPE_IEEEL CN_TYPE_LITTLE #define BIG 4321 #define LITTLE 1234 #define UNKNOWN 0000 #ifdef WORDS_BIGENDIAN # define CN_TYPE_NATIVE CN_TYPE_IEEEB # define endian BIG #else # define CN_TYPE_NATIVE CN_TYPE_IEEEL # define endian LITTLE #endif /* not WORDS_BIGENDIAN */ typedef int R_int32; /* typedef short int16; unused */ typedef double R_flt64; /* typedef float flt32; unused */ #define FPREP_IEEE754 754 #define FPREP FPREP_IEEE754 #ifdef max # undef max #endif #ifdef min # undef min #endif #define max(a,b) ((a) >= (b) ? (a) : (b)) #define min(a,b) ((a) <= (b) ? (a) : (b)) #endif /* FOREIGN_H */ foreign/src/shapefil.h0000644000175100001440000004070613245463577014503 0ustar hornikusers#ifndef _SHAPEFILE_H_INCLUDED #define _SHAPEFILE_H_INCLUDED /****************************************************************************** * * Project: Shapelib * Purpose: Primary include file for Shapelib. * Author: Frank Warmerdam, warmerdam@pobox.com * ****************************************************************************** * Copyright (c) 1999, Frank Warmerdam * * This software is available under the following "MIT Style" license, * or at the option of the licensee under the LGPL (see LICENSE.LGPL). This * option is discussed in more detail in shapelib.html. * * -- * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************** * * $Log: shapefil.h,v $ * Revision 1.11 2003/05/21 04:03:54 warmerda * expand tabs * * Revision 1.10 2003/04/21 19:02:56 warmerda * updated * * Revision 1.27 2003/04/21 18:30:37 warmerda * added header write/update public methods * * Revision 1.26 2002/09/29 00:00:08 warmerda * added FTLogical and logical attribute read/write calls * * Revision 1.25 2002/05/07 13:46:30 warmerda * added DBFWriteAttributeDirectly(). * * Revision 1.24 2002/04/10 16:59:54 warmerda * added SHPRewindObject * * Revision 1.23 2002/01/15 14:36:07 warmerda * updated email address * * Revision 1.22 2002/01/15 14:32:00 warmerda * try to improve SHPAPI_CALL docs * * Revision 1.21 2001/11/01 16:29:55 warmerda * move pabyRec into SHPInfo for thread safety * * Revision 1.20 2001/07/20 13:06:02 warmerda * fixed SHPAPI attribute for SHPTreeFindLikelyShapes * * Revision 1.19 2001/05/31 19:20:13 warmerda * added DBFGetFieldIndex() * * Revision 1.18 2001/05/31 18:15:40 warmerda * Added support for NULL fields in DBF files * * Revision 1.17 2001/05/23 13:36:52 warmerda * added use of SHPAPI_CALL * * Revision 1.16 2000/09/25 14:15:59 warmerda * added DBFGetNativeFieldType() * * Revision 1.15 2000/02/16 16:03:51 warmerda * added null shape support * * Revision 1.14 1999/11/05 14:12:05 warmerda * updated license terms * * Revision 1.13 1999/06/02 18:24:21 warmerda * added trimming code * * Revision 1.12 1999/06/02 17:56:12 warmerda * added quad'' subnode support for trees * * Revision 1.11 1999/05/18 19:11:11 warmerda * Added example searching capability * * Revision 1.10 1999/05/18 17:49:38 warmerda * added initial quadtree support * * Revision 1.9 1999/05/11 03:19:28 warmerda * added new Tuple api, and improved extension handling - add from candrsn * * Revision 1.8 1999/03/23 17:22:27 warmerda * Added extern "C" protection for C++ users of shapefil.h. * * Revision 1.7 1998/12/31 15:31:07 warmerda * Added the TRIM_DBF_WHITESPACE and DISABLE_MULTIPATCH_MEASURE options. * * Revision 1.6 1998/12/03 15:48:15 warmerda * Added SHPCalculateExtents(). * * Revision 1.5 1998/11/09 20:57:16 warmerda * Altered SHPGetInfo() call. * * Revision 1.4 1998/11/09 20:19:33 warmerda * Added 3D support, and use of SHPObject. * * Revision 1.3 1995/08/23 02:24:05 warmerda * Added support for reading bounds. * * Revision 1.2 1995/08/04 03:17:39 warmerda * Added header. * */ #include #ifdef USE_DBMALLOC #include #endif #ifdef __cplusplus extern "C" { #endif /************************************************************************/ /* Configuration options. */ /************************************************************************/ /* -------------------------------------------------------------------- */ /* Should the DBFReadStringAttribute() strip leading and */ /* trailing white space? */ /* -------------------------------------------------------------------- */ #define TRIM_DBF_WHITESPACE /* -------------------------------------------------------------------- */ /* Should we write measure values to the Multipatch object? */ /* Reportedly ArcView crashes if we do write it, so for now it */ /* is disabled. */ /* -------------------------------------------------------------------- */ #define DISABLE_MULTIPATCH_MEASURE /* -------------------------------------------------------------------- */ /* SHPAPI_CALL */ /* */ /* The following two macros are present to allow forcing */ /* various calling conventions on the Shapelib API. */ /* */ /* To force __stdcall conventions (needed to call Shapelib */ /* from Visual Basic and/or Dephi I believe) the makefile could */ /* be modified to define: */ /* */ /* /DSHPAPI_CALL=__stdcall */ /* */ /* If it is desired to force export of the Shapelib API without */ /* using the shapelib.def file, use the following definition. */ /* */ /* /DSHAPELIB_DLLEXPORT */ /* */ /* To get both at once it will be necessary to hack this */ /* include file to define: */ /* */ /* #define SHPAPI_CALL __declspec(dllexport) __stdcall */ /* #define SHPAPI_CALL1 __declspec(dllexport) * __stdcall */ /* */ /* The complexity of the situtation is partly caused by the */ /* peculiar requirement of Visual C++ that __stdcall appear */ /* after any "*"'s in the return value of a function while the */ /* __declspec(dllexport) must appear before them. */ /* -------------------------------------------------------------------- */ #ifdef SHAPELIB_DLLEXPORT # define SHPAPI_CALL __declspec(dllexport) # define SHPAPI_CALL1(x) __declspec(dllexport) x #endif #ifndef SHPAPI_CALL # define SHPAPI_CALL #endif #ifndef SHPAPI_CALL1 # define SHPAPI_CALL1(x) x SHPAPI_CALL #endif /************************************************************************/ /* SHP Support. */ /************************************************************************/ typedef struct { FILE *fpSHP; FILE *fpSHX; int nShapeType; /* SHPT_* */ int nFileSize; /* SHP file */ int nRecords; int nMaxRecords; int *panRecOffset; int *panRecSize; double adBoundsMin[4]; double adBoundsMax[4]; int bUpdated; unsigned char *pabyRec; int nBufSize; } SHPInfo; typedef SHPInfo * SHPHandle; /* -------------------------------------------------------------------- */ /* Shape types (nSHPType) */ /* -------------------------------------------------------------------- */ #define SHPT_NULL 0 #define SHPT_POINT 1 #define SHPT_ARC 3 #define SHPT_POLYGON 5 #define SHPT_MULTIPOINT 8 #define SHPT_POINTZ 11 #define SHPT_ARCZ 13 #define SHPT_POLYGONZ 15 #define SHPT_MULTIPOINTZ 18 #define SHPT_POINTM 21 #define SHPT_ARCM 23 #define SHPT_POLYGONM 25 #define SHPT_MULTIPOINTM 28 #define SHPT_MULTIPATCH 31 /* -------------------------------------------------------------------- */ /* Part types - everything but SHPT_MULTIPATCH just uses */ /* SHPP_RING. */ /* -------------------------------------------------------------------- */ #define SHPP_TRISTRIP 0 #define SHPP_TRIFAN 1 #define SHPP_OUTERRING 2 #define SHPP_INNERRING 3 #define SHPP_FIRSTRING 4 #define SHPP_RING 5 /* -------------------------------------------------------------------- */ /* SHPObject - represents on shape (without attributes) read */ /* from the .shp file. */ /* -------------------------------------------------------------------- */ typedef struct { int nSHPType; int nShapeId; /* -1 is unknown/unassigned */ int nParts; int *panPartStart; int *panPartType; int nVertices; double *padfX; double *padfY; double *padfZ; double *padfM; double dfXMin; double dfYMin; double dfZMin; double dfMMin; double dfXMax; double dfYMax; double dfZMax; double dfMMax; } SHPObject; /* -------------------------------------------------------------------- */ /* SHP API Prototypes */ /* -------------------------------------------------------------------- */ SHPHandle SHPAPI_CALL SHPOpen( const char * pszShapeFile, const char * pszAccess ); SHPHandle SHPAPI_CALL SHPCreate( const char * pszShapeFile, int nShapeType ); void SHPAPI_CALL SHPGetInfo( SHPHandle hSHP, int * pnEntities, int * pnShapeType, double * padfMinBound, double * padfMaxBound ); SHPObject SHPAPI_CALL1(*) SHPReadObject( SHPHandle hSHP, int iShape ); int SHPAPI_CALL SHPWriteObject( SHPHandle hSHP, int iShape, SHPObject * psObject ); void SHPAPI_CALL SHPDestroyObject( SHPObject * psObject ); void SHPAPI_CALL SHPComputeExtents( SHPObject * psObject ); SHPObject SHPAPI_CALL1(*) SHPCreateObject( int nSHPType, int nShapeId, int nParts, int * panPartStart, int * panPartType, int nVertices, double * padfX, double * padfY, double * padfZ, double * padfM ); SHPObject SHPAPI_CALL1(*) SHPCreateSimpleObject( int nSHPType, int nVertices, double * padfX, double * padfY, double * padfZ ); int SHPAPI_CALL SHPRewindObject( SHPHandle hSHP, SHPObject * psObject ); void SHPAPI_CALL SHPClose( SHPHandle hSHP ); void SHPAPI_CALL SHPWriteHeader( SHPHandle hSHP ); const char SHPAPI_CALL1(*) SHPTypeName( int nSHPType ); const char SHPAPI_CALL1(*) SHPPartTypeName( int nPartType ); /* -------------------------------------------------------------------- */ /* Shape quadtree indexing API. */ /* -------------------------------------------------------------------- */ /* this can be two or four for binary or quad tree */ #define MAX_SUBNODE 4 typedef struct shape_tree_node { /* region covered by this node */ double adfBoundsMin[4]; double adfBoundsMax[4]; /* list of shapes stored at this node. The papsShapeObj pointers or the whole list can be NULL */ int nShapeCount; int *panShapeIds; SHPObject **papsShapeObj; int nSubNodes; struct shape_tree_node *apsSubNode[MAX_SUBNODE]; } SHPTreeNode; typedef struct { SHPHandle hSHP; int nMaxDepth; int nDimension; SHPTreeNode *psRoot; } SHPTree; SHPTree SHPAPI_CALL1(*) SHPCreateTree( SHPHandle hSHP, int nDimension, int nMaxDepth, double *padfBoundsMin, double *padfBoundsMax ); void SHPAPI_CALL SHPDestroyTree( SHPTree * hTree ); int SHPAPI_CALL SHPWriteTree( SHPTree *hTree, const char * pszFilename ); SHPTree SHPAPI_CALL SHPReadTree( const char * pszFilename ); int SHPAPI_CALL SHPTreeAddObject( SHPTree * hTree, SHPObject * psObject ); int SHPAPI_CALL SHPTreeAddShapeId( SHPTree * hTree, SHPObject * psObject ); int SHPAPI_CALL SHPTreeRemoveShapeId( SHPTree * hTree, int nShapeId ); void SHPAPI_CALL SHPTreeTrimExtraNodes( SHPTree * hTree ); int SHPAPI_CALL1(*) SHPTreeFindLikelyShapes( SHPTree * hTree, double * padfBoundsMin, double * padfBoundsMax, int * ); int SHPAPI_CALL SHPCheckBoundsOverlap( double *, double *, double *, double *, int ); /************************************************************************/ /* DBF Support. */ /************************************************************************/ typedef struct { FILE *fp; int nRecords; int nRecordLength; int nHeaderLength; int nFields; int *panFieldOffset; int *panFieldSize; int *panFieldDecimals; char *pachFieldType; char *pszHeader; int nCurrentRecord; int bCurrentRecordModified; char *pszCurrentRecord; int bNoHeader; int bUpdated; } DBFInfo; typedef DBFInfo * DBFHandle; typedef enum { FTString, FTInteger, FTDouble, FTLogical, FTDate, FTInvalid } DBFFieldType; #define XBASE_FLDHDR_SZ 32 DBFHandle SHPAPI_CALL DBFOpen( const char * pszDBFFile, const char * pszAccess ); DBFHandle SHPAPI_CALL DBFCreate( const char * pszDBFFile ); int SHPAPI_CALL DBFGetFieldCount( DBFHandle psDBF ); int SHPAPI_CALL DBFGetRecordCount( DBFHandle psDBF ); int SHPAPI_CALL DBFAddField( DBFHandle hDBF, const char * pszFieldName, DBFFieldType eType, int nWidth, int nDecimals ); DBFFieldType SHPAPI_CALL DBFGetFieldInfo( DBFHandle psDBF, int iField, char * pszFieldName, int * pnWidth, int * pnDecimals ); int SHPAPI_CALL DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName); int SHPAPI_CALL DBFReadIntegerAttribute( DBFHandle hDBF, int iShape, int iField ); double SHPAPI_CALL DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField ); const char SHPAPI_CALL1(*) DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField ); const char SHPAPI_CALL1(*) DBFReadLogicalAttribute( DBFHandle hDBF, int iShape, int iField ); int SHPAPI_CALL DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField ); int SHPAPI_CALL DBFWriteIntegerAttribute( DBFHandle hDBF, int iShape, int iField, int nFieldValue ); int SHPAPI_CALL DBFWriteDoubleAttribute( DBFHandle hDBF, int iShape, int iField, double dFieldValue ); int SHPAPI_CALL DBFWriteStringAttribute( DBFHandle hDBF, int iShape, int iField, const char * pszFieldValue ); int SHPAPI_CALL DBFWriteNULLAttribute( DBFHandle hDBF, int iShape, int iField ); int SHPAPI_CALL DBFWriteLogicalAttribute( DBFHandle hDBF, int iShape, int iField, const char lFieldValue); int SHPAPI_CALL DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, void * pValue ); const char SHPAPI_CALL1(*) DBFReadTuple(DBFHandle psDBF, int hEntity ); int SHPAPI_CALL DBFWriteTuple(DBFHandle psDBF, int hEntity, void * pRawTuple ); DBFHandle SHPAPI_CALL DBFCloneEmpty(DBFHandle psDBF, const char * pszFilename ); void SHPAPI_CALL DBFClose( DBFHandle hDBF ); void SHPAPI_CALL DBFUpdateHeader( DBFHandle hDBF ); char SHPAPI_CALL DBFGetNativeFieldType( DBFHandle hDBF, int iField ); #ifdef __cplusplus } #endif #endif /* ndef _SHAPEFILE_H_INCLUDED */ foreign/R/0000755000175100001440000000000013521004716012121 5ustar hornikusersforeign/R/writeForeignSAS.R0000644000175100001440000001413213324716023015262 0ustar hornikusers### This file is part of the 'foreign' package for R. # Copyright (c) 2004-2015 R Development Core Team # Enhancements Copyright (c) 2006 Stephen Weigand # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ make.SAS.names <- function(varnames, validvarname = c("V7", "V6")){ validvarname <- match.arg(validvarname) nmax <- if(validvarname == "V7") 32L else 8L x <- sub("^([0-9])", "_\\1", varnames) x <- gsub("[^a-zA-Z0-9_]", "_", x) x <- abbreviate(x, minlength = nmax) if (any(nchar(x) > nmax) || any(duplicated(x))) stop(gettextf("Cannot uniquely abbreviate the variable names to %d or fewer characters", nmax), domain = NA) names(x) <- varnames x } make.SAS.formats <- function(varnames){ x <- sub("^([0-9])", "_\\1", varnames) x <- gsub("[^a-zA-Z0-9_]", "_", x) x <- sub("([0-9])$", "\\1f", x) # can't end in digit so append 'f' x <- abbreviate(x, minlength = 8L) if(any(nchar(x) > 8L) || any(duplicated(x))) stop("Cannot uniquely abbreviate format names to conform to ", " eight-character limit and not ending in a digit") names(x) <- varnames x } writeForeignSAS <- function(df, datafile, codefile, dataname = "rdata", validvarname = c("V7", "V6"), libpath = NULL) { ## FIXME: re-write this to hold a connection open factors <- vapply(df, is.factor, NA) strings <- vapply(df, is.character, NA) logicals <- vapply(df, is.logical, NA) dates <- vapply(df, FUN = function(x) inherits(x, "Date") || inherits(x, "dates") || inherits(x, "date"), NA) xdates <- vapply(df, FUN = function(x) inherits(x, "dates") || inherits(x, "date"), NA) datetimes <- vapply(df, FUN = function(x) inherits(x, "POSIXt"), NA) varlabels <- names(df) varnames <- make.SAS.names(names(df), validvarname = validvarname) if (any(varnames != varlabels)) message("Some variable names were abbreviated or otherwise altered.") dfn <- df if (any(factors)) dfn[factors] <- lapply(dfn[factors], as.numeric) if (any(logicals)) dfn[logicals] <- lapply(dfn[logicals], as.numeric) if (any(datetimes)) dfn[datetimes] <- lapply(dfn[datetimes], function(x) format(x, "%d%b%Y %H:%M:%S")) if(any(xdates)) dfn[xdates] <- lapply(dfn[xdates], function(x) as.Date(as.POSIXct(x))) ## https://kb.iu.edu/d/aydn write.table(dfn, file = datafile, row.names = FALSE, col.names = FALSE, sep = ",", quote = TRUE, na = "", qmethod = "double") lrecl <- max(vapply(readLines(datafile), nchar, 0L)) + 4L cat("* Written by R;\n", file = codefile) cat("* ", deparse(sys.call(-2L))[1L], ";\n\n", file = codefile, append = TRUE) if (any(factors)) { cat("PROC FORMAT;\n", file=codefile, append=TRUE) fmtnames <- make.SAS.formats(varnames[factors]) fmt.values <- lapply(df[, factors, drop = FALSE], levels) names(fmt.values) <- fmtnames for (f in fmtnames) { cat("value", f, "\n", file = codefile, append = TRUE) values <- fmt.values[[f]] for(i in 1L:length(values)){ cat(" ", i,"=", adQuote(values[i]), "\n", file=codefile, append = TRUE) } cat(";\n\n",file=codefile,append = TRUE) } } if (!is.null(libpath)) { cat("libname ROutput '", libpath, "';\n", file = codefile, append = TRUE, sep = "") cat("DATA ROutput.", dataname, ";\n", file = codefile, append = TRUE, sep = "") } else cat("DATA ", dataname, ";\n", file = codefile, append = TRUE) if (any(strings)) { cat("LENGTH", file = codefile, append = TRUE) lengths <- vapply(df[,strings, drop = FALSE], FUN = function(x) max(nchar(x), 1L, na.rm = TRUE), 0L) names(lengths) <- varnames[strings] for(v in varnames[strings]) cat("\n", v, "$", lengths[v], file = codefile, append = TRUE) cat("\n;\n\n", file = codefile, append = TRUE) } if (any(dates)) { cat("INFORMAT", file = codefile, append = TRUE) for(v in varnames[dates]) cat("\n", v, file = codefile, append = TRUE) cat("\n YYMMDD10.\n;\n\n", file = codefile, append = TRUE) } if (any(datetimes)) { cat("INFORMAT", file = codefile, append = TRUE) for(v in varnames[datetimes]) cat("\n", v, file = codefile, append = TRUE) cat("\n DATETIME18.\n;\n\n", file = codefile, append = TRUE) } cat("INFILE ",adQuote(datafile), "\n DSD", "\n LRECL=", lrecl, ";\n", file = codefile ,append = TRUE) cat("INPUT", file = codefile, append = TRUE) for(v in 1L:ncol(df)) cat("\n", varnames[v], file = codefile, append = TRUE) if(strings[v]) cat(" $ ", file = codefile, append = TRUE) cat("\n;\n", file = codefile, append = TRUE) for(v in 1L:ncol(df)) if (varnames[v] != names(varnames)[v]) cat("LABEL ", varnames[v],"=", adQuote(varlabels[v]), ";\n", file = codefile, append = TRUE) if (any(factors)) for (f in 1L:length(fmtnames)) cat("FORMAT", names(fmtnames)[f], paste(fmtnames[f],".", sep = ""), ";\n", file = codefile, append = TRUE) if (any(dates)) for(v in varnames[dates]) cat("FORMAT", v, "yymmdd10.;\n", file = codefile, append = TRUE) if (any(datetimes)) for(v in varnames[datetimes]) cat("FORMAT", v, "datetime18.;\n", file = codefile, append = TRUE) cat("RUN;\n", file= codefile, append = TRUE) } foreign/R/octave.R0000644000175100001440000002460213324716023013533 0ustar hornikusers### This file is part of the 'foreign' package for R. # Enhancements Copyright (c) 2004-2018 R Development Core Team # Copyright (c) 2004 Stephen Eglen # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ ## Read in a file in Octave text data format. read.octave <- function(file) { ## Read in a file in Octave text data format (as created by "save ## -ascii" in Octave 2.x) and return a list of the objects ## successfully read, along with information on read failures. ## E.g., create two variables in Octave ## octave> ident_mat = eye(3); ## octave> twopi = 2 * pi; ## octave> save -ascii 'octfile.dat' ## then load this file into R: ## > o <- read.octave("octfile.dat") ## > o ## $twopi ## [1] 6.283185 ## $ident.mat ## [,1] [,2] [,3] ## [1,] 1 0 0 ## [2,] 0 1 0 ## [3,] 0 0 1 skip_lines_to_next_item <- function(con) { ## Read in data from the connection until we hit the next ## variable (assuming "# name" is the first line for a new ## variable). We need to also handle the special case when this ## gets us to the end of the connection. looking <- TRUE while(looking) { line <- readLines(con, n = 1L) if(length(grep("^# name: ", line)) == 1L) { ## We have reached the next variable. pushBack(line, con) looking <- FALSE } else if(length(line) == 0L) { ## We have reached the end of file. looking <- FALSE } } } read_octave_matrix <- function(con) { ## Helper function: read in a real matrix/array. ## Format of the header varies depending on whether matrix is 2d ## or higher. So need to do a check first. line <- readLines(con, 1L) if(regexpr("^# rows:", line) > 0L) { ## Dealing with a 2d matrix; this header is of the form: ## # type: matrix ## # rows: 15 ## # columns: 15 ## followed by 15 rows of data ... nr <- as.integer(gsub("# rows: ", "", line)) nc <- as.integer(gsub("# columns: ", "", readLines(con, 1L))) data <- scan(con, nlines = nr, quiet = TRUE) matrix(data, nrow = nr, ncol = nc, byrow = TRUE) } else { ## Assume we have N-d array; this has the format: ## # type: matrix ## # ndims: 3 ## 15 15 6 ## followed by the data, one element per row. ## After reading in ndims (3 here), we read in the size of ## each dimension (15 x 15 x 6) and then read in the ## corresponding number of elements. ## ndims <- as.integer(gsub("# ndims: ", "", line)) dims <- scan(con, nlines = 1L, quiet = TRUE) data <- scan(con, n = prod(dims), quiet = TRUE) array(data, dim = dims) } } read_octave_complex_matrix <- function(con) { ## Helper function: read in a complex matrix/array. ## See read_octave_matrix(). line <- readLines(con, 1L) if(regexpr("^# rows:", line) > 0L) { nr <- as.integer(gsub("# rows: ", "", line)) nc <- as.integer(gsub("# columns: ", "", readLines(con, 1L))) data <- readLines(con, n = nr) cl <- paste(data, sep = "", collapse = "") c1 <- gsub("\\(", "", cl) c1 <- gsub("\\)", "", c1) c1 <- gsub(",", " ", c1) s <- unlist(strsplit(c1, " ")) nums <- as.numeric(s[-1L]) # Remove initial space. reals <- nums[seq.int(from = 1L, by = 2L, length.out = length(nums)/2)] imags <- nums[seq.int(from = 2L, by = 2L, length.out = length(nums)/2)] matrix(data = complex(real = reals, imaginary = imags), nrow = nr, ncol = nc, byrow = TRUE) } else { ## ndims <- as.integer(gsub("# ndims: ", "", line)) dims <- scan(con, nlines = 1L, quiet = TRUE) data <- readLines(con, n = prod(dims)) data <- gsub("\\(", "", data) data <- gsub("\\)", "", data) nums <- strsplit(data, ",") # note could replace with lengths if bumping R-version dependancy stopifnot(lengths(nums) == 2L) array(complex(real = as.numeric(vapply(nums, "[", "", 1L)), imaginary = as.numeric(vapply(nums, "[", "",2L))), dim = dims) } } read_octave_string_array <- function(con) { ## Helper function: read in a string array. elements <- as.numeric(gsub("# elements: ", "", readLines(con, 1L))) d <- readLines(con, n = 2L * elements) ## Remove the odd-numbered lines, they just store "length". d[seq.int(from = 2L, by = 2L, length.out = length(d)/2L)] } read_octave_scalar <- function(con) { ## Helper function: read in a scalar. as.numeric(scan(con, nlines = 1L, quiet = TRUE)) } read_octave_complex_scalar <- function(con) { ## Helper function: read in a complex scalar. d <- readLines(con, n = 1L) ## Remove parens then split. str <- gsub("\\(", "", d) str <- gsub("\\)", "", str) nums <- as.numeric(unlist(strsplit(str, ","))) stopifnot(length(nums) == 2L) complex(real = nums[1L], imaginary = nums[2L]) } read_octave_range <- function(con) { ## Helper function: read in a range. d <- readLines(con, n = 1L) # Skip over "# base, limit, increment". d <- as.numeric(scan(con, nlines = 1L, quiet = TRUE)) stopifnot(length(d) == 3L) seq.int(from = d[1L], to = d[2L], by = d[3L]) } read_octave_unknown <- function(con, type) { ## Skip over unknown Octave types. ## If we do not recognize the type of Octave variable, give a ## warning, and try reading until the next variable. ## This only works for unknown atomic types, so let us hope we ## have code for all recursive ones ... warning(gettextf("cannot handle unknown type %s", sQuote(type)), domain = NA) skip_lines_to_next_item(con) NULL } read_octave_list <- function(con) { ## Helper function: read in a list. ## Note that lists are deprecated now in favor of cells. n <- as.numeric(gsub("# length: ", "", readLines(con, 1L))) out <- vector("list", n) for(i in seq_len(n)) { ## Skip over "# name: _val" lines. readLines(con, 1L) out[[i]] <- read_item(con) } out } read_octave_cell <- function(con) { ## Helper function: read in a cell. nr <- as.numeric(gsub("# rows: ", "", readLines(con, 1L))) nc <- as.numeric(gsub("# columns: ", "", readLines(con, 1L))) out <- vector("list", nr * nc) dim(out) <- c(nr, nc) for(j in seq_len(nc)) { for(i in seq_len(nr)) { ## Skip over "# name: " lines. readLines(con, 1L) ## Get the next cell element. out[[i, j]] <- read_item(con) } ## Argh. There seem to be empty lines after each column of ## cell elements? Let us not rely on this, and instead read ## on to the next item. skip_lines_to_next_item(con) } out } read_octave_struct <- function(con) { ## Helper function: read in a struct. n <- as.numeric(gsub("# length: ", "", readLines(con, 1L))) out <- vector("list", n) for(i in seq_len(n)) { ## Skip over "# name: _val" lines. name <- gsub("# name: ", "", readLines(con, 1L)) out[[i]] <- read_item(con) names(out)[i] <- name } out } read_octave_bool <- function(con) { ## Helper function: read in a bool. as.logical(scan(con, nlines = 1L, quiet = TRUE)) } read_octave_bool_matrix <- function(con) { ## Helper function: read in a bool matrix. nr <- as.integer(gsub("# rows: ", "", readLines(con, 1L))) nc <- as.integer(gsub("# columns: ", "", readLines(con, 1L))) data <- scan(con, nlines = nr, quiet = TRUE) matrix(as.logical(data), nrow = nr, ncol = nc, byrow = TRUE) } read_item <- function(con) { ## Assume that the name has already been read. type <- gsub("# type: ", "", readLines(con, 1L)) switch(type, "matrix" = read_octave_matrix(con), "scalar" = read_octave_scalar(con), "string" = read_octave_string_array(con), "string array" = read_octave_string_array(con), "range" = read_octave_range(con), "complex matrix" = read_octave_complex_matrix(con), "complex scalar" = read_octave_complex_scalar(con), "list" = read_octave_list(con), "cell" = read_octave_cell(con), "struct" = read_octave_struct(con), "bool" = read_octave_bool(con), "bool matrix" = read_octave_bool_matrix(con), read_octave_unknown(con, type)) } zz <- file(file, "r") on.exit(close(zz)) readLines(zz, n = 1L) # Skip over the header line. ## Build up a return list of items -- separately store the return ## values and the names. items <- list() names <- character() reading <- TRUE while(reading) { line <- readLines(zz, 1L, ok = TRUE) if(length(line) == 0L) { reading <- FALSE } else { items <- c(items, list(read_item(zz))) names <- c(names, gsub("# name: ", "", line)) } } names(items) <- names items } foreign/R/zzz.R0000644000175100001440000000143013245463574013115 0ustar hornikusers### This file is part of the `foreign' package for R. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, a copy is available at ### http://www.r-project.org/Licenses/ .onLoad <- function(lib, pkg) .C(spss_init) .onUnload <- function(libpath) library.dynam.unload("foreign", libpath) .noGenerics <- TRUE foreign/R/Sread.R0000644000175100001440000001704013245463601013311 0ustar hornikusers### This file is part of the 'foreign' package for R. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ # SModeNames <- c("name", "string", "literal", "compiled", "(", ")", "[", "]", "{", "}", ",", "=", "!", ":", "addop", "*/", "", "^", "-", "$", "logop", "&|", "<-", "->", "sp.op", " ", "repeat", "if", "else", "break", ";", "next", "while", "for", "in", "recursive.return", "return", "argument", "system", "end.of.file", "expression", "system.function", "missing", "call", "function", "?", "unbalanced", "[[", "unknown", "]]", "quit", "continue", "comment.expression", "vector", "call(...)", "<<-", "graphics", "arg.lvalue", "internal", "S.call", "S.data", "comment", "comment(leftover)", "evaluation.frame", "destination") nam.or.i <- function(nam, i) if (nam != "") nam else i read.S <- function (file) { endian <- .Platform$endian s <- file(file, open = "rb") on.exit(close(s)) readheader <- function(s) { head <- readBin(s, "int", 8L, 1L) all(head == c(0L, 83L, 32L, 100L, 97L, 116L, 97L, 1L)) } ReadSObj <- function (code, len) { if (code == 1L) result <- as.logical(readBin(s, "int", len, endian = endian)) else if (code == 2L) result <- readBin(s, "int", len, endian = endian) else if (code == 3L) result <- readBin(s, "numeric", len, size=4L, endian = endian) else if (code == 4L) result <- readBin(s, "numeric", len, endian = endian) else if (code == 5L) { charsize <- readBin(s, "int", endian = endian) newpos <- charsize + seek(s, NA) result <- readBin(s, "character", len) seek(s, newpos) } else if (code == 6L) { result <- list() if (len) { names <- ReadSObj(5L, len) codes <- ReadSObj(2L, len) lens <- ReadSObj(2L, len) offsets <- ReadSObj(2, len) for (i in 1L:len) { seek(s, offsets[i]) temp <- if (codes[i] > 0L) ReadSObj(codes[i], lens[i]) else as.name(names[i]) result[[nam.or.i(names[i], i)]] <- temp } } } else if (code == 7L) result <- readBin(s, "complex", len, endian = endian) else if (code == 21L) { temp <- ReadSObj(6L, len) result <- temp[[".Data"]] attributes(result) <- temp[-match(c(".Data", ".Dim", ".Dimnames", ".Label"), names(temp), nomatch = 0L)] dim(result) <- temp[[".Dim"]] names(result) <- names(temp[[".Data"]]) if (!is.null(temp[[".Label"]])) levels(result) <- temp[[".Label"]] if (!is.null(temp[[".Dimnames"]])) dimnames(result) <- temp[[".Dimnames"]] } else if (code %in% 257L:321L) { code <- SModeNames[code - 256L] if (code %in% c("name", "missing")) result <- ReadSObj(5L, len) else result <- ReadSObj(6L, len) if (code == "function") try(result <- as.function(result, env=.GlobalEnv)) else if (code %in% c("break", "if", "for", "return", "S.call", "while", "<-", "<<-", "(", "{")) result <- as.call(c(as.name(code),result)) else if (code == "call(...)")# these aren't special in R result <- result[[1L]] else if (code == "comment") # ignore comments result <- NULL else if (code == "comment.expression")# just keep the expression, not the comment result <- result[unlist(lapply(result,function(y) !is.null(y)))][[1L]] else if (code == "internal") result <- as.call(list(as.name(".Internal"), result[[1L]])) else if (code == "missing") result <- call("stop", "Argument is missing") else try(mode(result) <- code) } else { return(paste("Unrecognized S mode", code, "not supported")) } result } if(readheader(s)) { code <- readBin(s, "int", endian = endian) if (code < 0L | code > 65535L) { endian <- switch(endian, big = "little", little = "big") seek(s, seek(s, NA) - 4) code <- readBin(s, "int", endian = endian) if (code < 0L | code > 65535L) stop("internal error - illegal S code value") } len <- readBin(s, "int", endian = endian) return(ReadSObj(code, len)) } else stop("not an S object") } data.restore <- function (file, print = FALSE, verbose = FALSE, env = .GlobalEnv) { dump <- file(file, open="rt") on.exit(close(dump)) ReadSdump <- function(top = FALSE, prefix) { name <- readLines(dump, 1L) if(length(name) == 0L) return(NULL) code <- readLines(dump, 1L) len <- as.integer(readLines(dump, 1L)) if (top && print) cat("\"", name, "\": ", code, "\n", sep="") if (verbose) cat(prefix, summary(dump)$position, name, code, len, "\n") ## first decide between atomic and "the rest" if (code %in% c("logical", "numeric","integer","single","double", "character", "name", "missing", "complex")) { value <- readLines(dump, len) value[value == "N"] <- as.character(NA) if (code != "character") value <- if (code == "logical")# "0", "1" and : as.logical(as.integer(value)) else if (code %in% c("integer", "double", "name", "complex")) methods::as(value, code) else if (code %in% c("numeric","single")) as.numeric(value) else if (code == "missing") ## Workaround: should be value <- as.name("") call("stop", paste("Argument ", sQuote(name), " is missing", sep="")) } else if (code %in% c("list", "structure", "NULL", SModeNames)) { value <- list() for (i in seq_len(len)) { temp <- ReadSdump(FALSE, c(prefix, " ")) value[[nam.or.i(temp$name,i)]] <- temp$value } if (code == "structure") { thelist <- value value <- thelist[[".Data"]] attributes(value) <- thelist[-match(c(".Data", ".Dim", ".Dimnames", ".Label"), names(thelist), nomatch = 0L)] dim(value) <- thelist[[".Dim"]] names(value) <- names(thelist[[".Data"]]) if (!is.null(thelist[[".Label"]])) levels(value) <- thelist[[".Label"]] if (!is.null(thelist[[".Dimnames"]])) try(dimnames(value) <- thelist[[".Dimnames"]]) if (!is.null(tsp <- thelist[[".Tsp"]]))# valid R ts() try(value <- stats::ts(c(value),tsp[1L],tsp[2L],tsp[3L])) } else if (code == "function") try(value <- as.function(value,env=env)) else if (code %in% c("break", "if", "for", "return", "S.call", "while", "<-", "<<-", "(", "{")) value <- as.call(c(as.name(code), value)) else if (code == "NULL") { value <- if (name != "") as.name(name) } else if (code == "call(...)")# these aren't special in R value <- value[[1L]] else if (code == "comment") # ignore comments value <- NULL else if (code == "comment.expression")# just keep the expression, not the comment value <- value[unlist(lapply(value,function(y) !is.null(y)))][[1L]] else if (code == "internal") value <- as.call(list(as.name(".Internal"), value[[1L]])) else try(mode(value) <- code) } else { stop(gettextf("S mode %s (near byte offset %s) not supported", sQuote(code), seek(dump)), domain = NA) } list(name = name, value = value) } repeat { temp <- ReadSdump(TRUE, " ") if(is.null(temp)) break assign(temp$name, temp$value, envir = env) } file } foreign/R/spss.R0000644000175100001440000002462213324716023013244 0ustar hornikusers### This file is part of the 'foreign' package for R. ### ### Read SPSS system data files ### ### Copyright 2000-2002 Saikat DebRoy ### Douglas M. Bates , ### Thomas Lumley ### Copyright 2007-2017 R Core Development Team ### Patched 2013-01-02 following PR#15073 by Peggy Overcashier ### This file is part of the `foreign' package for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, a copy is available at ### http://www.r-project.org/Licenses/ read.spss <- function(file, use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = Inf, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA, use.missings = to.data.frame, sub = ".", add.undeclared.levels = c("sort", "append", "no"), duplicated.value.labels = c("append", "condense"), duplicated.value.labels.infix = "_duplicated_", ...) { add.undeclared.levels <- match.arg(add.undeclared.levels) duplicated.value.labels <- match.arg(duplicated.value.labels) trim <- function(strings, trim=TRUE) if (trim && is.character(strings)) sub(" +$", "", strings) else strings ## mappings taken from win-iconv knownCP <- c("UCS-2LE" = 1200, "UCS-2BE" = 1201, "macroman" = 10000, " UCS-4LE" = 12000, "UCS-4BE" = 12001, "koi8-r" = 20866, "koi8-u" = 21866, "latin1" = 28591, "latin2" = 28592, "latin3" = 28593, ## latin-9 seems most portable, but only on Windows ## R >= 2.10.0. libiconv doesn't know latin9. "latin4" = 28594, "latin-9" = 28605, "ISO-2022-JP" = 50221, "euc-jp" = 51932, "UTF-8" = 65001, "ASCII" = 20127, ## pages known to glibc and libiconv "CP1250" = 1250, "CP1251" = 1251, "CP1252" = 1252, "CP1253" = 1253, "CP1254" = 1254, "CP1255" = 1255, "CP1256" = 1256, "CP1257" = 1257, "CP1258" = 1258, "CP874" = 874, "CP936" = 936) if(length(grep("^(http|ftp|https)://", file))) { tmp <- tempfile() download.file(file, tmp, quiet = TRUE, mode = "wb") file <- tmp on.exit(unlink(file)) } rval <- .Call(do_read_SPSS, file) codepage <- attr(rval, "codepage") if(is.null(codepage)) codepage <- 2 # .por files if(!capabilities("iconv")) reencode <- FALSE if(!identical(reencode, FALSE)) { cp <- "unknown" if(is.character(reencode)) { cp <- reencode reencode <- TRUE } else if(codepage == 20127) { reencode <- FALSE # ASCII } else if(m <- match(codepage, knownCP, 0L)) { cp <- names(knownCP)[m] } else if (codepage < 200) { ## small numbers are not codepages, and real codepages are large attr(rval, "codepage") <- NULL reencode <- FALSE } else cp <- paste("CP", codepage, sep="") if(is.na(reencode)){ l10ni <- l10n_info() ## Do not reencode from UTF-8 in a UTF-8 locale and ## not from latin1 in a latin1 locale reencode <- (l10ni[["UTF-8"]] && (codepage != 65001)) || (l10ni[["Latin-1"]] && (codepage != 28591)) } if(reencode) { message(gettextf("re-encoding from %s", cp), domain = NA) names(rval) <- iconv(names(rval), cp, "", sub=sub) vl <- attr(rval, "variable.labels") nm <- names(vl) vl <- iconv(vl, cp, "", sub=sub) names(vl) <- iconv(nm, cp, "", sub=sub) attr(rval, "variable.labels") <- vl for(i in seq_along(rval)) { xi <- rval[[i]] if(is.character(xi)) rval[[i]] <- iconv(xi, cp, "", sub=sub) } } } miss <- attr(rval, "missings") vl <- attr(rval,"label.table") if(!is.null(miss)) { if(reencode) { nm <- names(miss) names(miss) <- iconv(nm, cp, "", sub=sub) for(i in seq_along(miss)) if(is.character(miss[[i]]$value)) miss[[i]]$value <- iconv(miss[[i]]$value, cp, "", sub=sub) attr(rval, "missings") <- miss } if(use.missings) for(v in names(rval)) { tp <- miss[[v]]$type xi <- rval[[v]] z <- miss[[v]]$value ## Convert data (xi) to NA for values that either match a ## specified discrete missing value code or fall within ## the specified missing value range, if applicable. ## ## Added Oct. 2012: Retain value labels (vl[[v]]) only for ## codes that haven't been converted to NA in the data. if(tp %in% "none") next if(tp %in% c("one", "two", "three")) { other <- miss[[v]]$value ## FIXME: do we need to worry about padding for string vals? xi[ xi %in% other ] <- NA vl[[v]] <- vl[[v]][ !(vl[[v]] %in% other) ] } else if(tp == "low" || tp == "low+1") { xi[ xi <= z[1L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) > z[1L] ] if(tp == "low+1"){ xi[ xi == z[2L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) != z[2L] ] } } else if(tp == "high" || tp == "high+1") { xi[ xi >= z[1L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) < z[1L] ] if(tp == "high+1"){ xi[ xi == z[2L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) != z[2L] ] } } else if(tp == "range" || tp == "range+1") { xi[ xi >= z[1L] & xi <= z[2L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) < z[1L] | as.numeric(vl[[v]]) > z[2L] ] if(tp == "range+1"){ xi[ xi == z[3L] ] <- NA vl[[v]] <- vl[[v]][ as.numeric(vl[[v]]) != z[3L] ] } } else warning(gettextf("missingness type %s is not handled", tp), domain = NA) rval[[v]] <- xi } } else use.missings <- FALSE if(reencode) names(vl) <- iconv(names(vl), cp, "", sub=sub) has.vl <- which(!vapply(vl, is.null, NA)) for(v in has.vl) { nm <- names(vl)[[v]] vlv <- vl[[v]] nlabels <- length(vlv) if(reencode && nlabels) { nm2 <- names(vlv) vl[[v]] <- vlv <- iconv(vlv, cp, "", sub=sub) names(vl[[v]]) <- names(vlv) <- iconv(nm2, cp, "", sub=sub) } newlevels <- rev(trim(vlv, trim_values)) newrval <- trim(rval[[nm]], trim_values) uniquevalues <- na.omit(unique(newrval)) nvalues <- length(uniquevalues) ## We may have nlabels == nvalues but they do not always match, ## e.g. in case 2 labels are duplicated, hence be careful: if (use.value.labels && (add.undeclared.levels != "no" || all(uniquevalues %in% c(newlevels, ""))) && (!is.finite(max.value.labels) || nvalues <= max.value.labels)) { newlabels <- rev(trim(names(vlv), trim.factor.names)) if(add.undeclared.levels != "no" && !all(uniquevalues %in% c(newlevels, ""))){ addlabels <- addlevels <- sort(uniquevalues[!(uniquevalues %in% c(newlevels, ""))]) newlevels <- c(newlevels, addlevels) newlabels <- c(newlabels, addlabels) if(add.undeclared.levels == "sort"){ o <- order(newlevels) newlevels <- newlevels[o] newlabels <- newlabels[o] } warning("Undeclared level(s) ", paste(addlevels, collapse = ", "), " added in variable: ", nm) } dupnewlabels <- duplicated(newlabels) ## duplicated factor labels are no longer possible for R >= 3.4.0, ## hence adding two ways around ## - append: appends infix plus original level (that is unique) ## - condense: removes additional levels with identical labels and ## condenses to the first of all duplicated levels if(any(dupnewlabels)) { warning("Duplicated levels in factor ", nm, ": ", paste(newlabels[dupnewlabels], collapse=", ")) if(duplicated.value.labels == "append"){ newlabels[dupnewlabels] <- paste(newlabels[dupnewlabels], newlevels[dupnewlabels], sep = duplicated.value.labels.infix) } if(duplicated.value.labels == "condense"){ for(d in unique(newlabels[dupnewlabels])){ dups <- newlabels %in% d newrval[newrval %in% newlevels[dups]] <- newlevels[dups][1] } newlabels <- newlabels[!dupnewlabels] newlevels <- newlevels[!dupnewlabels] } } rval[[nm]] <- factor(newrval, levels = newlevels, labels = newlabels) } else attr(rval[[nm]], "value.labels") <- vl[[v]] } if(reencode) attr(rval, "label.table") <- vl if (to.data.frame) { varlab <- attr(rval, "variable.labels") rval <- as.data.frame(rval, ...) attr(rval, "variable.labels") <- varlab if(codepage > 500) attr(rval, "codepage") <- codepage } rval } foreign/R/read.epiinfo.R0000644000175100001440000001345513324716023014621 0ustar hornikusers### This file is part of the 'foreign' package for R. ### R/read.epiinfo.R ### (c) 2002-4 Thomas Lumley ### Patches (c) 2002 Mark Myatt # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ read.epiinfo <- function (file, read.deleted = FALSE, guess.broken.dates = FALSE, thisyear = NULL, lower.case.names = FALSE) { if (is.character(file)) { file <- file(file, "rt") on.exit(close(file)) } if (!inherits(file, "connection")) stop("argument 'file' must be a character string or connection") if (!isOpen(file)) { open(file, "rt") on.exit(close(file)) } line <- readLines(file, 1L, ok = TRUE) headerlength <- na.omit(sapply(strsplit(line, " ")[[1L]], as.numeric))[1L] if (headerlength <= 0L) stop("file has zero or fewer variables: probably not an EpiInfo file") headerlines <- readLines(file, n = headerlength) pushBack(headerlines, file) comments <- vapply(headerlines, function(s) substring(s, 46L, 46L + 80L), "") # # Added comment = "" to fix '#' as entrychar being read as a comment # header <- scan(file, nlines = headerlength, what = list(name = "", x = 0, y = 0, color = 0, x1 = 0, y1 = 0, type = 0, len = 0, color = 0), flush = TRUE, quiet = TRUE, comment.char = "") header <- as.data.frame(lapply(header, I)) header$start <- cumsum(c(1L, header$len))[1L:headerlength] header$stop <- cumsum(header$len) multiline <- ceiling(max(header$stop) / 78L) really.variables <- header$len != 0 header <- header[really.variables, ] entrychar <- substr(header$name, 1L, 1L) if (all(entrychar %in% c("#", "_"))) header$name <- substr(header$name, 2L, 12L) comments <- comments[really.variables] # # Added support for EpiData introduced field types: # # 12 Automatic ID number fields (treated as numeric) # 16 European (i.e. dd/mm/yyyy) format automatic date # 17 SOUNDEX field # numbers <- (header$len > 0L) & ((header$type %in% c(0L, 6L, 12L)) | (header$type > 12L)) & !(header$type %in% c(16L, 17L)) datalines <- scan(file, what = "", sep = "\n", quote = "", quiet = TRUE, blank.lines.skip = TRUE, comment.char = "") # # Added check for empty file # if (length(datalines) == 0L) stop("no records in file") if (length(datalines)%%multiline) warning("wrong number of records") datalines <- matrix(datalines, nrow = multiline) if (multiline > 1L) datalines[-multiline, ] <- substr(datalines[-multiline, ], 1L, 78L) datalines <- apply(datalines, 2L, paste, collapse = "") deleted <- substr(datalines, nchar(datalines), nchar(datalines)) == "?" nvars <- NROW(header) data <- as.data.frame(lapply(1L:nvars, function(i) I(substring(datalines, header$start[i], header$stop[i])))) names(data) <- header$name names(comments) <- header$name if (is.na(read.deleted)) data[deleted, ] <- NA else if (!read.deleted) data <- data[!deleted, ] if (guess.broken.dates && is.null(thisyear)) thisyear <- format(Sys.time(), format = "%Y") # # Added support for field types: # # 10 US (i.e. mm/dd/yyyy) format field (EpiInfo) # 12 Automatic ID number (treated as numeric) # 16 European (i.e. dd/mm/yyyy) format automatic date (EpiData) # 17 SOUNDEX field (EpiData) # for (i in 1L:nvars) { if (numbers[i]) data[[i]] <- as.numeric(data[[i]]) else if (header$type[i] == 5L) data[[i]] <- ifelse(data[[i]] %in% c("Y", "N"), data[[i]] == "Y", NA) else if (header$type[i] %in% c(11L, 16L) && header$len[i] == 5L && guess.broken.dates) data[[i]] <- as.Date(strptime(paste(data[[i]], thisyear, sep = "/"), format = "%d/%m/%Y")) else if (header$type[i] %in% c(11L, 16L) && header$len[i] == 8L && guess.broken.dates) data[[i]] <- as.Date(strptime(data[[i]], format = "%d/%m/%y")) else if (header$type[i] %in% c(11L, 16L) && header$len[i] == 10L) data[[i]] <- as.Date(strptime(data[[i]], format = "%d/%m/%Y")) else if (header$type[i] %in% c(2L, 10L) && header$len[i] == 5L && guess.broken.dates) data[[i]] <- as.Date(strptime(paste(data[[i]], thisyear, sep = "/"), format = "%m/%d/%Y")) else if (header$type[i] %in% c(2L, 10L) && header$len[i] == 8L && guess.broken.dates) data[[i]] <- as.Date(strptime(data[[i]], format = "%m/%d/%y")) else if (header$type[i] %in% c(2L, 10L) && header$len[i] == 10L) data[[i]] <- as.Date(strptime(data[[i]], format = "%m/%d/%Y")) # # SOUNDEX (type 17) fields # else if (header$type[i] == 17L) { data[[i]][substr(data[[i]], 1L, 1L) == " "] <- NA data[[i]] <- substr(data[[i]], 1L, 5L) } else { blanks <- grep("^[[:blank:]]*$", data[[i]]) data[[i]][blanks] <- NA } } if (!is.na(read.deleted) && read.deleted) attr(data, "deleted") <- deleted attr(data, "prompts") <- comments # # Added parameter and code to specify lower case variable names # if (lower.case.names) names(data) <- tolower(names(data)) data } foreign/R/R_systat.R0000644000175100001440000000225013245463574014071 0ustar hornikusers### This file is part of the 'foreign' package for R. # Copyright 2004 by Roger Bivand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ # read.systat <- function(file, to.data.frame=TRUE) { if (length(file) != 1L) stop("only one file") if (!is.character(file)) stop("'file' must be character") res <- .Call(readSystat, as.character(file)) if (to.data.frame) { comment <- NULL if (!is.null(attr(res, "comment")) && nzchar(attr(res, "comment"))) comment <- attr(res, "comment") res <- as.data.frame(res) if (!is.null(comment)) comment(res) <- comment } res } foreign/R/writeForeignCode.R0000644000175100001440000001134213324716023015506 0ustar hornikusers### This file is part of the 'foreign' package for R. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ write.foreign <- function(df, datafile, codefile, package = c("SPSS","Stata","SAS"), ...) { do.call(paste("writeForeign", package, sep = ""), c(list(df = df, datafile = datafile, codefile = codefile), ...)) invisible(NULL) } ## we want ASCII quotes, not UTF-8 quotes here adQuote <- function(x) paste("\"", x, "\"", sep = "") ## FIXME: # - Missing values # - Date/Time # - character variables > 255 chars # - wrapper to write .sav directly writeForeignSPSS <- function(df, datafile, codefile, varnames = NULL, maxchars = 32L) { ## FIXME: re-write this to hold a connection open dfn <- lapply(df, function(x) if (is.factor(x)) as.numeric(x) else x) write.table(dfn, file = datafile, row.names = FALSE, col.names = FALSE, sep = ",", quote = FALSE, na = "", eol = ",\n") varlabels <- names(df) if (is.null(varnames)) { varnames <- abbreviate(names(df), maxchars) if (any(vapply(varnames, nchar, 0L) > maxchars)) stop("I cannot abbreviate the variable names to 'maxchars' or fewer chars") if (any(varnames != varlabels)) warning("some variable names were abbreviated") } varnames <- gsub("[^[:alnum:]_\\$@#]", "\\.", varnames) dl.varnames <- varnames chv <- vapply(df, is.character, NA) fav <- vapply(df, is.factor, NA) if (any(chv)) { lengths <- vapply(df[chv],function(v) max(c(nchar(v), 8L), na.rm=TRUE), 0L) lengths <- paste0("(A", lengths, ")") dl.varnames[chv] <- paste(dl.varnames[chv], lengths) } if (any(fav)) { dl.varnames[fav] <- paste(dl.varnames[fav], "(F8.0)") # Factor-Format } if (any(chv) || any(fav)) { ## actually the rule is: prepend a star if a variable with type/size declaration ## follows on a variable without declaration; no star for first variable or variables ## following other variables with declarations star <- ifelse(c(FALSE, diff(chv | fav) == 1)[chv | fav], " *", " ") dl.varnames[chv | fav] <- paste(star, dl.varnames[chv | fav]) } cat("SET DECIMAL=DOT.\n\n", file = codefile) # required if SPSS runs in a locale with DECIMAL=comma cat("DATA LIST FILE=", adQuote(datafile), " free (\",\")\n", file = codefile, append = TRUE) cat('ENCODING="Locale"\n', file = codefile, append = TRUE) ## No line longer than 251 chars: cat("/", paste(strwrap(paste(dl.varnames, collapse=" "), width=70), "\n"), " .\n\n", file = codefile, append = TRUE) cat("VARIABLE LABELS\n", file = codefile, append = TRUE) cat(paste(varnames, adQuote(varlabels),"\n"), ".\n", file = codefile, append = TRUE) if (any(fav)) { cat("\nVALUE LABELS\n", file = codefile, append = TRUE) for(v in which(fav)){ cat("/\n", file = codefile, append = TRUE) cat(varnames[v]," \n", file = codefile, append = TRUE, sep = "") levs <- levels(df[[v]]) cat(paste(seq_along(levs), adQuote(levs), "\n", sep = " "), file = codefile, append = TRUE) } cat(".\n", file = codefile, append = TRUE) } ord <- vapply(df, is.ordered, NA) if(any(ord)) cat("VARIABLE LEVEL", paste(strwrap(paste(varnames[ord], collapse = ", "), width=70), "\n"), "(ordinal).\n", file = codefile, append = TRUE) num <- vapply(df, is.numeric, NA) if(any(num)) cat("VARIABLE LEVEL", paste(strwrap(paste(varnames[num], collapse = ", "), width=70), "\n"), "(scale).\n", file = codefile, append = TRUE) cat("\nEXECUTE.\n", file = codefile, append = TRUE) } writeForeignStata <- function(df, datafile, codefile) { write.table(df, file = datafile, row.names = FALSE, col.names = FALSE, sep = ",", quote = FALSE, na = ".") nms <- names(df) factors <- vapply(df, is.factor, NA) | vapply(df, is.character, NA) formats <- paste(nms, "fmt", sep = "_") nms <- ifelse(factors, paste(nms,formats, sep = ":"), nms) cat("infile", nms, " using ", datafile,", automatic\n", file = codefile) } foreign/R/read.ssd.R0000644000175100001440000001063413245463574013771 0ustar hornikusers### This file is part of the 'foreign' package for R. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ read.ssd <- function(libname, sectionnames, tmpXport=tempfile(), tmpProgLoc=tempfile(), sascmd="sas") { ## ## copyright 2002 VJ Carey ## 2004 R Development Core Team ## ## read.ssd -- 'read' a SAS v6 ssd format file by converting ## the data to sas xport format and then using R foreign:read.xport ## march 22 2002 -- works fine if the desired sas lib/section exist ## but cannot detect when sas 'fails' owing to nonexistence ## ## tries to clean up interim results ## ## works for sas v8 tmpFiles <- tmpXport on.exit(unlink(tmpFiles)) logGuess <- function (x) { ## guess the name of the log file by stripping all ## path to the sas program (log will lie in executing dir) expl <- strsplit(x, "")[[1L]] rex <- rev(expl) br <- match("/", rex)[1L] if (is.na(br)) return(x) return(paste(rev(rex[1L:(br - 1L)]), sep = "", collapse = "")) } fileExtension <- function(string) { n <- nchar(string) chars <- substring(string, 1L:n, 1L:n) lastDot <- n + 1L - match(".", rev(chars), nomatch = n + 1L) substring(string, lastDot + 1L, n) } sn <- sectionnames if(any(nchar(sn) > 8L)) { oldDir <- libname libname <- tempdir() allFiles <- list.files(oldDir) oldNames <- character(0L) for(i in 1L:length(sn)){ fName <- grep(sn[i], allFiles, value = TRUE) if(length(fName) == 0L) stop(gettextf("sectionname %s not found", sn[i]), domain = NA) oldNames <- c(oldNames, fName) } sectionnames <- linkNames <- character(length(oldNames)) for(i in 1L:length(oldNames)) { sectionnames[i] <- paste("sn", i, sep = "") linkNames[i] <- paste(sectionnames[i], fileExtension(oldNames[i]), sep = ".") oldPath <- file.path(oldDir, oldNames[i]) linkPath <- file.path(libname, linkNames[i]) file.symlink(oldPath, linkPath) tmpFiles <- c(tmpFiles, linkPath) } } st0 <- "option validvarname = v6;" st1 <- paste("libname src2rd '",libname,"';\n",sep="") st2 <- paste("libname rd xport '", tmpXport, "';\n", sep="") st3 <- paste("proc copy in=src2rd out=rd;\n") st4 <- paste("select", sectionnames, ";\n", sep=" ") tmpProg <- paste(tmpProgLoc, ".sas", sep="") tmpProgLogBase <- logGuess(tmpProgLoc) tmpProgLog <- paste(tmpProgLogBase, ".log", sep="") cat(st0, file=tmpProg) cat(st1, file = tmpProg, append = TRUE) cat(st2, file = tmpProg, append = TRUE) cat(st3, file = tmpProg, append = TRUE) cat(st4, file = tmpProg, append = TRUE) if(.Platform$OS.type == "windows") sascmd <- paste(shQuote(sascmd), "-sysin") sasrun <- try(sysret <- system( paste( sascmd, tmpProg ) )) if (!inherits(sasrun, "try-error") & sysret == 0L) { unlink( tmpProg ) unlink( tmpProgLog ) if(length(sectionnames) == 1L) return( read.xport( tmpXport ) ) else { zz <- read.xport(tmpXport) names(zz) <- sn return(zz) } } else { cat("SAS failed. SAS program at", tmpProg,"\n") if(.Platform$OS.type == "unix") { cat("a log and other error products should be in the vicinity\n") system(paste("ls -l ", tmpProgLog)) } else { cat("The log file will be ", paste(basename(tmpProgLoc), ".log", sep=""), " in the current directory\n", sep="") } warning(gettextf("SAS return code was %d", sysret), domain = NA) return(NULL) } } foreign/R/minitab.R0000644000175100001440000000252413245463574013710 0ustar hornikusers### This file is part of the `foreign' package for R. ### ### Read stored Minitab worksheets ### ### Copyright 1999-2000 Douglas M. Bates , ### Saikat DebRoy ### ### This file is part of the `foreign' library for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, a copy is available at ### http://www.r-project.org/Licenses/ ## Files in the Minitab portable worksheet format represent numbers in a ## fixed format (written in Fortran as 5e15.9 or something like that) but ## the data values are only stored in Minitab in single precision. We use ## signif to remove the inaccuracies in the representation in the files. "read.mtp" <- function (file) { clean <- function(x) if(is.numeric(x)) signif(x, 6L) else x val <- .Call(read_mtp, file) lapply(val, clean) } foreign/R/arff.R0000644000175100001440000001465713245463601013204 0ustar hornikusers### This file is part of the 'foreign' package for R. ### Functions for reading and writing files in Weka ARFF format. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ ### ### String and evaluation types are enclosed by single quotes upon ### writing and enclosing single quotes are removed upon reading. ### Escaped single quotes inside single quotes may also occur. ### read.arff <- function(file) { ## See read.table(). if(is.character(file)) { file <- file(file, "r") on.exit(close(file)) } if(!inherits(file, "connection")) stop("Argument 'file' must be a character string or connection.") if(!isOpen(file)) { open(file, "r") on.exit(close(file)) } ## Get header. col_names <- NULL col_types <- NULL col_dfmts <- character() line <- readLines(file, n = 1L) while(length(line) && regexpr('^[[:space:]]*@(?i)data', line, perl = TRUE) == -1L) { if(regexpr('^[[:space:]]*@(?i)attribute', line, perl = TRUE) > 0L) { con <- textConnection(line) line <- scan(con, character(), quiet = TRUE) close(con) if(length(line) < 3L) stop("Invalid attribute specification.") col_names <- c(col_names, line[2L]) if((type <- tolower(line[3L])) == "date") { col_types <- c(col_types, "character") col_dfmts <- c(col_dfmts, if(length(line) > 3L) ISO_8601_to_POSIX_datetime_format(line[4L]) else "%Y-%m-%d %H:%M:%S") } else if(type == "relational") stop("Type 'relational' currently not implemented.") else { type <- sub("\\{.*", "factor", type) ## (Could try to preserve factor levels ...) type <- sub("string", "character", type) type <- sub("real", "numeric", type) col_types <- c(col_types, type) col_dfmts <- c(col_dfmts, NA) } } line <- readLines(file, n = 1L) } ## Test header. if(length(line) == 0L) stop("Missing data section.") if(is.null(col_names)) stop("Missing attribute section.") if(length(col_names) != length(grep('factor|numeric|character', col_types))) stop("Invalid type specification.") ## Get data. data <- read.table(file, sep = ",", na.strings = "?", colClasses = col_types, comment.char = '%') if(any(ind <- which(!is.na(col_dfmts)))) for(i in ind) data[i] <- as.data.frame(strptime(data[[i]], col_dfmts[i])) ## Remove left over escapes. for (i in seq_len(length(data))) if (is.factor(data[[i]])) levels(data[[i]]) <- gsub("\\\\", "", levels(data[[i]])) names(data) <- col_names data } write.arff <- function(x, file, eol = "\n", relation = deparse(substitute(x))) { ## See write.table(). if(file == "") file <- stdout() else if(is.character(file)) { file <- file(file, "wb") on.exit(close(file)) } if(!inherits(file, "connection")) stop("Argument 'file' must be a character string or connection.") if (!is.data.frame(x) && !is.matrix(x)) x <- data.frame(x) ## We need to quote for ourselves, as write.table() escapes the quote ## char but not the backslash. Weka seems to prefer backslash ## escapes inside single quotes, so we provide that ... squote <- function(s) { ## Don't quote NAs. ifelse(is.na(s), s, sprintf("'%s'", gsub("(['\\])", "\\\\\\1", s))) } spquote <- function(s) { if (length(grep("^[[:alpha:]]", s)) == 0L) s <- paste("X", s, sep="") if (length(grep(" ", s))) s <- paste('"', s, '"', sep="") s } ## Write header. Quote, mangle if necessary. text <- paste('@relation', spquote(make.names(relation))) writeLines(text, file, sep = eol) for (name in colnames(x)) { ## Attribute names need to start with a letter, quoted if contain spaces. text <- paste('@attribute', spquote(name)) if (is.data.frame(x) && is.factor(x[[name]])) { lev <- squote(levels(x[[name]])) levels(x[[name]]) <- lev text <- paste(text, " {", paste(lev, collapse = ","), "}", sep = "") } else if (is.character(x[,name])) { text <- paste(text, "string") x[,name] <- squote((x[,name])) } else if (inherits(x[,name], "Date")) { text <- paste(text, "date \"yyyy-MM-dd\"") x[,name] <- squote(format(x[,name])) } else if (inherits(x[,name], "POSIXt")) { text <- paste(text, "date \"yyyy-MM-dd HH:mm:ss\"") x[,name] <- squote(format(x[,name])) } else text <- paste(text, "numeric") writeLines(text, file, sep = eol) } ## Write data. writeLines("@data", file) write.table(x, file = file, na = "?", sep = ",", eol = eol, quote = FALSE, row.names = FALSE, col.names = FALSE) } ISO_8601_to_POSIX_datetime_format <- function(x) { ## First, Weka thinks that 'yyyy' is ISO 8601 ... x <- sub("yyyy", "%Y", x, ignore.case = TRUE) ## And it's 'DD' and not 'dd' ... x <- sub("dd", "%d", x) ## And it's 'hh' and not 'HH' ... x <- sub("HH", "%H", x) ## Now the real stuff. ## Is there a POSIX format string for the century component of year? x <- sub("CCYY", "%Y", x) x <- sub("YY", "%y", x) x <- sub("MM", "%m", x) x <- sub("DD", "%d", x) x <- sub("DDD", "%j", x) x <- sub("ww", "%U", x) x <- sub("D", "%w", x) x <- sub("hh", "%H", x) x <- sub("mm", "%M", x) x <- sub("ss", "%S", x) ## Is there a POSIX format string for fractions of seconds? [No] x } foreign/R/xport.R0000644000175100001440000000224613521004716013424 0ustar hornikusers### This file is part of the 'foreign' package for R. ### ### Read SAS xport format libraries ### ### Copyright 1999-1999 Douglas M. Bates , ### Saikat DebRoy ### ### This file is part of the `foreign' library for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, a copy is available at ### http://www.r-project.org/Licenses/ lookup.xport <- function(file) .Call(xport_info, file) read.xport <- function(file, ...) { data.info <- lookup.xport(file) ans <- .Call(xport_read, file, data.info) if (length(ans) == 1L) as.data.frame(ans[[1L]], ...) else lapply(ans, as.data.frame, ...) } foreign/R/dbf.R0000644000175100001440000001105613324716023013004 0ustar hornikusers### This file is part of the 'foreign' package for R. ### Copyright 2000-2001 (c) Nicholas Lewin-Koh ### Changes for foreign package (C) 2004 R Development Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ read.dbf <- function(file, as.is = FALSE) { df <- .Call(Rdbfread, as.character(path.expand(file))) onames <- names(df) inames <- make.names(onames, unique = TRUE) names(df) <- inames if (!(identical(onames, inames))) { for (i in seq_along(onames)) if (!(identical(onames[i], inames[i]))) message(gettextf("Field name: %s changed to: %s", sQuote(onames[i]), sQuote(inames[i])), domain = NA) } data_types <- attr(df, "data_types") for(i in seq_along(onames)) if(data_types[i] == "D") df[[i]] <- as.Date(df[[i]], format="%Y%m%d") if(!as.is) { df <- data.frame(lapply(df, function(x) if(is.character(x)) factor(x) else x)) attr(df, "data_types") <- data_types } df } ### assumes that all chars are single-byte write.dbf <- function(dataframe, file, factor2char = TRUE, max_nchar = 254) { ### need to check precision allowed_classes <- c("logical", "integer", "numeric", "character", "factor", "Date") if (!is.data.frame(dataframe)) dataframe <- as.data.frame(dataframe) if (any(vapply(dataframe, function(x) !is.null(dim(x)), NA))) stop("cannot handle matrix/array columns") cl <- vapply(dataframe, function(x) class(x[1L]), "") asis <- cl == "AsIs" cl[asis & vapply(dataframe, mode, '') == "character"] <- "character" if(length(cl0 <- setdiff(cl, allowed_classes))) stop(sprintf(ngettext(length(cl0), "data frame contains columns of unsupported class %s", "data frame contains columns of unsupported classes %s"), paste(dQuote(cl0), collapse = ",")), domain = NA) m <- ncol(dataframe) DataTypes <- c(logical="L", integer="N", numeric="F", character="C", factor=if(factor2char) "C" else "N", Date="D")[cl] for(i in seq_len(m)) { x <- dataframe[[i]] if(is.factor(x)) dataframe[[i]] <- if(factor2char) as.character(x) else as.integer(x) else if (inherits(x, "Date")) dataframe[[i]] <- format(x, "%Y%m%d") } precision <- integer(m) scale <- integer(m) dfnames <- names(dataframe) for (i in seq_len(m)) { nlen <- nchar(dfnames[i], "b") x <- dataframe[, i] if (is.logical(x)) { precision[i] <- 1L scale[i] <- 0L } else if (is.integer(x)) { rx <- range(x, na.rm = TRUE) rx[!is.finite(rx)] <- 0 # added RSB 2005-04-17 if (any(rx == 0)) rx <- rx + 1 # added RSB 2005-03-10 mrx <- as.integer(max(ceiling(log10(abs(rx))))+3L) precision[i] <- min(max(nlen, mrx), 19L) scale[i] <- 0L } else if (is.double(x)) { precision[i] <- 19L rx <- range(x, na.rm = TRUE) rx[!is.finite(rx)] <- 0 # added RSB 2005-04-17 mrx <- max(ceiling(log10(abs(rx)))) scale[i] <- min(precision[i] - ifelse(mrx > 0L, mrx+3L, 3L), 15L) # modified RSB 2005-03-10 and 2005-04-17 } else if (is.character(x)) { mf <- max(nchar(x[!is.na(x)], "b")) p <- max(nlen, mf) if(p > max_nchar) warning(gettextf("character column %d will be truncated to %d bytes", i, max_nchar), domain = NA) precision[i] <- min(p, max_nchar) scale[i] <- 0L } else stop("unknown column type in data frame") } if (anyNA(precision)) stop("NA in precision") # added RSB 2005-04-17 if (anyNA(scale)) stop("NA in scale") # added RSB 2005-04-17 invisible( .Call(DoWritedbf, as.character(file), dataframe, as.integer(precision), as.integer(scale), as.character(DataTypes))) } foreign/R/read.dta.R0000644000175100001440000001743013324716023013735 0ustar hornikusers### This file is part of the 'foreign' package for R. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ read.dta <- function(file, convert.dates = TRUE, convert.factors = TRUE, missing.type = FALSE, convert.underscore = FALSE, warn.missing.labels = TRUE) { if(length(grep("^(http|ftp|https)://", file))) { tmp <- tempfile() download.file(file, tmp, quiet = TRUE, mode = "wb") file <- tmp on.exit(unlink(file)) } rval <- .External(do_readStata, file) if(convert.underscore) names(rval) <- gsub("_", ".", names(rval)) types <- attr(rval, "types") stata.na <- data.frame(type = 251L:255L, min = c(101, 32741, 2147483621, 2^127, 2^1023), inc = c(1,1,1,2^115,2^1011) ) if(!missing.type) { if (abs(attr(rval, "version")) >= 8L) { for(v in which(types > 250L)) { this.type <- types[v] - 250L rval[[v]][rval[[v]] >= stata.na$min[this.type]] <- NA } } } else { if (abs(attr(rval, "version")) >= 8L) { missings <- vector("list", length(rval)) names(missings) <- names(rval) for(v in which(types > 250L)) { this.type <- types[v] - 250L nas <- is.na(rval[[v]]) | rval[[v]] >= stata.na$min[this.type] natype <- (rval[[v]][nas] - stata.na$min[this.type])/stata.na$inc[this.type] natype[is.na(natype)] <- 0L missings[[v]] <- rep(NA, NROW(rval)) missings[[v]][nas] <- natype rval[[v]][nas] <- NA } attr(rval,"missing") <- missings } else warning("'missing.type' only applicable to version >= 8 files") } convert_dt_c <- function(x) as.POSIXct((x+0.1)/1000, origin = "1960-01-01") # avoid rounding down convert_dt_C <- function(x) { ls <- .leap.seconds + seq_along(.leap.seconds) + 315619200 z <- (x+0.1)/1000 # avoid rounding down z <- z - rowSums(outer(z, ls, ">=")) as.POSIXct(z, origin = "1960-01-01") } if (convert.dates) { ff <- attr(rval, "formats") ## dates <- grep("%-*d", ff) ## Stata 12 introduced 'business dates' ## 'Formats beginning with %t or %-t are Stata's date and time formats.' ## but it seems some are earlier. ## The dta_115 description suggests this is too inclusive: ## 'Stata has an old *%d* format notation and some datasets ## still have them. Format *%d*... is equivalent to modern ## format *%td*... and *%-d*... is equivalent to *%-td*...' dates <- if (attr(rval, "version") >= 8L) grep('^%(-|)(d|td)', ff) else grep("%-*d", ff) ## avoid as.Date in case strptime is messed up base <- structure(-3653L, class = "Date") # Stata dates are integer vars for(v in dates) rval[[v]] <- structure(base + rval[[v]], class = "Date") for(v in grep("%tc", ff)) rval[[v]] <- convert_dt_c(rval[[v]]) for(v in grep("%tC", ff)) rval[[v]] <- convert_dt_C(rval[[v]]) } if (convert.factors %in% c(TRUE, NA)) { if (attr(rval, "version") == 5L) warning("cannot read factor labels from Stata 5 files") else { ll <- attr(rval, "val.labels") tt <- attr(rval, "label.table") factors <- which(ll != "") for(v in factors) { labels <- tt[[ll[v]]] if (warn.missing.labels && is.null(labels)) { warning(gettextf("value labels (%s) for %s are missing", sQuote(ll[v]), sQuote(names(rval)[v])), domain = NA) next } if(!is.na(convert.factors)) { ## some levels don't have labels, so skip if (!all(rval[[v]] %in% c(NA, NaN, tt[[ll[v]]]))) next } rval[[v]] <- factor(rval[[v]], levels=tt[[ll[v]]], labels=names(tt[[ll[v]]])) } } } att <- attributes(rval) ##rval <- as.data.frame(rval, stringsAsFactors=FALSE) class(rval) <- "data.frame" newatt <- attributes(rval) newatt <- c(newatt, att[!(names(att) %in% names(newatt))]) attributes(rval) <- newatt rval } write.dta <- function(dataframe, file, version = 7L, convert.dates = TRUE, tz = "GMT", convert.factors = c("labels","string","numeric","codes")) { if(!is.data.frame(dataframe)) stop("The object \"dataframe\" must have class data.frame") if (version < 6L) stop("Version must be 6-12") if (version == 9L) version <- 8L if (version == 11L) version <- 10L if (version == 12L) version <- 10L if (version > 12L) { warning("Version must be 6-12: using 7") version <- 7L } ## assume this is in chars: probably only works for ASCII ## But Stata formats are ASCII only namelength <- if (version == 6L) 8L else 31L oldn <- names(dataframe) nn <- abbreviate(oldn, namelength) if (any(nchar(nn) > namelength)) stop("cannot uniquely abbreviate variable names") if (any(nchar(oldn) > namelength)) warning("abbreviating variable names") names(dataframe) <- nn attr(dataframe,"orig.names") <- oldn if (convert.dates) { dates <- which(vapply(dataframe, function(x) inherits(x, "Date"), NA)) for(v in dates) dataframe[[v]] <- as.vector(julian(dataframe[[v]], as.Date("1960-1-1", tz="GMT"))) dates <- which(vapply(dataframe, function(x) inherits(x, "POSIXt"), NA)) for(v in dates) dataframe[[v]] <- as.vector(round(julian(dataframe[[v]], ISOdate(1960,1,1, tz=tz)))) ## It would be possible to write these as %tc format, ## milliseconds since 01jan1960 00:00:00.000 ## dataframe[[v]] <- 1000*as.vector(as.POSIXct(dataframe[[v]], tz=tz) + 315619200) } convert.factors <- match.arg(convert.factors) factors <- which(vapply(dataframe, is.factor, NA)) if(convert.factors == "string") { for(v in factors) dataframe[[v]] <- I(as.character(dataframe[[v]])) } else if (convert.factors == "numeric") { for(v in factors) dataframe[[v]] <- as.numeric(as.character(dataframe[[v]])) } else if (convert.factors == "codes") { for (v in factors) dataframe[[v]] <- as.numeric(dataframe[[v]]) } shortlevels <- function(f) { ll <- levels(f) if (is.null(ll)) return(NULL) ## avoid warning if non-ASCII strings are used (unwisely) if (all(nchar(ll, "bytes") <= 80L)) ll else abbreviate(ll, 80L) } leveltable <- lapply(dataframe, shortlevels) if (any(vapply(dataframe, function(x) { d <- dim(x) !is.null(d) && d[1L] < length(x) }, NA))) stop("cannot handle multicolumn columns") invisible(.External(do_writeStata, file, dataframe, version, leveltable)) } foreign/MD50000644000175100001440000001616714531305705012247 0ustar hornikusersf87d40597e85fd95afb45eb64c651832 *COPYRIGHTS ffa550ae005806ee471a93dcefe53527 *ChangeLog 2edcc23e1a815c7786b252edda2895f9 *DESCRIPTION 2e82d3849af11b642299fc69ccef26f3 *GPL-2 ed8178a14789e97ce12174176eed1908 *NAMESPACE a6c68bd0f84690aab0887b99db7077e0 *R/R_systat.R ea95d085c2d57992edec696c52bc43c9 *R/Sread.R fe9264456fd8aa175971d74b69e4d48a *R/arff.R 10e59a4b27f2403f689194966883f31b *R/dbf.R b7e7d712506f5c522860a934f332cd43 *R/minitab.R 09282ecf93e305abef7dca5be7155250 *R/octave.R 64f1e4df457b9941596cc871eaa9f3f1 *R/read.dta.R fa87d427ceeef77e124a5a688fa34bc1 *R/read.epiinfo.R 1086e6cc7c1c3bbb16f5681d88801b7d *R/read.ssd.R 89dd9b2f65c59b73891a7b8c9b9b7752 *R/spss.R 6dbcb06c926835e544ab99088dc27b82 *R/writeForeignCode.R f7d40d0f31f7c6ee49c01e8b2b8588b7 *R/writeForeignSAS.R f1301fddaba605563a68c718aab7b2b4 *R/xport.R 0337f989613243d0134c33eb5584953b *R/zzz.R efd25b6076bba3a05fcc2af925e92a80 *inst/COPYRIGHTS 03fec511a5a02a497bd959ee50ab290b *inst/files/HillRace.SYD 3335f0e1dd6812968776cc757a22ea78 *inst/files/Iris.syd 724515c420fe1c87636dab0a8753bbac *inst/files/electric.sav 739845e11f7e69826b04ca22a7d45568 *inst/files/sids.dbf 46e22eae53d3ab8456a97675f435cb61 *inst/files/testdata.sav 5153aee07673bdb8d2b96d2334aa87d2 *inst/po/de/LC_MESSAGES/R-foreign.mo 6092574f41670c964bbc848c1cef49db *inst/po/de/LC_MESSAGES/foreign.mo 034738361faedec8cd0277d8eab4cbb1 *inst/po/en@quot/LC_MESSAGES/R-foreign.mo 5288bdb144f7191c7a45c30fbca68f44 *inst/po/en@quot/LC_MESSAGES/foreign.mo 0b9cead821c8c56db4e67261e4b2644a *inst/po/fr/LC_MESSAGES/R-foreign.mo 9ce8a99b9629ae96e24cfe5cfce037ed *inst/po/fr/LC_MESSAGES/foreign.mo f9f6168cb5053cb97808d96ebfde3fb3 *inst/po/it/LC_MESSAGES/R-foreign.mo 5b31b465933ea6d0a7f3af727f5b8503 *inst/po/it/LC_MESSAGES/foreign.mo 32befeffc3b15e0125a8984685990f71 *inst/po/pl/LC_MESSAGES/R-foreign.mo 805a6b747f4e3c7ec071b949aa2c1528 *inst/po/pl/LC_MESSAGES/foreign.mo d3870e853d2e862b8fcafa32d3bb2050 *man/lookup.xport.Rd 87a4728de4cc9fa5f10e1956bebf0436 *man/read.S.Rd e0cf52e5a67a11a725e01fc108617f15 *man/read.arff.Rd 0d4ffabd8bca0fb5e20600de0dab825a *man/read.dbf.Rd 1a8489d7784739b76a58d48013c8c11b *man/read.dta.Rd 0f6a02801c623c4c1c353dcc0a2da9cb *man/read.epiinfo.Rd aa309892794343bac77affd49e70cfbc *man/read.mtp.Rd f6bca533e85dd1ab0faf78be601ee5d1 *man/read.octave.Rd eddd0e3b31285ac7ecff0fc46b08325f *man/read.spss.Rd 68b139470d8429706056879be85dbe90 *man/read.ssd.Rd 146b4ae1fc1dee5b33cd2f1958b7b72c *man/read.systat.Rd 541c6e3a1980cf062392550de4a07cd6 *man/read.xport.Rd 8f68ebf47f5bc96f923aad585d973a71 *man/write.arff.Rd a4a17dff170cc4feb9eb4131327da33a *man/write.dbf.Rd 19e382a4607b51df5325a4ccbcf45478 *man/write.dta.Rd 3488df6faab757f05c8c4967d77b2100 *man/write.foreign.Rd 7d5e3183d6a98704fe0ebd2616779be4 *po/R-de.po 8280804afc5cdec9b70805406c16bb40 *po/R-foreign.pot 65a07da4cbcd745e75a3ef61191585e6 *po/R-fr.po fcadc0ae94c0938e026b07d6955cf65d *po/R-it.po 14aae27d5a52ddc94088b91a53c4602b *po/R-pl.po d0de302738456048918ea237deb5283a *po/de.po 0c0c3e97624ef24597c0d479bc044f08 *po/foreign.pot 08b6fb3a909ac65b7ede8ea3bd8ee47a *po/fr.po f7296d8e59240d87472b0fef5c1f1e02 *po/it.po 336068b0e5aecec960c2bc388a34d868 *po/pl.po 7a21223d74ceeac0097cf45e858c1a70 *src/R_systat.c 6c232588647bb46b4556412a4146272a *src/Rdbfread.c 3f68f084d2debe253f03024d851bc4ed *src/Rdbfwrite.c a0aa8a84315d3bbe0811178b811a7c77 *src/SASxport.c ebcdf2857b396887f0ea3be29826f97f *src/SASxport.h 642cf8aaec68e39d6afa10b6945a6cc5 *src/avl.c 785147c2c9cdd004b1f426d8b8208802 *src/avl.h c6d71ad8d5bd8412745017ad90272e1d *src/dbfopen.c fe649aacda9a1c2b4e962805b86d0c6d *src/file-handle.c 1deb621b67bd3483c474a3e4e15bf1f8 *src/file-handle.h 4ab523323c1cdd3070b339621b08bb7e *src/foreign.h 9fbd082d10f11b61d419c26c9a05480f *src/format.c ba57918d9812b0751713e905c53c5d46 *src/format.h 9f9207714c9f77a05ed271202aaafe1a *src/init.c fedf234d49ac923d772d6ea45696a8a1 *src/minitab.c 433c545965a81352272b4b753e7b234e *src/pfm-read.c 0b155bb697ace4fd196dd0282a787752 *src/pfm.h 913d1eacdc04e0139ed1309715e61306 *src/pspp-format-def.h 14c9218411bdbdeae9e3d5a68068ef64 *src/sfm-read.c 57d2ead77446dcc448a46d6dda1a002a *src/sfm.h 415d9a842df63d8f5aa2f30dee9a3897 *src/sfmP.h 7170823cb63ff57d1656d137fcbd9a88 *src/shapefil.h 76c424361093dd943f3a1986dc73dabf *src/spss.c 927994210bd74da6846e84527f7a48b2 *src/stataread.c c74a01a94fd57a14ed1b5ed6c959f13c *src/swap_bytes.h 755f0cbaa53ae02237c1748aba1b372e *src/var.h 67b90739aaf9a0327571426c1c634bf4 *tests/Alfalfa.xpt dcd72019693bf0962a8a18fdbb5bca21 *tests/MLLabelsWithNotesChar.dta a8296e130eaa66e0c32d92b99117d17a *tests/OneVarTwoValLabels.dta 7d10a8f1bcbcff1a620b70254917f21e *tests/S3.R 88b9ff595f67f5cd20037a875c0e57bc *tests/S3.Rout.save 7031725ec5e5edb4c239dd7e713523c9 *tests/arff.R e6dc317a4103b3ecbe555918d5865498 *tests/arff.Rout.save bd3f8b9f6ca60cf1522fc20c9c3a2a1b *tests/auto8.dta 99617ad6332e0039aa49106add84cc32 *tests/compressed.dta 62d900123933cc8385bde5d89467fcf6 *tests/contact-lenses.arff d7265f41a6bfebc1e1d593e211eaf107 *tests/create-dumpdata.S 3baa2cc833059315d797ea7e90159926 *tests/datefactor.dta c82c97b941d8c3dfbf780a18479c3c59 *tests/download.R 269d75f02a2d06d3a7e2b7a2bc621ac9 *tests/dumpdata 57ccf646d2c4ad366eb179b7e914312b *tests/electric.por 859e5cbbd74fd94775c2c7f111ae2d71 *tests/ex1-51.mtp d9ebff4042010117916598a3d8b0745b *tests/keep/codefile.sps 85becb8dd1c037ccdd4072bcfbf5e6d9 *tests/keep/datafile.dat a175ed9be624fb4d92b3ca53bd88a9e5 *tests/minitab.R 57c6e64dd8bc3b41be2e7b6e698f46c2 *tests/minitab.Rout.save 6b10616d9a73a6b4c363d82bde67df4c *tests/mval_bug.R 3658e0672ec125c8be2e5997443452ab *tests/mval_bug.Rout.save fd75debed7f0899ba5020e2a7312658b *tests/mval_bug.sav d3c1fe7fba4ac4890fede6da3c62bbea *tests/mySobj e220c5057046bcc051a300ed2e593ae9 *tests/octave.R 950a8fd57a47e577fe22cecf08baa9df *tests/octave.Rout.save b6c26cc17566924c85481a81c11a845f *tests/octave.dat ee5f89b52abd011690b78c282ea43096 *tests/octave.m 4913d4bc9f14ed510c17ce93ff8de409 *tests/pbc.por 13a320abbc41adb84ab273a105b88904 *tests/pbc.sav 2ac0741ac55e126f0fa17fd8c811b4c5 *tests/pbc.sys 93c8c425594da1c658f74905551b8f87 *tests/pbcold.sav 427133ae0b29d7f966dded7fd96cf534 *tests/pc5.dta 4529f9257032e61890138da9cd4ae4b5 *tests/sample100.por 05a548c3dd3001dd1ae569bb7b487d13 *tests/sample100.sav 34582c6a90c8d9e708f4b17886079b1c *tests/sas.R b110719cb24b095250ac79988ef655a5 *tests/spss.R 7c77445439cfdb69f1a6f49c57c48807 *tests/spss.Rout.save 8f44f68889e702b80b267d274adf9cd6 *tests/spss_long.sav 09d18fba44288fd040d464b4706ccb55 *tests/stata.R 8148d079c0233d40e1c2ce3a63d438bb *tests/stata.Rout.save a3ee1176251b594b3d33435335bbc674 *tests/stata7se.dta 7528d02f1dc494b8518dde030e27f2cd *tests/stata8mac.dta 21329582e511fbaf58110d5237422ec9 *tests/sun6.dta 7510f12d2031bb8bca362160202a8e10 *tests/test.xpt b1705c3736380cf0ff7e32c6f474b4bd *tests/testEmpty.R f09e2ae8f13f085e70344d2d7d4698b5 *tests/testEmpty.Rout.save 53e16b74c3ef55e5467204bd89549487 *tests/testEmpty.xpt 8faa47e7d4da52cbb2b3d0b411ec8bdd *tests/tsdumpdata 54096f7e190e583b4a94841f104623d1 *tests/writeForeignSPSS.R a5ef9e1cb5d8ea4deb3ac9ba7894ecae *tests/writeForeignSPSS.Rout.save 02759f7faf90dbca07b3a008b5a62c24 *tests/xport.R 6a2d61a107322de2075a9ea5ecebbfa4 *tests/xport.Rout.save df55518b3226fdb30ce963921c5b3dd8 *tests/xxx12.dta foreign/inst/0000755000175100001440000000000013245463574012713 5ustar hornikusersforeign/inst/COPYRIGHTS0000644000175100001440000000516413245463574014337 0ustar hornikusersVarious files in this package have different copyrights. The DFB read/write facilities are based on code originally written by Nicholas Lewin-Koh and modified by Roger Bivand and Brian Ripley. R/dbf.R src/Rdbfread.c src/Rdbfwrite.c Copyright 2000-2001 (c) Nicholas Lewin-Koh Changes for the foreign package (C) 2004-7 R Core Team src/dbfopen.c src/shapefil.h Corrected versions of files from shapelib by Frank Warmerdam. The original files were (c) 1999, Frank Warmerdam. His code is available under the MIT or LGPL licence, and the latter is chosen here. man/read.dbf.Rd man/write.dbf.Rd Nicholas Lewin-Koh and Roger Bivand, Changes for the foreign package (C) 2004 R Core Team R/R_systat.R man/read.systat.Rd Copyright 2004 by Roger Bivand Changes for the foreign package (C) 2004 R Core Team src/R_systat.c Copyright (C) 1990-1992, 2004 Roger Bivand Patches (C) 2004 B. D. Ripley src/avl.c src/avl.h Copyright (C) 1998-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff (for libAVL: then , now ) Modified for R foreign package by Saikat DebRoy . The following files are based on an early version of PSPP (then , now ). src/file-handle.c src/file-handle.h src/format.c src/format.h src/pfm-read.c src/pfm-h src/sfm-read.c src/sfm.h src/sfmP.h Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. Written by Ben Pfaff . Modified for R foreign package by Saikat DebRoy and others. src/minitab.c src/SASxport.c Copyright 1999 Douglas M. Bates , Saikat DebRoy src/foreign.h src/spss.c Copyright 2000 Saikat DebRoy Thomas Lumley src/stataread.c (c) 1999, 2000, 2001, 2002 Thomas Lumley. 2000 Saikat DebRoy Patches by the R Core Team and Brian Quistorff. man/read.dta.Rd man/write.dta.Rd man/write.foreign.Rd Thomas Lumley (Patches by the R Core Team) man/read.mtp.Rd Douglas M. Bates man/read.S.Rd Duncan Murdoch man/read.spss.Rd man/read.xport.Rd Saikat DebRoy R/read.ssd.R man/read.ssd.Rd (c) 2002 VJ Carey (c) 2002-7 R Core Team man/read.systat.Rd Roger Bivand R/read.epiinfo.R (c) 2002-4 Thomas Lumley Patches (c) 2002 Mark Myatt src/minitab.c Patches (c) 2004 Rajarshi Guha R/octave.R man/read.octave.Rd (c) 2004 Stephen Eglen Enhancements (c) 2004-7 R Core Team R/writeForeignSAS.R (c) 2004-5 R Core Team Enhancements (c) 2006 Stephen Weigand foreign/inst/files/0000755000175100001440000000000013245463577014020 5ustar hornikusersforeign/inst/files/HillRace.SYD0000644000175100001440000000402613245463572016061 0ustar hornikusersKH8MM/DD/YYYYHH    HHCMM/DD/YYYYHH    NHHMM/DD/YYYY HH    NHHMM/DD/YYYY HH   N$$$$$$$$HH$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$H RACE$ TIME DISTANCE CLIMB $(@@P@Greenmantle $$@@@Carnethy $$@@ @Craig Dunain$$`@@@Ben Rha $$0@ @@Ben Lomond $$)@ @d@Goatfell $$@0@L@Bens of Jura$$ @@@Cairnpapple $$@@@Scolty $$@@P@Traprain Law$$@<@h@Lairig Ghru $$.@@@@Dollar $$x@#@0@Lomonds of F$$@@@@Cairn Table $$@@@p@Eildon Two $$@$@p@Cairngorm $$@,@0@Seven Hills $$o@@u@Knock Hill $$T@@@@Black Hill $$@@@Creag Beag $$@@r@Kildoon $$(@ @p@Meall Ant-Su$$V@@0@Half Ben Nev$$А@@ @Cow Hill $$@@@North Berwic$$@@@@Creag Dubh $$$@@@Burnswark $$Ț@@@Largo $$@@X@Criffel $$@@@@Achmony $$@$@0@Ben Nevis $$\@@@Knockfarrel $$@2@P@Two Brewerie$$X@@@Cockleroi $$@4@@Moffat Chase$foreign/inst/files/sids.dbf0000755000175100001440000004160213245463577015445 0ustar hornikusersgdWAREAN PERIMETERN CNTY_N CNTY_IDN NAMEC FIPSCFIPSNONCRESS_IDNBIR74N SID74N NWBIR74N BIR79N SID79N NWBIR79N  0.114 1.442 1825 1825Ashe 37009 37009 5 1091.000000 1.000000 10.000000 1364.000000 0.000000 19.000000 0.061 1.231 1827 1827Alleghany 37005 37005 3 487.000000 0.000000 10.000000 542.000000 3.000000 12.000000 0.143 1.630 1828 1828Surry 37171 37171 86 3188.000000 5.000000 208.000000 3616.000000 6.000000 260.000000 0.070 2.968 1831 1831Currituck 37053 37053 27 508.000000 1.000000 123.000000 830.000000 2.000000 145.000000 0.153 2.206 1832 1832Northampton 37131 37131 66 1421.000000 9.0000001066.000000 1606.000000 3.000000 1197.000000 0.097 1.670 1833 1833Hertford 37091 37091 46 1452.000000 7.000000 954.000000 1838.000000 5.000000 1237.000000 0.062 1.547 1834 1834Camden 37029 37029 15 286.000000 0.000000 115.000000 350.000000 2.000000 139.000000 0.091 1.284 1835 1835Gates 37073 37073 37 420.000000 0.000000 254.000000 594.000000 2.000000 371.000000 0.118 1.421 1836 1836Warren 37185 37185 93 968.000000 4.000000 748.000000 1190.000000 2.000000 844.000000 0.124 1.428 1837 1837Stokes 37169 37169 85 1612.000000 1.000000 160.000000 2038.000000 5.000000 176.000000 0.114 1.352 1838 1838Caswell 37033 37033 17 1035.000000 2.000000 550.000000 1253.000000 2.000000 597.000000 0.153 1.616 1839 1839Rockingham 37157 37157 79 4449.00000016.0000001243.000000 5386.000000 5.000000 1369.000000 0.143 1.663 1840 1840Granville 37077 37077 39 1671.000000 4.000000 930.000000 2074.000000 4.000000 1058.000000 0.109 1.325 1841 1841Person 37145 37145 73 1556.000000 4.000000 613.000000 1790.000000 4.000000 650.000000 0.072 1.085 1842 1842Vance 37181 37181 91 2180.000000 4.0000001179.000000 2753.000000 6.000000 1492.000000 0.190 2.204 1846 1846Halifax 37083 37083 42 3608.00000018.0000002365.000000 4463.00000017.000000 2980.000000 0.053 1.171 1848 1848Pasquotank 37139 37139 70 1638.000000 3.000000 622.000000 2275.000000 4.000000 933.000000 0.199 1.984 1874 1874Wilkes 37193 37193 97 3146.000000 4.000000 200.000000 3725.000000 7.000000 222.000000 0.081 1.288 1880 1880Watauga 37189 37189 95 1323.000000 1.000000 17.000000 1775.000000 1.000000 33.000000 0.063 1.000 1881 1881Perquimans 37143 37143 72 484.000000 1.000000 230.000000 676.000000 0.000000 310.000000 0.044 1.158 1887 1887Chowan 37041 37041 21 751.000000 1.000000 368.000000 899.000000 1.000000 491.000000 0.064 1.213 1892 1892Avery 37011 37011 6 781.000000 0.000000 4.000000 977.000000 0.000000 5.000000 0.086 1.267 1893 1893Yadkin 37197 37197 99 1269.000000 1.000000 65.000000 1568.000000 1.000000 76.000000 0.128 1.554 1897 1897Franklin 37069 37069 35 1399.000000 2.000000 736.000000 1863.000000 0.000000 950.000000 0.108 1.483 1900 1900Forsyth 37067 37067 3411858.00000010.0000003919.00000015704.00000018.000000 5031.000000 0.170 1.680 1903 1903Guilford 37081 37081 4116184.00000023.0000005483.00000020543.00000038.000000 7089.000000 0.111 1.392 1904 1904Alamance 37001 37001 1 4672.00000013.0000001243.000000 5767.00000011.000000 1397.000000 0.180 2.151 1905 1905Bertie 37015 37015 8 1324.000000 6.000000 921.000000 1616.000000 5.000000 1161.000000 0.104 1.294 1907 1907Orange 37135 37135 68 3164.000000 4.000000 776.000000 4478.000000 6.000000 1086.000000 0.077 1.271 1908 1908Durham 37063 37063 32 7970.00000016.0000003732.00000010432.00000022.000000 4948.000000 0.142 1.640 1913 1913Nash 37127 37127 64 4021.000000 8.0000001851.000000 5189.000000 7.000000 2274.000000 0.059 1.319 1927 1927Mitchell 37121 37121 61 671.000000 0.000000 1.000000 919.000000 2.000000 4.000000 0.131 1.521 1928 1928Edgecombe 37065 37065 33 3657.00000010.0000002186.000000 4359.000000 9.000000 2696.000000 0.122 1.516 1932 1932Caldwell 37027 37027 14 3609.000000 6.000000 309.000000 4249.000000 9.000000 360.000000 0.080 1.307 1936 1936Yancey 37199 37199100 770.000000 0.000000 12.000000 869.000000 1.000000 10.000000 0.118 1.899 1937 1937Martin 37117 37117 59 1549.000000 2.000000 883.000000 1849.000000 1.000000 1033.000000 0.219 2.130 1938 1938Wake 37183 37183 9214484.00000016.0000004397.00000020857.00000031.000000 6221.000000 0.118 1.601 1946 1946Madison 37115 37115 58 765.000000 2.000000 5.000000 926.000000 2.000000 3.000000 0.155 1.781 1947 1947Iredell 37097 37097 49 4139.000000 4.0000001144.000000 5400.000000 5.000000 1305.000000 0.069 1.201 1948 1948Davie 37059 37059 30 1207.000000 1.000000 148.000000 1438.000000 3.000000 177.000000 0.066 1.070 1950 1950Alexander 37003 37003 2 1333.000000 0.000000 128.000000 1683.000000 2.000000 150.000000 0.145 1.791 1951 1951Davidson 37057 37057 29 5509.000000 8.000000 736.000000 7143.000000 8.000000 941.000000 0.134 1.755 1958 1958Burke 37023 37023 12 3573.000000 5.000000 326.000000 4314.00000015.000000 407.000000 0.100 1.331 1962 1962Washington 37187 37187 94 990.000000 5.000000 521.000000 1141.000000 0.000000 651.000000 0.099 1.411 1963 1963Tyrrell 37177 37177 89 248.000000 0.000000 116.000000 319.000000 0.000000 141.000000 0.116 1.664 1964 1964McDowell 37111 37111 56 1946.000000 5.000000 134.000000 2215.000000 5.000000 128.000000 0.201 1.805 1968 1968Randolph 37151 37151 76 4456.000000 7.000000 384.000000 5711.00000012.000000 483.000000 0.180 2.142 1973 1973Chatham 37037 37037 19 1646.000000 2.000000 591.000000 2398.000000 3.000000 687.000000 0.094 1.307 1979 1979Wilson 37195 37195 98 3702.00000011.0000001827.000000 4706.00000013.000000 2330.000000 0.134 1.590 1980 1980Rowan 37159 37159 80 4606.000000 3.0000001057.000000 6427.000000 8.000000 1504.000000 0.168 1.791 1984 1984Pitt 37147 37147 74 5094.00000014.0000002620.000000 6635.00000011.000000 3059.000000 0.106 1.444 1986 1986Catawba 37035 37035 18 5754.000000 5.000000 790.000000 6883.00000021.000000 914.000000 0.168 1.995 1988 1988Buncombe 37021 37021 11 7515.000000 9.000000 930.000000 9956.00000018.000000 1206.000000 0.207 1.851 1989 1989Johnston 37101 37101 51 3999.000000 6.0000001165.000000 4780.00000013.000000 1349.000000 0.144 1.690 1996 1996Haywood 37087 37087 44 2110.000000 2.000000 57.000000 2463.000000 8.000000 62.000000 0.094 3.640 2000 2000Dare 37055 37055 28 521.000000 0.000000 43.000000 1059.000000 1.000000 73.000000 0.203 3.197 2004 2004Beaufort 37013 37013 7 2692.000000 7.0000001131.000000 2909.000000 4.000000 1163.000000 0.141 2.316 2013 2013Swain 37173 37173 87 675.000000 3.000000 281.000000 883.000000 2.000000 406.000000 0.070 1.105 2016 2016Greene 37079 37079 40 870.000000 4.000000 534.000000 1178.000000 4.000000 664.000000 0.065 1.093 2026 2026Lee 37105 37105 53 2252.000000 5.000000 736.000000 2949.000000 6.000000 905.000000 0.146 1.778 2027 2027Rutherford 37161 37161 81 2992.00000012.000000 495.000000 3543.000000 8.000000 576.000000 0.142 1.655 2029 2029Wayne 37191 37191 96 6638.00000018.0000002593.000000 8227.00000023.000000 3073.000000 0.154 1.680 2030 2030Harnett 37085 37085 43 3776.000000 6.0000001051.000000 4789.00000010.000000 1453.000000 0.118 1.506 2032 2032Cleveland 37045 37045 23 4866.00000010.0000001491.000000 5526.00000021.000000 1729.000000 0.078 1.384 2034 2034Lincoln 37109 37109 55 2216.000000 8.000000 302.000000 2817.000000 7.000000 350.000000 0.125 1.601 2039 2039Jackson 37099 37099 50 1143.000000 2.000000 215.000000 1504.000000 5.000000 307.000000 0.181 1.980 2040 2040Moore 37125 37125 63 2648.000000 5.000000 844.000000 3534.000000 5.000000 1151.000000 0.143 1.887 2041 2041Mecklenburg 37119 37119 6021588.00000044.0000008027.00000030757.00000035.00000011631.000000 0.091 1.321 2042 2042Cabarrus 37025 37025 13 4099.000000 3.000000 856.000000 5669.00000020.000000 1203.000000 0.130 1.732 2044 2044Montgomery 37123 37123 62 1258.000000 3.000000 472.000000 1598.000000 8.000000 588.000000 0.103 1.461 2045 2045Stanly 37167 37167 84 2356.000000 5.000000 370.000000 3039.000000 7.000000 528.000000 0.095 1.471 2047 2047Henderson 37089 37089 45 2574.000000 5.000000 158.000000 3679.000000 8.000000 264.000000 0.078 1.202 2056 2056Graham 37075 37075 38 415.000000 0.000000 40.000000 488.000000 1.000000 45.000000 0.104 1.548 2065 2065Lenoir 37107 37107 54 3589.00000010.0000001826.000000 4225.00000014.000000 2047.000000 0.098 1.389 2067 2067Transylvania 37175 37175 88 1173.000000 3.000000 92.000000 1401.000000 4.000000 104.000000 0.091 1.470 2068 2068Gaston 37071 37071 36 9014.00000011.0000001523.00000011455.00000026.000000 2194.000000 0.060 1.036 2071 2071Polk 37149 37149 75 533.000000 1.000000 95.000000 673.000000 0.000000 79.000000 0.131 1.677 2082 2082Macon 37113 37113 57 797.000000 0.000000 9.000000 1157.000000 3.000000 22.000000 0.241 2.214 2083 2083Sampson 37163 37163 82 3025.000000 4.0000001396.000000 3447.000000 4.000000 1524.000000 0.082 1.388 2085 2085Pamlico 37137 37137 69 542.000000 1.000000 222.000000 631.000000 1.000000 277.000000 0.120 1.686 2088 2088Cherokee 37039 37039 20 1027.000000 2.000000 32.000000 1173.000000 1.000000 42.000000 0.172 1.835 2090 2090Cumberland 37051 37051 2620366.00000038.0000007043.00000026370.00000057.00000010614.000000 0.121 1.978 2091 2091Jones 37103 37103 52 578.000000 1.000000 297.000000 650.000000 2.000000 305.000000 0.163 1.716 2095 2095Union 37179 37179 90 3915.000000 4.0000001034.000000 5273.000000 9.000000 1348.000000 0.138 1.621 2096 2096Anson 37007 37007 4 1570.00000015.000000 952.000000 1875.000000 4.000000 1161.000000 0.098 1.262 2097 2097Hoke 37093 37093 47 1494.000000 7.000000 987.000000 1706.000000 6.000000 1172.000000 0.167 2.709 2099 2099Hyde 37095 37095 48 338.000000 0.000000 134.000000 427.000000 0.000000 169.000000 0.204 1.871 2100 2100Duplin 37061 37061 31 2483.000000 4.0000001061.000000 2777.000000 7.000000 1227.000000 0.121 1.855 2107 2107Richmond 37153 37153 77 2756.000000 4.0000001043.000000 3108.000000 7.000000 1218.000000 0.051 1.096 2109 2109Clay 37043 37043 22 284.000000 0.000000 1.000000 419.000000 0.000000 5.000000 0.177 2.916 2119 2119Craven 37049 37049 25 5868.00000013.0000001744.000000 7595.00000018.000000 2342.000000 0.080 1.188 2123 2123Scotland 37165 37165 83 2255.000000 8.0000001206.000000 2617.00000016.000000 1436.000000 0.195 1.783 2146 2146Onslow 37133 37133 6711158.00000029.0000002217.00000014655.00000023.000000 3568.000000 0.240 2.004 2150 2150Robeson 37155 37155 78 7889.00000031.0000005904.000000 9087.00000026.000000 6899.000000 0.125 2.868 2156 2156Carteret 37031 37031 16 2414.000000 5.000000 341.000000 3339.000000 4.000000 487.000000 0.225 2.107 2162 2162Bladen 37017 37017 9 1782.000000 8.000000 818.000000 2052.000000 5.000000 1023.000000 0.214 2.152 2185 2185Pender 37141 37141 71 1228.000000 4.000000 580.000000 1602.000000 3.000000 763.000000 0.240 2.365 2232 2232Columbus 37047 37047 24 3350.00000015.0000001431.000000 4144.00000017.000000 1832.000000 0.042 0.999 2238 2238New Hanover 37129 37129 65 5526.00000012.0000001633.000000 6917.000000 9.000000 2100.000000 0.212 2.024 2241 2241Brunswick 37019 37019 10 2181.000000 5.000000 659.000000 2655.000000 6.000000 841.000000foreign/inst/files/Iris.syd0000644000175100001440000001447613245463572015456 0ustar hornikusersKH$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$H SPECIES SEPALLEN SEPALWID PETALLEN PETALWID (?ffffff@ @ffffff??((?@@ffffff??((?@ @??((?ffffff@@??((?@ @ffffff??((?@333333@333333??((?ffffff@333333 @ffffff?333333?((?@333333 @??((?@333333@ffffff??((?@@??((?@ @??((?333333@333333 @??((?333333@@ffffff??((?333333@@??((?333333@@333333??((?@@??((?@333333@??((?ffffff@ @ffffff?333333?((?@ffffff@333333?333333?((?ffffff@ffffff@?333333?((?@333333 @333333??((?ffffff@ @??((?ffffff@ @??((?ffffff@ffffff @333333??((?333333@333333 @ffffff??((?@@??((?@333333 @??((?@ @??((?@333333 @ffffff??((?@ @??((?333333@@??((?@333333 @??((?@ffffff@??((?@@ffffff??((?@@??((?@ @333333??((?@ @??((?@ @ffffff??((?@@??((?ffffff@333333 @??((?@ @?333333?((?@ffffff@?333333?((?@ @??((?@ @?333333?((?ffffff@ffffff@ffffff??((?333333@@ffffff?333333?((?ffffff@ffffff@??((?ffffff@ @ffffff??((?333333@ @??((?@ffffff @ffffff??((@@ @@ffffff?((@@ @@?((@@@@?((@@ffffff@@?((@@ffffff@ffffff@?((@@ffffff@@?((@333333@ffffff @@?((@@333333@ffffff @?((@ffffff@333333@ffffff@?((@@@333333@ffffff?((@@@ @?((@@@@?((@@@@?((@ffffff@333333@@ffffff?((@ffffff@333333@ @?((@@@@ffffff?((@ffffff@@@?((@333333@@ffffff@?((@@@@?((@ffffff@@333333@?((@@ @333333@?((@ffffff@ffffff@@?((@333333@@@?((@ffffff@ffffff@@333333?((@@333333@333333@?((@ffffff@@@ffffff?((@333333@ffffff@333333@ffffff?((@@@@333333?((@@333333@@?((@@@ @?((@@333333@ffffff@?((@@333333@ @?((@333333@@333333@333333?((@@@ffffff@?((@@@@?((@@333333 @@?((@@@@?((@333333@ffffff@@?((@ffffff@@ffffff@?((@@@@?((@@@@333333?((@ffffff@@ffffff@ffffff?((@333333@@@333333?((@@ffffff@ffffff @?((@ffffff@@@?((@@@@333333?((@@333333@@?((@@333333@333333@?((@ffffff@@@?((@@ffffff@ffffff@?((@333333@ffffff @@@((@333333@@ffffff@ffffff?((@ffffff@@@@((@333333@333333@ffffff@?((@@@333333@@((@ffffff@@ffffff@@((@@@@333333?((@333333@333333@333333@?((@@@333333@?((@@ @ffffff@@((@@ @ffffff@@((@@@333333@ffffff?((@333333@@@@((@@@@@((@333333@ffffff@ffffff@333333@((@@ @333333@ffffff@((@@@@?((@@ffffff@@@((@@@@ffffff@((@@@@?((@@ @@ffffff@((@ffffff@ffffff@@@((@@ffffff@@@((@333333@@@?((@@ffffff @@@((@@ @@?((@@ffffff@333333@?((@ffffff@@@?((@@ffffff@ffffff@@((@@@333333@?((@@ffffff@ffffff@ffffff?((@@ffffff@@@((@@ffffff@ffffff@@((@333333@ffffff@ffffff@?((@ffffff@@ffffff@ffffff?((@@@ffffff@ffffff@((@333333@333333 @ffffff@333333@((@@@@?((@@@333333@?((@@@@@((@@@ffffff@333333@((@@@ffffff@ffffff@((@333333@@ffffff@ffffff?((@333333@ @@ffffff@((@@ffffff @@@((@@@@ffffff@((@333333@@@ffffff?((@@@@@((@@333333 @@ffffff@((@@@ffffff@?(foreign/inst/files/testdata.sav0000644000175100001440000002277313245463572016352 0ustar hornikusers$FL2@(#) IBM SPSS STATISTICS 64-bit MS Windows 23.0.0.0 mY@20 Jun 1719:52:24 NUMERIC numeric variableV2_A numeric variable with long label: this variable hat five observations (one is missing). All values between 1 and 2 are also declared as missing. We use two decimal places and the measurement level is "Scale".?@FACTOR_N!numeric factor with missing range V4_A %numeric factor with long value labels V5_A (numeric factor with coded missing valuesX@V6_A ,numeric factor with duplicated factor labelsV7_A %numeric factor with undeclared values V8_A %numeric factor with undeclared values STRING string variable                                STRING_5long string variable                               STRIN0 long string variable                              STRING_Mstring factor with missings a b FACTOR_S string factor with coded missingu v w V13_A +string factor with duplicated factor labels V14_A $string factor with undeclared valuesV15_A $string factor with undeclared values & &DATE date format tt.mm.yyyy ?strongly disagree @disagree @neither agree nor disagree @agree @strongly agree ?xabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop @hABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ € ?strongly disagree @disagree @neither agree nor disagree @agree @strongly agree X@ no answer ?A @A @B ?strongly disagree @strongly agree ?yes @no f female m male u unknownia A b A c C jn no y yes kn no y yes l 3    pNUMERIC=numeric V2_A=numeric_long_label FACTOR_N=factor_numeric V4_A=factor_n_long_value_label V5_A=factor_n_coded_miss V6_A=factor_n_duplicated V7_A=factor_n_undeclared V8_A=factor_n_undeclared2 STRING=string STRING_5=string_500 STRING_M=string_miss FACTOR_S=factor_s_coded_miss V13_A=factor_s_duplicated V14_A=factor_s_undeclared V15_A=factor_s_undeclared2 DATE=dateSTRING_5=500 numeric:$@Role('0' )/numeric_long_label:$@Role('0' )/factor_numeric:$@Role('0' )/factor_n_long_value_label:$@Role('0' )/factor_n_coded_miss:$@Role('0' )/factor_n_duplicated:$@Role('0' )/factor_n_undeclared:$@Role('0' )/factor_n_undeclared2:$@Role('0' )/string:$@Role('0' )/string_500:$@Role('0' )/string_miss:$@Role('0' )/factor_s_coded_miss:$@Role('0' )/factor_s_duplicated:$@Role('0' )/factor_s_undeclared:$@Role('0' )/factor_s_undeclared2:$@Role('0' )/date:$@Role('0' )UTF-8eeeeeeedLorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so happy , my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. a fffm a y pBffefgOne morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches c f ö n ggf #|; ²~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼× {} abc def ghi j kl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©« ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼ {} abc def ghi jkl u y foreign/inst/files/electric.sav0000644000175100001440000003014413245463577016327 0ustar hornikusers$FL2@(#) SPSS DATA FILE MS WINDOWS Release 6.1  Y@30 Apr 9615:55:19 SPSS/PC+ CASEID CASE IDENTIFICATION NUMBERFIRSTCHDFIRST CHD EVENTTAGE AGE AT ENTRYDBP58 AVERAGE DIAST BLOOD PRESSURE 58EDUYR YEARS OF EDUCATIOND CHOL58 !SERUM CHOLESTEROL 58 -- MG PER DLCGT58 NO OF CIGARETTES PER DAY IN 1958HT58 $STATURE, 1958 -- TO NEAREST 0.1 INCHWT58 BODY WEIGHT, 1958 -- LBSDAYOFWK DAY OF DEATH"@VITAL10 STATUS AT TEN YEARS-FAMHXCVRFAMILY HISTORY OF CHDLBSCHD #INCIDENCE OF CORONARY HEART DISEASEH?NO CHD @ SUDDEN DEATH@ NONFATALMI@ FATAL MI@ OTHER CHD?SUNDAY @MONDAY @TUESDAY@WEDNSDAY@THURSDAY@FRIDAY @SATURDAY"@MISSING ALIVE ?DEAD  Y YES N NO  qgtdt@333333Q@mdegg@Y oidn@ R@i@efpN `p@dkee@d@N gls0q@@O@c@hdefY }fer@N eglPp@eeegN dmj@P@h@degmN ede@w@ h@N fpdk@geefe@N c@rnie`o@33333P@@d@ejmY d@p@dkee`P@d@Y e@foxc@333333R@ d@heegN @f@mshep@333333Q@Y eioxf@u@ieegfffffP@e@Y k@nxml@P@e@degpY 0r@xmder@33333P@c@N gkds@@r@33333sN@mdegN s@xie@p@P@e@efN u@u@djeed@Y u@fdm@33333P@ c@jeegY u@rnid@r@P@@c@N egrdx@p@geeg`g@Y x@mxms@fffffQ@@d@deglN @y@xkde0r@`k@N gldz@`m@R@jdefo@N {@ndgePq@fffffO@g@egN |@q@hde33333P@e@N 0}@flxj@P@`e@heegN `}@qmd`m@fffffP@g@N efoz ~@q@feef9Q@f@Y P~@qxei@33333sR@i@eegrY @neeept@33333sP@f@N gqx@p@fffff&P@kdegN @ndmdq@ffffffQ@`g@eglN @`r@dmdelR@@j@N @gndg@Q@@g@fdefY (@odfe@k@9R@f@N egox@s@fdefP@Y @l|e@h@YQ@d@eefpN X@xeeepw@lP@c@N gmpp@u@̌Q@gdef i@Y @dge u@P@i@eflN @pr@dhee̬P@c@N ؈@gn p@mdegY (@mdgdn@fffffQ@i@Y eiqx@n@keef33333sQ@e@N @njkw@P@f@eefN @xheeq@LQ@d@N gmn(@u@P@mdegc@N @mxgdl@33333sQ@@g@eflN @dieeP@@g@N @gpxz@P@f@mdegN @lnmdv@,Q@`c@N efox@q@eeegQ@`e@Y @lxj k@Q@e@degnY Ў@dmdei@33333Q@@i@N gr@Pr@fffffQ@heeii@N @okef@ d@egnN @@n@tkeeP@N D@fld`q@P@@c@jeefN X@mxhe0q@fffff&Q@Y eftx@s@eeegP@N @pxgi@LR@g@degrY @jdeo@̬Q@ h@Y gpd @@p@YQ@mdege@N @lxedi@33333O@eglN @@dfde P@@g@Y 4@gnx@n@Q@d@idefN @vhe r@fffffQ@c@N egqo@l@mdefQ@c@Y @ldhq@33333Q@`e@eefnN L@xjeel@P@d@N ijxؔ@`m@ Q@geegY @qdmd`m@P@egvY @ t@}feěQ@l@N h@gdg@R@`h@mdefN ܕ@xeep@YQ@ d@N eix@t@ieefYQ@e@N X@pk@s@lQ@e@eegtN ؖ@sieep@`f@N gln@p@mdeic@N @txee@n@̌Q@g@eiN 0@p@fheee@N @gpx`q@P@mdegN @lvedk@f@Y eftd|@p@eeeg33333P@`f@N ؘ@p}kf@ Q@@f@dejN @nfee@r@33333Q@Y ipx@i@P@keegf@N `@pxmdk@fffff&Q@d@egtY l@r@mdeffffffQ@c@N T@gsd@x@lQ@e@edegY d@odfdv@33333P@e@Y egod@@c@mdeg m@N @ndm o@LQ@`d@deglN 0@xmde t@P@c@N fd|@`m@fffffQ@keeg d@N @lpmdt@fffffP@egmN @s@dmdefffffP@d@Y @fnd@n@`g@geegN @msmdh@P@N egp<@p@mdef33333P@c@N L@xi`m@R@`h@eegpY @dmdes@ Q@c@Y ird@h@fffffP@jeegd@N @mxhek@9Q@`e@egoY \@ u@xedeN `@gnd@n@Q@j@ieegY @ndgd`v@ P@d@N egsd@l@kdegyP@c@N @mxh0t@33333SQ@f@eeflN (@}jeeg@ j@Y fld|@q@33333P@jeef`e@N О@neeq@`j@egoN X@p@dfdefffffQ@k@Y @grnp@`c@mdegN @mxid@n@@e@Y efpx@`l@feeg`Q@@c@N @pxks@P@h@eejN d@d@dgeef@`q@N eetdp@ Q@mddgef@N ugd@o@ P@dhetY r@dmddi333333Q@f@N evp@33333sQ@`e@mddjeN pdmdt@Q@f@N dkesq@iddlek@N tdmr@33333P@ c@ddmevN dmddg@g@N oetdi@hddpe`g@N tskd@j@,R@d@drerN k@dhddťQ@ f@N eqdm@33333Q@f@mddveN rsmde@fffffP@`e@N dxetgt@mddyeg@N rxeq@P@c@ddzetN mmddr@`R@k@N {eqsx@`P@mdd|e@f@N qdmdt@Q@k@d}euY Pw@dmdd~P@`d@N epx@s@33333P@d@mddeN udmdp@Q@@c@N detsq@mdde9Q@c@N sdmm@33333P@e@ddetN gddp@`P@e@N epxq@`Q@edde`d@N ndkdh@ R@j@demY k@jmdd Q@e@Y erh m@mddeN pdmdv@P@d@N denx n@mddeN psmq@ Q@ddepN dmdds@ R@N ed@o@ P@mddeY pxmdp@ Q@c@deY i@xmddP@e@Y emxm@mddeN rimdp@ h@Y delxu@iddeQ@`e@Y pdmo@333333R@g@ddepN nmddo@ P@N etdl@mddej@N pxmd@q@`R@h@denN p@dmdd`P@c@Y etdps@ Q@mddeN ldgdh@33333P@ h@N deldl@mddeQ@j@N lxml@P@ddeY nmdd`j@33333SP@N emxo@gddeg@N mxmdo@denN q@dmddP@@e@N eox f@P@ g@mddeY psmd@u@e@N dedr@mdde33333Q@l@N txmk@Q@i@ddenN gdd@j@33333sO@N end`s@edde i@Y tmdg@̌Q@d@depN @s@dmddP@e@N eqxpq@f@mddeN ndmdt@ Q@e@N deuer@mdde33333P@f@N xmp@d@ddepN dmdd`m@33333Q@f@N erdp@P@mdde`l@N qmd s@k@denN n@nmdd@f@Y eodPt@P@mddeN lhmdq@33333sP@ e@N detdt@mdděP@c@N tmq@33333sQ@e@ddenN idd0q@i@N eodk@33333SQ@mddek@Y pdmd`m@g@deqN @i@dmdd33333P@ f@N epd`l@P@mddeN dmd p@Q@@g@N derd`l@mdde`P@l@N nxgt@P@ddenN mdd@n@f@Y eldp@P@mddei@N ndjdn@33333sQ@`j@detN @p@nhdd͚YQ@N eq@33333R@j@mddeN psmd`q@P@ e@N deoxp@mdde33333R@j@N tdmq@`f@ddeN dmddm@@f@N ed n@mddee@N odmdPp@`P@deqY p@smddY elxp@d@mddeN nxgd`r@f@N depn@mdde33333Q@N nxjg@33333P@g@ddenN smdd@l@33333Q@d@N end@m@33333P@mddeg@N odmdo@i@denN m@dmdd P@`f@Y epdk@33333P@e@mddeN pdmd`s@33333sP@f@N deldm@mddeLP@@d@N ndm l@33333P@e@ddeY nmddi@ c@N epd`s@33333Q@mdde`i@N pxmdp@33333R@depN @v@dmddY emd0u@mddeY sdmdq@fffffQ@e@N deldp@mddeY mdmi@33333sP@c@ddepN dmddn@`d@N esdp@mddee@N pxmdr@33333P@`h@derN i@jddP@`e@N esx e@ h@mddeN mxmdi@ P@N detd@f@mdde33333sQ@e@N @c@vnm l@33333Q@e@ddeN `c@dmddi@ g@N foreign/inst/po/0000755000175100001440000000000013651251016013314 5ustar hornikusersforeign/inst/po/fr/0000755000175100001440000000000013245463571013735 5ustar hornikusersforeign/inst/po/fr/LC_MESSAGES/0000755000175100001440000000000014011446270015507 5ustar hornikusersforeign/inst/po/fr/LC_MESSAGES/R-foreign.mo0000644000175100001440000001240414011446270017675 0ustar hornikusers0C()4Bwy9{5G3OCm   /-;i:1,.Ca}8"!,,)Y1i/ >O % "     $5 !Z $|   ,C Fp   J Q _X / " M $Y!~ C>>^ *7#@dH;8(=Tf?C?7Y ,e.$+0J9{+" ,0!) &$%" *-#( .' +/'file' must be character'missing.type' only applicable to version >= 8 files,:Argument 'file' must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersDuplicated levels in factorField name: %s changed to: %sI cannot abbreviate the variable names to 'maxchars' or fewer charsInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType 'relational' currently not implemented.Undeclared level(s)Version must be 6-12Version must be 6-12: using 7abbreviating variable namesadded in variable:argument 'file' must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsProject-Id-Version: foreign 0.8-10 Report-Msgid-Bugs-To: bugs@r-project.org PO-Revision-Date: 2021-02-06 16:32+0100 Last-Translator: Philippe Grosjean Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Poedit 2.4.2 'file' doit être une chaîne de caractères'missing.type' est seulement applicable pour des fichiers version >= 8,:L’argument 'file' doit être une chaîne de caractères ou une connexionImpossible d'abbréger de manière unique les noms de format pour se conformer àImpossible d'abbréger de manière unique les noms de variables vers %d ou moins de caractèresNiveaux dupliqués dans la variable qualitativeNom de champ : %s modifié en : %sImpossible d'abbréger les noms de variables à 'maxchars' lettres au maximumSpécification d'attribut incorrect.Spécification de type incorrect.Section 'attribute' manquante.Section 'data' manquante.NA dans précisionNA dans scaleMode S %s (dans les environs du décalage d'octet %s) non supportéLe code renvoyé par SAS est %dQuelques noms de variables on été abbrégées ou altérées.L'objet "Type 'relational' non encore implémenté.Niveau(x) non déclaré(s)La version doit être 6-12La version doit être 6-12 : la version 7 est utiliséeabbréviation des noms de variablesajouté dans la variable :l'argument 'file' doit être une chaîne de caractères ou une connexionimpossible de traiter les colonnes de la matrice/du tableauimpossible de traiter des colonnes de type 'multicolumn'impossible de traiter un type inconnu %simpossible de lire les étiquettes des variables facteur depuis les fichiers Stata 5impossible d'abbréger de manière unique les noms de variablesla colonne de chaîne de caractères %d sera tronquée à %d octetsle tableau de données contient des colonnes de classe non supportée %sle tableau de données contient des colonnes de classes non supportées %slimite de 8 caractères et sans terminer par un chiffrele fichier aurait zéro variables ou moins : ce n'est probablement pas un fichier EpiInfoerreur interne - valeur de code S incorrectetype de valeur manquante %s non pris en compteaucun enregistrement dans le fichierceci n'est pas un objet Sseulement un fichierréencodage depuis %snom de section %s non trouvéequelques noms de variables ont été abbrégéestype inconnu pour une colonne dans le tableau de donnéesvaleurs de libellé (%s) manquantes pour %snombre d'enregistrements incorrectforeign/inst/po/fr/LC_MESSAGES/foreign.mo0000644000175100001440000005563114011446270017507 0ustar hornikusers4L $ ) - F"ge\\MC7(3`>Bl1@B["~z)ZATAR79!8[<lj>(G;6QrE>E=b|%f~ yJ3M?*KT8<=qGzE4N anV+,@0m|      !.!-!!."C"/`"""G",##@#Ed##;#9#+6$(b$&$ $5$- %7%@I%3%%%"%#&$5&,Z&&&&&& '!,'N'j''''%''(*7(b(W~(a((8) a)).)"),) *a"*X*i*8G+:+>+,+>', f,,#,",H,4-D-`-}----%-. .!2.wT.>// 04;0/p010~0Q11%2'2\2G63<~3.3X3\C44Y 5Sz5a5066q7`8co8V8N*9Ky9D9H :S::;r;0;_;T?<r<=%&=ZL=`=S>y\>>}?@@`JAZAPB6WB]BqBO^CSCD\D\D TE uE'EEE$EF(1F)ZFF"G:*G>eGG-G1G"!HDH H!HI:IZIiIAJ>IJJBJJGK,HK-uK\KSLITLML#LRMRcMaMNN:gN5NENKOjOQOHO-PKP0cP1P8P:P :Q"[Q~QQQ"Q&QR:RXR,rR)R7R S&"S)ISsSuST9T"TTGU1IUD{UUxUuMVVHMWFWMW4+XP`X1X,X1Y2BYjuYY4Z25Z hZ"ZZ)Z0Z#&[J[6b[LNwgj) (f5RQ_9T,IX+CKo0Py[DHVY;"64&m$c=S~}OtkJMG /B?vE8n`p\bu iAU.|Z>!e3s2dx@F#^q *W %7l]z<a1h:-{r '$ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string missing values record found (record type 7, subtype %d), but ignored%s: Long string value labels record found (record type 7, subtype %d), but ignored%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening '%s' for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file '%s'cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile '%s' is not in Minitab Portable Worksheet formatfile '%s' is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file '%s'problem reading SAS XPORT file '%s'problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file '%s': '%s'unable to open file for writing: '%s'unable to open file: '%s'unknown data typevalue |%d| found in logical fieldProject-Id-Version: foreign 0.8-10 Report-Msgid-Bugs-To: PO-Revision-Date: 2021-02-06 16:20+0100 Last-Translator: Philippe Grosjean Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Poedit 2.4.2 $ n'est pas dans l'étiquette de variable à la colonne 9 : %s%s variable %s a %s spécificateur de format %s%s : %s variable %s a %s spécificateur de format %s%s : mauvais octet de spécification de type %d%s : mauvais octet de spécification de type (%d)%s : mauvais nombre magique. Un fichier système correct commence avec les 4 caractères `$FL2'. Impossible de lire ce fichier%s : mauvaise taille (%d) ou dénombrement (%d) de champs dans les enregistrement de type 7, sous-type 3. Une taille %d et un dénombrement de 8 sont attendus%s : mauvaise taille (%d) ou dénombrement (%d) de champ d'enregistrement de type 7, sous-type 4. Une taille %d et un dénombrement de 8 étaient attendus%s : fermeture du fichier portable %s%s : fermeture du fichier système : %s%s : les données compressées sont corrompues. Les données se terminent au milieu d'un cas%s : le biais de compression (%g) n'est pas la valeur habituelle de 100%s : nom de variable dupliqué `%s' dans le fichier système%s : erreur lors de la lecture du fichier : %s%s : le fichier contient des étiquettes dupliquées pour la valeur %g de la variable %s%s : le fichier contient des étiquettes dupliquées pour la valeur `%.*s' de la variable %s%s : le squelette du fichier a une valeur inattendue %d. La valeur doit être 2 ou 3, en format 'big endian' ou 'little endian'%s : Le code de représentation des caractères indiqué dans le fichier (%d) est inconnu%s : le code de représentation de caractères (%s) dans le fichier n'est pas ASCII%s : représentations 'big/little endian' incompatibles entre le fichier (%s) et son entête (%s)%s : une valeur indiquée dans le fichier est différente d'une valeur interne pour au moins une des trois valeurs système. SYSMIS indique %g, attendu %g ; LA PLUS ELEVEE : %g, %g ; LA PLUS FAIBLE : %g, %g%s : la représentation en virgule flottante n'est pas IEEE-754 dans le fichier système. read.spss ne peut convertir entre les formats en virgule flottante%s : l'index d'une variable de pondération (%d) n'est pas compris entre 0 et le nombre d'éléments par cas (%d)%s : les enregistrements de continuation de longues chaînes sont omis à la fin du dictionnaire%s : valeurs manquantes d’enregistrement de chaîne longue (type 7, sous-type %d), mais ignorées%s : labels d’enregistrement de chaîne longue (type 7, sous-type %d), mais ignorés%s : la variable de type longue chaîne %s ne peut avoir de valeurs manquantes%s : le nombre de cas dans le fichier (%d) n'est pas compris entre -1 et %d%s : le nombre de lignes du document (%d) doit être supérieur à 0%s : le nombre d'éléments par cas (%d) n'est pas compris entre 1 et %d%s : le nombre de variables associées a une étiquette de valeur (%d) n'est pas compris entre 1 et le nombre de variables (%d)%s : enregistrement d'index de variable orphelin (type 4). Les enregistrements de type 4 doivent toujours suivre immédiatement des enregistrements de type 3%s : enregistrement partiel à la fin d'un fichier système%s : lors de la lecture du fichier système : %s%s : la variable de chaîne %s ne peut avoir des valeurs manquantes spécifiées dans une plage%s : le fichier système contient des enregistrements multiples de type 6 (document)%s : l'entête du fichier système indique %d positions de variables mais seulement %d sont lues depuis le fichier%s : fin de fichier inattendue%s : type d'enregistrement inconnu %d%s : type 7 d'enregistrement inconnu, le sous-type %d est trouvé dans le fichier système%s : les étiquettes de valeurs ne sont pas permises pour les variables de longues chaînes (%s)%s : la variable %s indique une étiquette de variable d'une longueur %d incorrecte%s : l'index de variable associé à une étiquette de valeur (%d) n'est pas compris entre 1 et le nombre de valeurs (%d)%s : l'index de variable associé à une étiquette de valeur (%d) se réfère à la continuation d'une variable chaîne de caractères, pas à la variable elle-même%s : l'enregistrement d'index de variable (type 4) ne suit pas directement un enregistrement étiquette de valeur (type 3), comme il devrait le faire%s : les variables associées avec des étiquettes de valeurs ne sont pas toutes du même type. La variable %s a le type %s, mais la variable %s a le type %s%s : enregistrement de chaîne de caractère très long (type 7, sous-type %d), chacun d’eux sera importé dans des variables séparées consécutives%s : la variable de pondération ne peut continuer une variable de longue chaîne de caractères%s : la variable de pondération ne peut être une variable de type chaîne de caractères%s : position %d : mauvais type d'enregistrement (%d) ; la valeur attendue est 2%s : position %d : mauvais code de type de variable %d%s : position %d : le champ indicateur de valeur manquante n'est pas -3, -2, -1, 0, 1, 2 ou 3%s : position %d : la variable chaîne de caractères n'a pas un nombre correct d'enregistrements de continuation%s : position %d : enregistrement de continuation d'une longue chaîne superflu%s : position %d : le champ indicateur d'étiquette de la variable n'est ni 0, ni 1%s : position %d : le nom de la variable commence avec un dièse ('#'). Les variables "scratch" ne devraient pas apparaitre dans les fichiers systèmes%s : position %d : le caractère '\%03o' (%c) n'est pas autorisé dans le nom d'une variableUne erreur s'est produite lors de l'ouverture de '%s' en lecture comme fichier système : %sMauvais caractère dans une dateMauvais caractère dans un tempsMauvaise longueur de chaîne de date %dMauvais format d'entierMauvaise fin de ligneValeurs manquantes erronées pour %sMauvaise longueur de chaîne %dMauvaise longueur de chaîne de temps %dLargeur incorrecte %d pour la variable %sImpossible d'assigner les étiquettes de valeurs à %s et %s, parce qu'ils ont des types ou des longueurs de variables différentsEnregistrement de données attenduEtiquette dupliquée pour la valeur %g dans la variable %sEtiquette dupliquée pour la valeur `%.*s' dans la variable %sNom de variable dupliqué %sFin de fichier rencontrée au milieu d'un casCompteur d'enregistrements de la variable attenduEnregistrement de variable attenduLe format d'entrée %s spécifie un mauvais nombre de décimales implicites %d. Le format d'entrée %s ne permet pas plus de 16 décimales implicitesNombre de variables %d incorrectLargeur de variable %d incorrecteSignature SPSSPORT manquanteTerminateur numérique manquantNombre attenduLe format de sortie %s spécifie un mauvais nombre de décimales implicites %d. Le format de sortie %s autorise seulement entre 1 et 16 décimales implicitesLe fichier de transfert SAS a une entête de librairie incorrecteLe fichier de transfert SAS a une entête de membre incorrecteFin de fichier inattendueVariable %s inconnue lors de la lecture des étiquettes de valeursCode de version inconnu %dLa variable de pondération %s n'est pas présente dans le dictionnaireune erreur de lecture binaire s'est produiteune erreur d'écriture binaire s'est produiteune erreur s'est produite lors de l'ouverture de "%s" en lecture comme fichier portable : %sla lecture des fichiers Stata .dta n'est pas encore possible sur cette architectureil est seulement possible d'écrire des fichiers aux formats version 6-10impossible d'afficher une variable caractère de largeur %d avec le format %simpossible d'ouvrir le fichier '%s'impossible de lire le fichier %s comme un fichier portable : déjà ouvert pour %simpossible de lire le fichier %s comme un fichier système : déjà ouvert pour %sla lecture ou l'écriture de fichiers Stata .dta n'est pas encore possible sur cette architectureles données à sauvegarder doivent être contenues dans un objet "data frame"erreur à la lecture d'un dictionnaire de fichier portableerreur à la lecture de l'entête du fichier systèmele fichier '%s' n'est pas dans le format 'Minitab Portable Worksheet'le fichier '%s' n'est enregistré dans aucun des formats supportés de SPSSerreur d'accès fichierle handle du fichier '%s' n'a pas été préalablement déclaré dans FILE HANDLEle fichier possède plus de variables que cette fonction ne peut en lirele fichier n'a pas un format de transfert SASerreur d'accès fichierle premier argument doit être un nom de fichierle premier argument doit être un nom de fichier le premier enregistrement pour l'entrée %d est corrompule format %s ne peut être utilisé comme format d'entréegetlab : erreur d'accès fichiergetlab : format de fichier inconnugetlab : octet 0 = %o octalgetlab : octet 1 = %o octalgetlab : octet 9 = %o octalgetlab : octet lab[%d]$ = %o octalgetlab : octet lab[%d]0 = %o ; nv = %dgetlab : octet nv$ = %o octalgetlab : octet nv0 = %o octalgetlab : commentaire = %cgetlab : octet de début de commentaire = %ogetlab : octet de fin de commentaire = %ogetuse : erreur lors de la décompaction de la variablegetuse : erreur d'accès fichiergetuse : décompteur d'octets %o octalgetuse : nombre non entier d'observationsgetuse : bloc nul terminalle format d'entrée %s spécifie une mauvaise largeur %d. Le format %s nécessite une largeur comprise entre %d et %dle format d'entrée %s spécifie une largeur %d impaire, mais le format %s nécessite une largeur paire comprise entre %d et %dlongueur de champ incorrecte dans une variable numériqueerreur dans le nombre de variablesaucun champ dans le fichier DBFles types de données non numériques ne sont pas encore implémentéesceci n'est pas un fichier .dta Stata version 5-12ceci n'est pas un fichier de données rectangulaire (%s mtype is %d)nval est égal à 0le format de sortie %s nécessite une largeur minimum %d pour permettre %d décimales. Essayez %s%d.%d à la place de %sle format de sortie %s spécifie une mauvaise largeur %d. Le format %s nécessite une largeur comprise entre %d et %dle format de sortie %s spécifie une largeur %d impaire, mais le format de sortie %s nécessite une largeur paire comprise entre %d et %dposition %d : le nom de variable commence par un caractère inappropriéposition %d : le nom de variable commence avec une lettre minuscule %cposition %d : le caractère %d du nom de variable est une lettre minuscule %cposition %d : le nom de la variable a %u caractèresposition %d : le caractère '\%03o' n'est pas acceptable dans un nom de variableproblème lors de l'accès d'un fichier SAS XPORTproblème lors de la lecture du fichier '%s'problème à la lecture du fichier SAS XPORT '%s'problème à la lecture d'un fichier SAS transportquelque chose d'étrange s'est produit dans le fichier (caractéristique de type 0 de longueur non nulle)variable chaîne de caractèresCeci devrait se produire : dépassement par le haut.Ceci devrait se produire : dépassement par le basceci ne devrait pas se produire.impossible d'ouvrir le fichier DBFimpossible d'ouvrir le fichierimpossible d'ouvrir le fichier '%s': '%s'impossible d'ouvrir le fichier '%s' en écritureimpossible d'ouvrir le fichier '%s'type de donnée inconnula valeur |%d| a été trouvée dans un champ booléenforeign/inst/po/it/0000755000175100001440000000000013651251016013730 5ustar hornikusersforeign/inst/po/it/LC_MESSAGES/0000755000175100001440000000000014011446270015514 5ustar hornikusersforeign/inst/po/it/LC_MESSAGES/R-foreign.mo0000644000175100001440000001213714011446270017705 0ustar hornikusers0C()4Bwy9{5G3OCm   /-;i:1,.Ca}8"!,,)Y1i/ >O % "     $5 !Z $|   #9 =]   I M [7   b $3Xx 5"E!5g5-&4[Hu7,/#BSE3{6G- %9_v &*-D ,0!) &$%" *-#( .' +/'file' must be character'missing.type' only applicable to version >= 8 files,:Argument 'file' must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersDuplicated levels in factorField name: %s changed to: %sI cannot abbreviate the variable names to 'maxchars' or fewer charsInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType 'relational' currently not implemented.Undeclared level(s)Version must be 6-12Version must be 6-12: using 7abbreviating variable namesadded in variable:argument 'file' must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsProject-Id-Version: R-foreign 0.8-70 Report-Msgid-Bugs-To: bugs.r-project.org PO-Revision-Date: Last-Translator: Daniele Medri Language-Team: Italian https://github.com/dmedri/R-italian-lang Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Generator: Poedit 2.2.1 'file' dev'essere di tipo character'missing.type' applicabile unicamente alla versione >= 8 file,:L'argomento 'file' dev'essere una stringa di caratteri o una connessione.Non è possibile abbreviare univocamente i nomi dei formati a cui conformarsiNon è possibile abbreviare in maniera univoca i nomi delle variabili a %d caratteri o menoLivelli duplicati nel fattoreNome campo: %s cambiato in: %sNon è possibile abbreviare i nomi delle variabili a 'maxchars' o un numero di caratteri inferioreSpecificazione attributo non valido.Specificazione tipo non valido.Sezione attributo mancante.Sezione dati mancante.NA in precisioneNA in scalaModalità S %s (byte offset vicino %s) non supportatoIl codice restituito da SAS era %dAlcuni nomi di variabili saranno abbreviati o alterati in altro modo.L'oggetto "dataframe" dev'essere di classe data.frameIl tipo 'relational' non è attualmente implementato.Livelli non dichiaratiLa versione dev'essere 6-12La versione dev'essere 6-12: si utilizza la 7abbreviazione dei nomi delle variabiliaggiunto nella variabile:l'argomento 'file' dev'essere una stringa di caratteri o una connessionenon è possibile gestire le colonne della matrice/arraynon è possibile gestire le colonne multiplenon è possibile gestire il tipo sconosciuto %snon è possibile leggere le etichette del fattore dai file Stata 5non è possibile abbreviare in maniera univoca i nomi delle variabilila colonna di caratteri %d sarà troncata a %d byteil data frame contiene colonne della classe %s non supportatail data frame contiene colonne delle classi %s non supportatelimite di otto caratteri e niente termine in una cifrail file ha zero o poche variabili: probabilmente non è un file Epilnfoerrore interno - valore del codice S illegaleil tipo di mancanza %s non è gestitonessun record nel filenon è un oggetto Ssolo un fileri-codifica da %ssectionname %s non trovatoalcuni nomi variabile erano abbreviatitipo di colonna sconosciuto nel data framele etichette valore (%s) per %s sono mancantinumero sbagliato di recordforeign/inst/po/it/LC_MESSAGES/foreign.mo0000644000175100001440000005346314011446270017515 0ustar hornikusers4L $ ) - F"ge\\MC7(3`>Bl1@B["~z)ZATAR79!8[<lj>(G;6QrE>E=b|%f~ yJ3M?*KT8<=qGzE4N anV+,@0m|      !.!-!!."C"/`"""G",##@#Ed##;#9#+6$(b$&$ $5$- %7%@I%3%%%"%#&$5&,Z&&&&&& '!,'N'j''''%''(*7(b(W~(a((8) a)).)"),) *a"*X*i*8G+:+>+,+>', f,,#,",H,4-D-`-}----%-. .!2.kT.2/2/6&0,]0.0q0k+1k1#2 '2NH2@2A2"3P=3T33Uc4S4o 5}5+6m6Q$7gv7i7AH838B869l89{91!:S:]s:E:d;|;&;P;P<L`<o<==9>>gV?M?D @1Q@T@Z@G3AK{AAQdB]BC0C MCnCCCC"C'CuDD8D<DE6E$UEzEE!0F!RFtFF FF;cG9GGAG#2H8VH-H/H\H=JI1IdI$JKDJLJ<J.K/IK.yK:K4KLO2L>L'LL*M++M*WMBM!M MN#N>N!YN!{NNNN!NO2.O!aOO)OOsOwZP4P.Q6Q8UQ'Q1Q QzQtmRRHeSHSHS5@TJvT%T!T+ U*5UO`UU%U&UV#-VQV*qV2V%VV' WLNwgj) (f5RQ_9T,IX+CKo0Py[DHVY;"64&m$c=S~}OtkJMG /B?vE8n`p\bu iAU.|Z>!e3s2dx@F#^q *W %7l]z<a1h:-{r '$ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string missing values record found (record type 7, subtype %d), but ignored%s: Long string value labels record found (record type 7, subtype %d), but ignored%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening '%s' for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file '%s'cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile '%s' is not in Minitab Portable Worksheet formatfile '%s' is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file '%s'problem reading SAS XPORT file '%s'problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file '%s': '%s'unable to open file for writing: '%s'unable to open file: '%s'unknown data typevalue |%d| found in logical fieldProject-Id-Version: foreign 0.8-70 Report-Msgid-Bugs-To: PO-Revision-Date: Last-Translator: Daniele Medri Language-Team: Italian https://github.com/dmedri/R-italian-lang Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Generator: Poedit 2.2.1 $ non nella colonna 9 dell'etichetta variabile: %s%s variabile %s ha %s identificatore di formato %s%s: %s variabile %s ha %s identificatore di formato %s%s: errato identificatore di formato byte %d%s: errato identificatore di formato byte (%d)%s: Bad magic. Il file di sistema appropriato inizia con i quattro caratteri `$FL2'. Questo file non sarà letto%s: Dimensione errata (%d) o conta (%d) campo sul record tipo 7, sottotipo 3. Dimensione attesa %d, conta 8%s: Dimensione errata (%d) o conta (%d) campo sul record tipo 7, sottotipo 4. Dimensione attesa %d, conta 8%s: Chiusura del file portatile: %s%s: Chiusura file di sistema: %s%s: Dati compressi corrotti. I dati terminano parzialmente attraverso un caso%s: Il bias di compressione (%g) non è il valore normale di 100%s: Nome variabile duplicato `%s' all'interno del file di sistema%s: Errore di lettura del file: %s%s: Il file contiene un'etichetta duplicata per il valore %g per la variabile %s%s: Il file contiene un'etichetta duplicata per il valore `%.*s' per la variabile %s%s: Il codice layout del file ha un valore inatteso %d. Il valore dovrebbe essere 2 o 3, in formato big-endian o little-endian%s: Il codice di rappresentazione dei caratteri indicato dal file (%d) è sconosciuto%s: Il codice di rappresentazione dei caratteri indicato dal file (%s) non è ASCII%s: L'endianness indicata dal file (%s) non corrisponde all'endianness rilevata dall'intestazione del file (%s)%s: Il valore indicato dal file è diverso dal valore interno per almeno uno dei tre valori di sistema. SYSMIS: indicato %g, atteso %g; PIU' ALTO: %g, %g; PIU' BASSO: %g, %g%s: La rappresentazione in virgola mobile nel file di sistema non è IEEE-754. read.spss non può convertirle tra formati a virgola mobile%s: L'indice della variabile di ponderazione (%d) non è compreso tra 0 e il numero di elementi per caso (%d)%s: I record di continuazione della stringa lunga omessi alla fine del dizionario%s: Trovato il record di valori mancanti di stringa lunga (tipo di record 7, sottotipo %d), ma ignorato%s: Trovato il record di etichette con valore stringa lungo (tipo di record 7, sottotipo %d), ma ignorato%s: Variabile stringa lunga %s potrebbe non avere valori mancanti%s: Numero di casi nel file (%d) non è tra -1 e %d%s: Numero di linee del documento (%d) dev'essere più grande di 0%s: Numero di elementi per caso (%d) non è tra 1 e %d%s: Il numero di variabili associate con un'etichetta valore (%d) non è tra 1 e il numero di variabili (%d)%s: Record di indice variabile orfano (tipo 4). I record di tipo 4 devono sempre seguire immediatamente i record di tipo 3%s: Record parziale alla fine del file di sistema%s: Lettura file di sistema: %s%s: La variabile di stringa %s potrebbe non avere valori mancanti specificati come intervallo%s: Il file di sistema contiene multipli record di tipo 6 (documento)%s: L'intestazione del file di sistema indica %d posizioni variabili ma %d sono state lette dal file%s: Fine del file inattesa%s: Tipo di record non riconosciuto %d%s: Tipo di record 7 non riconosciuto, sottotipo %d rilevato nel file di sistema%s: Le etichette dei valori non sono consentite su variabili stringa lunghe (%s)%s: La variabile %s indica un'etichetta variabile di lunghezza non valida %d%s: L'indice variabile associato all'etichetta del valore (%d) non è compreso tra 1 e il numero di valori (%d)%s: L'indice di variabile associato all'etichetta del valore (%d) si riferisce a una continuazione di una variabile stringa, non a una variabile effettiva%s: Il record dell'indice variabile (tipo 4) non segue immediatamente il record dell'etichetta del valore (tipo 3) come dovrebbe%s: Le variabili associate all'etichetta del valore non sono tutte di tipo identico. La variabile %s ha il tipo %s, ma la variabile %s ha il tipo %s%s: Trovati record di stringa molto lunghi (tipo di record 7, sottotipo %d), ciascuno sarà importato in variabili separate consecutive%s: La variabile di ponderazione potrebbe non essere la continuazione di una variabile di stringa lunga%s: La variabile di ponderazione potrebbe non essere una variabile di stringa%s: posizione %d: Tipo di record errato (%d); il valore atteso era 2%s: posizione %d: Codice tipo variabile errato %d%s: posizione %d: Il campo indicatore del valore mancante non è -3, -2, 0, 1, 2 o 3%s: position %d: La variabile stringa non ha un numero adeguato di record di continuazione%s: posizione %d: Record di continuazione della stringa lunga superfluo%s: posizione %d: Il campo indicatore dell'etichetta variabile non è 0 o 1%s: posizione %d: Il nome della variabile inizia con il carattere cancelletto ('#'). Le variabili di questo tipo non dovrebbero apparire nei file di sistema%s: posizione %d: il carattere `\%03o' (%c) non è valido in un nome di variabileSi è verificato un errore durante l'apertura di '%s' per la lettura come file di sistema: %sCarattere errato nella dataCarattere errato nell'orarioLunghezza stringa data %d errataFormato intero erratoFine linea erratoValori mancanti per %s erratiLunghezza stringa %d errataLunghezza stringa orario %d errataLarghezza %d errata per la variabile %sNon è possibile assegnare le etichette dei valori a %s e %s, le quali hanno tipi di variabili o larghezze differentiAtteso record datiEtichetta duplicata per il valore %g per la variabile %sEtichetta duplicata per il valore '%.*s' per la variabile %sNome variabile %s duplicatoFine del file a metà del casoAtteso record di conteggio variabileAtteso record variabileIl formato di input %s specifica un numero errato di posizioni decimali implicite %d. Il formato di input %s consente fino a 16 cifre decimali di questo tipoNumero di variabili %d non validoLarghezza variabile %d non validaFirma SPSSPORT mancanteTerminatore numerico mancanteNumero attesoIl formato di output %s specifica un numero errato di posizioni decimali implicite %d. Il formato di output %s ammette un numero di decimali impliciti compreso tra 1 e 16Il file transfer SAS ha un'intestazione libreria incorrettaIl file transfer SAS ha un'intestazione membro incorrettaFine del file inattesaVariabile %s sconosciuta mentre si analizzano le etichette valoreCodice versione %d non riconosciutoVariabile di ponderazione %s non presente nel dizionariosi è verificato un errore in lettura binariasi è verificato un errore di scrittura binariasi è verificato un errore durante l'apertura di "%s" per la lettura come file portatile: %snon si possono ancora leggere Stata.dta su questa piattaformasi possono scrivere i formati delle versioni 6-10non è possibile visualizzare una variabile stringa di larghezza %d con identificatore di formato %snon è possibile aprire il file '%s'non è possibile leggere il file %s come file portatile: già aperto per %snon è possibile leggere il file %s come file di sistema: già aperto per %snon è possibile leggere/scrivere .dta su questa piattaformala data da salvare dev'essere in un data frameerrore di lettura del dizionario file portabileerrore di lettura intestazione file di sistemail file '%s' non è nel formato Minitab Portable Worksheetil file '%s' non è in alcun formato SPSS supportatoerrore di accesso al fileil gestore del file `%s 'non è stato precedentemente dichiarato su FILE HANDLEfile con più variabili di quelle gestibili da questa funzioneil file non è nel formato SAS transfererrore di lettura fileil primo argomento dev'essere un nome fileil primo argomento dev'essere un nome file il primo record per la voce %d è corrottoil formato %s potrebbe non essere utilizzato come formato di inputgetlab: Errore di accesso al filegetlab: Formato file sconosciutogetlab: byte 0 = %o ottalegetlab: byte 1 = %o ottalegetlab: byte 9 = %o ottalegetlab: byte lab[%d]$ = %o ottalegetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o ottalegetlab: byte nv0 = %o ottalegetlab: comment = %cgetlab: inizio commento byte = %ogetlab: fine commento byte = %ogetuse: Errore durante lo scompattamento variabilegetuse: Errore di accesso al filegetuse: conta byte %o ottalegetuse: numero di osservazioni non interogetuse: terminal null blockil formato di input %s specifica una larghezza errata %d. Il formato %s richiede una larghezza compresa tra %d e %dil formato di input %s specifica una larghezza dispari %d, ma il formato %s richiede una larghezza uniforme tra %d e %dlunghezza campo non valida in una variabile numericamancata corrispondenza nel numero di variabilinessun campo nella tabella DBFi tipi di dati non-numerici non sono ancora implementatinon è un file Stata versione 5-12 .dtanon è un file dati rettangolare (%s mtype è %d)nval è 0il formato di output %s richiede la larghezza minima %d per consentire %d cifre decimali. Si utilizzi %s%d.%d invece di %sil formato di output %s specifica una larghezza errata %d. Il formato %s richiede una larghezza compresa tra %d e %dil formato di output %s specifica una larghezza dispari %d, ma il formato di output %s richiede una larghezza uniforme tra %d e %dposizione %d: Il nome della variabile inizia con un carattere non validoposizione %d: Il nome della variabile inizia con la lettera minuscola %cposizione %d: Il carattere del nome variabile %d è lettera minuscola %cposizione %d: Il nome della variabile ha %u caratteriposizione %d: il carattere `\%03o 'non è valido nel nome di una variabileproblema di accesso ai file SAS XPORTproblema di lettura del file '%s'problema di lettura del file SAS XPORT '%s'problema di lettura del file SAS transportc'è qualcosa di strano nel file (Type 0 caratteristico di lunghezza non zero)variabile stringaquesto non dovrebbe accadere: overrunquesto non dovrebbe accadere: underrunquesto non dovrebbe accadere.non è possibile aprire il file DBFnon è possibile aprire il filenon è possibile aprire il file '%s': '%s'non è possibile aprire il file in scrittura: '%s'non è possibile aprire il file: '%s'tipo dato sconosciutotrovato il valore |%d| nel campo logicoforeign/inst/po/de/0000755000175100001440000000000013245463571013716 5ustar hornikusersforeign/inst/po/de/LC_MESSAGES/0000755000175100001440000000000014011446270015470 5ustar hornikusersforeign/inst/po/de/LC_MESSAGES/R-foreign.mo0000644000175100001440000001171114011446270017656 0ustar hornikusers0C()4Bwy9{5G3OCm   /-;i:1,.Ca}8"!,,)Y1i/ >O % "     $5 !Z $|  f  8@ y { <} < X P p U   /F X3d?9,+Xx& ;4-4b/E8 +Fzr7L%(r+ '6#^& ,0!) &$%" *-#( .' +/'file' must be character'missing.type' only applicable to version >= 8 files,:Argument 'file' must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersDuplicated levels in factorField name: %s changed to: %sI cannot abbreviate the variable names to 'maxchars' or fewer charsInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType 'relational' currently not implemented.Undeclared level(s)Version must be 6-12Version must be 6-12: using 7abbreviating variable namesadded in variable:argument 'file' must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsProject-Id-Version: R 4.0.0 / foreign 0.8-77 Report-Msgid-Bugs-To: bugs@r-project.org PO-Revision-Date: 2020-04-01 14:54+0200 Last-Translator: Detlef Steuer Language-Team: r-core@r-project.org Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); 'file' muss ein Buchstabe sein.'missing.type' nur auf Dateien der Version >=8 anwendbar,:Argument 'file' muss eine Zeichenkette oder Verbindung sein.Variablennamen können nicht eindeutig abgekürzt werden aufVariablennamen können nicht eindeutig auf %d oder weniger Zeichen abgekürzt werden aufDoppelte Faktorstufen in FaktorFeldname: %s geändert zu: %sDie Variablennamen können nicht auf 'maxchar' oder weniger Zeichen abgekürzt werdenungültige Attributsangabeungültige Typangabefehlender Attributsbereichfehlender DatenbereichNA in GenauigkeitNA in SkalaS-Modus %s (bei Byte-Versatz %s) nicht unterstütztSAS-Rückgabewert war %dEinige Variablennamen wurden abgekürzt oder anders verändert.Das Objekt 'dataframe' muss die Klasse 'data.frame' habenTyp 'relational' derzeit nicht implementiertNichtdeklarierte Factorstufe(n)Version muss 6-12 seinVersion muss 6-12 sein: 7 wird benutztVariablennamen werden abgekürzthinzugefügt in Variable:Argument 'file' muss eine Zeichenkette oder Verbindung seinMatrix-/Arrayspalten können nicht gehandhabt werdenmehrspaltige Spalten können nicht gehandhabt werdenunbekannter Typ %s kann nicht gehandhabt werdenFaktorbeschriftungen von Stata-5-Dateien können nicht gelesen werdenVariablennamen können nicht eindeutig abgekürzt werdenZeichenspalte %d wird auf %d Bytes gekürztDataframe enthält Spalten der nicht unterstützen Klasse %sDataframe enthält Spalten der nicht unterstützen Klassen %sAcht-Zeichen-Begrenzung und nicht in einer Ziffer endenDatei hat null oder weniger Variablen: Vermutlich ist es keine EpiInfo-Dateiinterner Fehler - unerlaubter S-Kodewert'missingness'-Typ %s wird nicht verarbeitetKeine Datensätze in Dateikein S-Objektnur eine DateiZurückkodierung von %sBereichsname %s nicht gefundeneinige Variablennamen wurden abgekürztunbekannter Spaltentyp im DataframeWertbeschriftungen (%s) für %s fehlenfalsche Anzahl von Datensätzenforeign/inst/po/de/LC_MESSAGES/foreign.mo0000644000175100001440000005302114011446270017457 0ustar hornikusers4L $ ) - F"ge\\MC7(3`>Bl1@B["~z)ZATAR79!8[<lj>(G;6QrE>E=b|%f~ yJ3M?*KT8<=qGzE4N anV+,@0m|      !.!-!!."C"/`"""G",##@#Ed##;#9#+6$(b$&$ $5$- %7%@I%3%%%"%#&$5&,Z&&&&&& '!,'N'j''''%''(*7(b(W~(a((8) a)).)"),) *a"*X*i*8G+:+>+,+>', f,,#,",H,4-D-`-}----%-. .!2.TT.-/+//0'30)[0x0p0po1*1$ 2K02D|262#2F3Jc33F14Hx4v4855gp6T6j-7]7L7@C8;8A8|9y969 0:jQ:=:[:V;v;F;P;G.<mv<<s==>` ?Gn?E?.?Q+@`}@I@F(A{oANAS:BBB%BBBC2C#QC"uCxCD2$D6WDDD"DDE EEE!EFF5F1FGC-GqG9G'G*GYH@xH9HbH&VIS}IMILJ3lJ4J)J9J89KrKGK7K&L-L'=L(eL0LELM!M?MYMsM M"MMM N" NCN*cNNN2NNcOtzO-O*PHP9dP)P/P PyQc}Q{Q:]RGRJR)+SFUS(S!S+S)TT=TTTTT%U!*U,LU5yU'UU$ULNwgj) (f5RQ_9T,IX+CKo0Py[DHVY;"64&m$c=S~}OtkJMG /B?vE8n`p\bu iAU.|Z>!e3s2dx@F#^q *W %7l]z<a1h:-{r '$ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string missing values record found (record type 7, subtype %d), but ignored%s: Long string value labels record found (record type 7, subtype %d), but ignored%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening '%s' for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file '%s'cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile '%s' is not in Minitab Portable Worksheet formatfile '%s' is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file '%s'problem reading SAS XPORT file '%s'problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file '%s': '%s'unable to open file for writing: '%s'unable to open file: '%s'unknown data typevalue |%d| found in logical fieldProject-Id-Version: R 4.0.0 / foreign 0.8-77 Report-Msgid-Bugs-To: PO-Revision-Date: 2020-04-01 14:54+0200 Last-Translator: Detlef Steuer Language-Team: r-core@r-project.org Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); $ nicht in Variablenbeschriftungsspalte 9: %s%s Variable %s hat %s Formatkennzeichner %s%s: %s Variable %s hat %s Formatkennzeichner %s%s: Falsches Formatkennzeichner-Byte %d%s: Falsches Formatkennzeichner-Byte (%d)%s: Falsche 'magic'. Ordnungsgemäße Systemdateien beginnen mit den vier Zeichen '$FL2'. Diese Datei wird nicht gelesen%s: Falsches Größen-(%d)- oder Anzahl-(%d)-Feld auf Datensatztyp 7, Untertyp 3. Erwartete Größe %d, Anzahl 8%s: Falsches Größen-(%d)- oder Anzahl-(%d)-Feld auf Datensatztyp 7, Untertyp 4. Erwartete Größe %d, Anzahl 8%s: Portierbare Datei wird geschlossen: %s%s: Systemdatei wird geschlossen: %s%s: Gepackte Daten sind beschädigt. Daten enden teilweise durch einen Fall%s: Kompressionsverzerrung (%g) hat nicht den üblichen Wert von 100%s: Doppelter Variablenname '%s' innerhalb Systemdatei%s: Fehler beim Lesen der Datei: %s%s: Datei enthält doppelte Beschriftung für Wert %g der Variablen %s%s: Datei enthält doppelte Beschriftung für Wert '%.*s' der Variablen %s%s: Dateilayoutkode hat unerwarteten Wert %d. Der Wert sollte 2 oder 3 sein, entweder im Big-endian- oder im Little-endian-Format.%s: Durch Datei angegebener Zeichendarstellungskode (%d) ist unbekannt%s: Durch Datei angegebener Zeichendarstellungskode (%s) ist nicht ASCII%s: Durch Datei angegebene Byte-Reihenfolge (%s) entspricht nicht der vom Dateikopf vorgesehenen Byte-Reihenfolge (%s)%s: Durch Datei angegebener Wert unterscheidet sich vom internen Wert für mindestens einen von drei Systemwerten. SYSMIS: Angegeben %g, erwartet %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Gleitkommadarstellung in Systemdatei entspricht nicht IEEE-754. read.spss kann nicht zwischen Gleitkommaformaten konvertieren%s: Index der Gewichtungsvariable (%d) liegt nicht zwischen 0 und der Anzahl der Elemente pro Fall (%d)%s: Lange Zeichenkettenfortsetzungs-Datensätze am Ende des Wörterbuchs weggelassen%s: Langer Eintrag mit Zeichenkette für fehlenden Wert gefunden (record Typ 7, Subtyp %d), aber ignoriert%s: Langer Eintrag mit Zeichenkettenlabels gefunden (record Typ 7, Subtyp %d), aber ignoriert%s: Lange Zeichenkettenvariable %s hat möglicherweise keine fehlenden Werte%s: Anzahl der Fälle in Datei (%d) ist nicht zwischen -1 und %d%s: Anzahl der Dokumentzeilen (%d) muss größer als 0 sein%s: Anzahl der Elemente pro Fall (%d) ist nicht zwischen 1 und %d%s: Zahl der mit einer Wertbeschriftung (%d) assoziierten Variablen liegt nicht zwischen 1 und der Anzahl der Variablen (%d)%s: Verwaister Variablenindex-Datensatz (Typ 4). Typ-4-Datensätze müssen immer unmittelbar auf Typ-3-Datensätze folgen%s: Unvollständiger Datensatz am Ende der Systemdatei%s: Systemdatei wird gelesen: %s%s: Zeichenkettenvariable %s hat möglicherweise keine fehlenden Werte, die als ein Bereich angegeben sind%s: Systemdatei enthält mehrere Typ-6-Datensätze (Dokument)%s: Systemdatei-Header gibt %d Variablenpositionen an, aber %d wurden aus der Datei gelesen%s: Unerwartetes Ende der Datei%s: Unerkannter Datensatztyp %d%s: Unerkannter Datensatztyp 7, Untertyp %d in Systemdatei vorgefunden%s: Wertbeschriftungen sind nicht für lange Zeichenkettenvariablen (%s) erlaubt%s: Variable %s gibt Variablenbeschriftung von ungültiger Länge %d an%s: Mit einer Wertbeschriftung (%d) assoziierte Variable liegt nicht zwischen 1 und der Anzahl der Werte (%d)%s: Mit einer Wertbeschriftung (%d) assoziierter Variablenindex bezieht sich auf die Fortsetzung einer Zeichenkettenvariable, nicht auf eine aktuelle Variable%s: Variablenindex-Datensatz (Typ 4) folgt nicht unmittelbar auf Wertbeschriftungs-Datensatz (Typ 3), wie er sollte%s: Nicht alle mit Wertbeschriftungen assoziierten Variablen sind vom gleichen Typ. Variable %s hat %s-Typ, aber Variable %s hat %s-Typ%s: Sehr lange(e) Zeichenketteneinträge gefunden (record Typ 7, Subtyp %d), jeder wird in aufeinanderfolgende, einzelne Variablen importiert%s: Gewichtungsvariable ist möglicherweise keine Fortsetzung einer langen Zeichenkettenvariable%s: Gewichtungsvariable ist möglicherweise keine Zeichenkettenvariable%s: Position %d: Falscher Datensatztyp (%d). Der erwartete Wert war 2%s: Position %d: Falscher Variablentyp-Kode %d%s: Position %d: Anzeigefeld für fehlenden Wert ist nicht -3, -2, 0, 1, 2 oder 3%s: Position %d: Zeichenkettenvariable hat keine angemessene Anzahl von Fortsetzungsdatensätzen%s: Position %d: Überflüssig langer Zeichenketten-Fortsetzungsdatensatz%s: Position %d: Variablenbeschriftungs-Anzeigefeld ist nicht 0 oder 1%s: Position %d: Variablenname beginnt mit Rautenzeichen ('#'). Scratch-Variablen sollten nicht in Systemdateien erscheinen%s: Position %d: Zeichen '\%03o' (%c) ist in einem Variablenname nicht gültigBeim Öffnen von '%s' zum Lesen als eine Systemdatei ist ein Fehler aufgetreten: %sFalsches Zeichen im DatumFalsches Zeichen in ZeitFalsche Datums-Zeichenkettenlänge %dFalsches GanzzahlformatFalsches ZeilenendeFalsche fehlende Werte für %sFalsche Zeichenkettenlänge %dFalsche Zeit-Zeichenkettenlänge %dFalsche Breite %d für Variable %sWertbeschriftungen, die unterschiedliche Variablentypen oder Breiten haben, können nicht zu %s und %s zugeordnet werdenDatensatz erwartetDoppelte Beschriftung für Wert %g der Variable %sDoppelte Beschriftung für Wert '%.*s' der Variable %sDoppelter Variablenname %sEnde der Datei mitten im FallVariablenanzahl-Datensatz erwartetVariablendatensatz erwartetEingabeformat %s gibt eine falsche Zahl von %d impliziten Dezimalstellen an. Eingabeformat %s erlaubt bis zu 16 implizite Dezimalstellenungültige Zahl von Variablen %dungültige Variablenbreite %dSPSSPORT-Signatur fehltFehlendes numerisches EndezeichenNummer erwartetAusgabeformat %s gibt eine falsche Zahl von %d impliziten Dezimalstellen an. Ausgabeformat %s erlaubt zwischen 1 und 16 implizite DezimalstellenSAS-Übertragungsdatei hat falsche Bibliotheks-HeaderSAS-Übertragungsdatei hat falsche Element-HeaderUnerwartetes Ende der DateiUnbekannte Variable %s bei der Syntaxanalyse der WertbeschriftungenNicht erkannter Versionskode %dGewichtungsvariable %s ist nicht im Wörterbuch enthaltenein binärer Lesefehler ist aufgetretenein binärer Schreibfehler ist aufgetretenbeim Öffnen von '%s' zum Lesen als eine portierbare Datei ist ein Fehler aufgetreten: %sAuf dieser Plattform kann Stata-'.dta' noch nicht gelesen werdennur Formate der Versionen 6-10 können geschrieben werdeneine Zeichenkettenvariable der Breite %d mit dem Formatkennzeichner %s kann nicht angezeigt werdenDatei '%s' kann nicht geöffnet werdenDatei %s kann nicht als portierbare Datei gelesen werden: Bereits für %s geöffnetDatei %s kann nicht als Systemdatei gelesen werden: Bereits für %s geöffnetAuf dieser Plattform kann Stata-'.dta' noch nicht gelesen/geschrieben werdenDaten zum Sichern müssen in einem Daten-Frame seinFehler beim Lesen des portierbaren DateiwörterbuchsFehler beim Lesen des Systemdatei-HeadersDatei '%s' ist nicht im Minitab-Portable-Worksheet-FormatDatei '%s' ist nicht in einem unterstützten SPSS-FormatDateizugriffsfehlerDateiidentifikator '%s' wurde vorher nicht als 'FILE HANDLE' deklariertDatei hat mehr Variablen, als diese Funktion lesen kannDatei nicht im SAS-ÜbertragungsformatDateilesefehlererstes Argument muss ein Dateiname seinerstes Argument muss ein Dateiname sein Erster Datensatz für Eintrag %d ist beschädigtFormat %s kann möglicherweise nicht als Eingabeformat benutzt werdengetlab: Dateizugriffsfehlergetlab: Dateiformat unbekanntgetlab: Byte 0 = %o oktalgetlab: Byte 1 = %o oktalgetlab: Byte 9 = %o oktalgetlab: Byte lab[%d]$ = %o oktalgetlab: Byte lab[%d]0 = %o, nv=%d getlab: Byte nv$ = %o oktalgetlab: Byte nv0 = %o oktalgetlab: Kommentar = %cgetlab: Kommentaranfangs-Byte = %ogetlab: Kommentarende-Byte = %ogetuse: Misserfolg beim Variablenentpackengetuse: Dateizugriffsfehlergetuse: Byte-Zähler %o oktalgetuse: nicht ganzzahlige Anzahl der Beobachtungengetuse: Terminal-NullblockEingabeformat %s gibt eine falsche Breite %d an. Format %s benötigt eine Breite zwischen %d und %dEingabeformat %s gibt eine ungerade Breite %d an, aber das Format %s benötigt eine gerade Breite zwischen %d und %dungültige Feldlänge in numerischer Variablekeine Übereinstimmung bei Variablenanzahlkeine Felder in DBF-TabelleNicht numerische Datentypen sind noch nicht implementiertkeine '.dta'-Stata-Datei der Version 5-12keine rechteckige Daten-Datei (%s mtype ist %d)nval ist 0Ausgabeformat %s benötigt eine Mindestbreite %d, um %d Dezimalstellen zu erlauben. Versuchen Sie %s%d.%d anstelle von %sAusgabeformat %s gibt eine falsche Breite %d an. Format %s benötigt eine Breite zwischen %d und %dAusgabeformat %s gibt eine ungerade Breite %d an, aber das Ausgabeformat %s benötigt eine gerade Breite zwischen %d und %dPosition %d: Variablenname beginnt mit ungültigem ZeichenPosition %d: Variablenname beginnt mit kleingeschriebenem Buchstaben %cPosition %d: Variablennamenszeichen %d ist kleingeschriebener Buchstabe %cPosition %d: Variablenname hat %u ZeichenPosition %d: Zeichen '\%03o' ist in einem Variablennamen nicht gültigProblem beim Zugriff auf SAS-XPORT-DateiProblem beim Lesen der Datei '%s'Problem beim Lesen der SAS-XPORT-Datei '%s'Problem beim Lesen der SAS-Transportdateietwas ist eigenartig in der Datei (Typ-0-charakteristisch von Länge ungleich Null)Zeichenkettenvariabledas sollte vorkommen: Überlaufdas sollte vorkommen: Unterlaufdas sollte nicht vorkommen.DBF-Datei kann nicht geöffnet werdenDatei kann nicht geöffnet werdenDatei '%s' kann nicht geöffnet werden: '%s'Datei kann nicht zum Schreiben geöffnet werden: '%s'Datei kann nicht geöffnet werden: '%s'unbekannter DatentypWert |%d| in logischem Feld gefundenforeign/inst/po/pl/0000755000175100001440000000000013245463571013741 5ustar hornikusersforeign/inst/po/pl/LC_MESSAGES/0000755000175100001440000000000014011446270015513 5ustar hornikusersforeign/inst/po/pl/LC_MESSAGES/R-foreign.mo0000644000175100001440000001141114011446270017676 0ustar hornikusers*l;4951Gg  %; K-W:1, 6Ki8"!,!)N1xi/>D%"  $* !O $q   / = A" 4d I ) ! / J g   :  J5P>'A .b9)76-5d+'NS2)+<S,r#%  # $) %(&! '*" 'file' must be character'missing.type' only applicable to version >= 8 filesArgument 'file' must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersField name: %s changed to: %sInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType 'relational' currently not implemented.Version must be 6-12Version must be 6-12: using 7abbreviating variable namesargument 'file' must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsProject-Id-Version: foreign 0.8-60 Report-Msgid-Bugs-To: bugs@r-project.org PO-Revision-Date: Last-Translator: Łukasz Daniel Language-Team: Łukasz Daniel Language: pl_PL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit na-Revision-Date: 2012-05-29 07:55+0100 Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Poedit-SourceCharset: iso-8859-1 X-Generator: Poedit 1.5.4 argument 'file' musi być łańcuchem tekstowym'missing.type' ma zastosowanie tylko dla plików w wersji>= 8argument 'file' musi być łańcuchem tekstowym lub połączeniemNie można jednoznacznie skrócić nazw formatów doNie można jednoznacznie skrócić nazw zmiennych do %d lub mniej znakówNazwa pola: %s została zamieniona na: %sNiepoprawne określenie atrybutu.Błędne określenie typu.Brakuje sekcji z atrybutami.Brakuje sekcji z danymi.wartość NA w precyzjiwartość NA w skaliTryb S %s (obok przesunięcia bajtu %s) nie jest wspieranykod zwrotny SAS wyniósł %dNiektóre nazwy zmiennych zostały skrócone lub w inny sposób zmienione.Obiekt "dataframe" musi posiadać klasę "data.frame"Typ 'relational' na chwilę obecną nie jest zaimplementowany.Wersja musi wynosić 6-12Wersja musi wynosić 6-12: używając 7skracanie nazw zmiennychargument 'file' musi być łańcuchem tekstowym lub połączeniemnie można obsłużyć kolumn macierzy/tablicynie można obsłużyć kolumn zawierających wiele kolumnnie można obsłużyć nieznanego typu %snie można odczytać etykiet czynnika z plików Stata 5nie można skrócić nazw zmiennych w unikalny sposóbkolumna tekstowa %d zostanie przycięta do %d bajtówramka zawiera kolumny niewspieranej klasy %sramka zawiera kolumny niewspieranych klasach %sramka zawiera kolumny niewspieranych klasach %sośmiu znaków nie kończących się cyfrąplik posiada zero lub mniej zmiennych: prawdopodobnie nie jest to plik EpiInfobłąd wewnętrzny - niedozwolona wartość kodu Styp braku danych %s nie jest obsługiwanybrak rekordów w plikuto nie jest obiekt Stylko jeden plikponowne kodowanie z %snie znaleziono nazwy sekcji %sniektóre nazwy zmiennych zostały skróconenieznany typ kolumny w ramce danychbrakuje etykiet wartości (%s) dla %snieprawidłowa liczba rekordówforeign/inst/po/pl/LC_MESSAGES/foreign.mo0000644000175100001440000005214414011446270017507 0ustar hornikusers $ ) - "7eZ\\zC730d>Bl@nB[NzZtA79I8<ljf(G;^QE'>m=b|Mf~1J3?/*oKT<;=xqG(Ep 6KeV,0Lg|<[u.N -}  .  /!>![!Gy!,!#!E"X";n"9"+"(#&9# `#5#-##@#38$l$$"$#$$$,%5%O%k%%% %!%%&4&I&i&%&&&*&'W,'a'(' (0(.G("v(,( (a(X2)i)8):.*>i*,*>* +5+#R+"v+H+++,+,C,[,o,%,,,!,--.1/4C/,x/.//{[0{0$S1#x1S1@1?12%q2A2F2 3D3K3@445^86G6D6>$78c7A7k7nJ828"8Q9@a9f9 : (:GI:K:J:h(;;l<<W=5_=D=0=] >Ri>;>L>E?E?L@_@x@*@%@@'@/'A*WA*AjAB12B5dBB4B'BC1CC#CD,DKD]D>E<EEE;EE/E#%F)IFMsFJF' GU4GGVGIHIKH3H4H8H87I5pIIGI;J)CJmJ(J)J(J6J 5KVKtKKK$K!KL5LUL)lL#L5L L$M'6M^MjzMwM0]N!NN8N'O2(O[OzpOgOSP?P=Q:VQ(Q<Q&Q#R-BR1pRMRR,S,.S[SySS%S*S T%T*9TIKtdg' &c2ON\6Q*FU)@HlMvXAESV8 o1$j"`:3P{zLqhGJD -?<sB|5k]mY_}r f>R,yW;b0p/au~=C![n (T#4iZw9^.e7+x %$ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening '%s' for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file '%s'cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile '%s' is not in Minitab Portable Worksheet formatfile '%s' is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file '%s'problem reading SAS XPORT file '%s'problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file '%s': '%s'unable to open file for writing: '%s'unable to open file: '%s'unknown data typevalue |%d| found in logical fieldProject-Id-Version: foreign 0.8-60 Report-Msgid-Bugs-To: PO-Revision-Date: 2014-03-24 17:30+0100 Last-Translator: Łukasz Daniel Language-Team: Łukasz Daniel Language: pl_PL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Poedit-SourceCharset: iso-8859-1 X-Generator: Poedit 1.5.4 $ nie jest w kolumnie 9 etykiety zmiennej: %s%s: Zmienna %s %s posiada określający format %s%s: Zmienna %s %s posiada określający format %s %s%s: Niepoprawny bajt określający format %d%s: Niepoprawny bajt określający format (%d)%s: Niepoprawna liczba magiczna. Poprawne pliki systemowe rozpoczynają się czterema znakami'$FL2'. Ten plik nie będzie odczytywany%s: Niepoprawne pole rozmiaru (%d) lub zliczenia (%d) na rekordzie tpyu 7, podtyp 3. Oczekiwano rozmiaru %d oraz 8 zliczeń%s: Niepoprawne pole rozmiaru (%d) lub zliczenia (%d) na rekordzie tpyu 7, podtyp 4. Oczekiwano rozmiaru %d oraz 8 zliczeń%s: Zamykanie przenośnego pliku: %s%s: Zamykanie pliku systemowego: %s%s: Skompresowane dane są uszkodzone. Dane kończą się częściowo na przypadku%s: Obciążenie kompresji (%g) nie jest typową wartością 100%s: Powtórzona nazwa '%s' zmiennej wewnątrz pliku systemowego%s: Błąd podczas czytania pliku: %s%s: Plik zawiera powtorzone etykiety dla wartości %g zmiennej %s%s: Plik zawiera powtórzone etykiety dla wartości '%.*s' zmiennej %s%s: Kod układu pliku ma nieoczekiwaną wartość %d. Wartość powinna wynosić 2 lub 3, w formacie grubokońcowości lub cienkokońcowości%s: Wskazany przez plik kod reprezentacji znaków (%d) jest nieznany%s: Wskazany przez plik kod reprezentacji znaków (%s) nie jest kodem ASCII%s: Wskazana przez plik kolejność bajtów (%s) nie zgadza się z kolejnością bajtów wywnioskowanych z nagłówka pliku (%s)%s: Wskazana przez plik wartość jest różna od wartości wewnętrznej dla przynajmniej jeden z trzech wartości systemowych. SYSMIS: wskazał %g, oczekiwano %g; NAJWYŻSZA: %g, %g; NAJNIŻSZA: %g, %g%s: Reprezentacja zmiennoprzecinkowa w pliku systemowym nie jest w standardzie IEEE-754. read.spss nie może wykonywać konwersji pomiędzy formatami zmiennoprzecinkowymi%s: Indeks zmiennej ważącej (%d) nie jest pomiędzy 0 a liczbą elementów na przypadek (%d)%s: Długotekstowe rekordy kontynuacyjne pominięte na końcu słownika%s: Długotekstowa zmienna %s nie może mieć wartości brakujących%s: Liczba przypadków w pliku (%d) nie jest pomiędzy -1 a %d%s: Liczba linii (%d) dokumentu musi byc większa niż 0%s: Liczba elementów na przypadek (%d) nie jest pomiędzy 1 a %d%s: Liczba zmiennych powiązanych z wartością etykiety (%d) nie jest pomiędzy 1 a liczbą zmiennych (%d)%s: Osierocony rekord (typ 4) indeksu zmiennej. Rekordy typu 4 muszą zawsze następować po rekordzach typu 3%s: Częściowy rekord na końcu pliku systemowego%s: Czytanie pliku systemowego: %s%s: Tekstowa zmienna %s nie może wartości brakujących określonych jako zakres%s: Plik systemowy zawiera wielokrotne rekordy typu 6 (dokument)%s: Nagłówek pliku systemowego wskazuje na %d pozycje zmiennych, ale %d zostało odczytanych z pliku%s: Nieoczekiwany koniec pliku%s: Nierozpoznany typ %d rekordu%s: Nierozpoznany typ 7 rekordu, podtyp %d napotkany w pliku systemowym%s: Etykiety wartości nie sa dozwolone dla długotekstowych zmiennych (%s)%s: Zmienna %s wskazuje na etykietę zmiennej o niepoprawnej długości %d%s: Indeks zmiennej powiązany z wartością etykiety (%d) nie jest pomiędzy 1 a liczbą wartości (%d)%s: Indeks zmiennej powiązany z wartością etykiety (%d) odnosi się do kontynuacji zmiennej tekstowej, nie do aktualnej zmiennej%s: Indeks rekordu (typ 4) zmiennej nie następuje od razu po indeksie rekordu (typ 3) zmiennej jak powinien%s: Zmienne powiązane z etykietami wartości nie mają identycznego typu. Zmienna %s posiada typ %s, ale zmienna %s posiada typ %s%s: Zmienna ważona nie może być kontynuacją zmiennej o długim łańcuchu tekstowym%s: Zmienna ważona nie może być zmienną tekstową%s: pozycja %d: Niepoprawny typ (%d) rekordu; oczekiwano wartości 2%s: pozycja %d: Niepoprawny kod %d typu zmiennej%s: pozycja %d: Pole wskazujące brakujące wartości nie ma wartości -3, -2, 0, 1, 2, lub 3%s: pozycja %d: Zmienna tekstowa nie ma poprawnej liczby kontynuujących rekordów%s: pozycja %d: Zbędny długotekstowy rekord kontynuacyjny%s: pozycja %d: Pole wskazujące etykietę zmiennej nie ma wartości 0 lub 1%s: pozycja %d: Nazwa zmiennej rozpoczyna się znakiem hash ('#'). Usunięte zmienne nie powinny pojawiać się w plikach systemowych%s: pozycja %d: znak '\%03o' (%c) nie jest poprawny w nazwie zmiennejWystąpił błąd podczas otwierania '%s' do odczytu jako plik systemowy: %sNiepoprawny znak w dacieNiepoprawny znak w czasieNiepoprawna długość %d łańcucha daty Niepoprawny format liczby całkowitejBłędne zakończenie liniiNiepoprawne wartości brakujące dla %sNiepoprawna długość %d łańcucha tekstowegoNiepoprawna długość %d łańcucha czasuNiepoprawna szerokość %d dla zmiennej %sNie można przypisać etykiet wartości do %s oraz %s, które mają różne type lub szerokości zmiennychOczekowano rekordu danychPowtórzone etykiety dla wartości %g zmiennej %sPowtórzona etykieta dla wartości '%.*s' zmiennej %sPowtórzona nazwa %s zmiennejNieoczekiwany koniec pliku podczas odczytu przypadkuOczekiwano zmiennej zliczającej rekordOczekiwano zmiennej rekorduFormat wejściowy %s określa błędną liczbę założonych miejsc dziesiętnych %d. Format wejściowy %s pozwala na założenie do 16 miejsc dziesiętnychNiepoprawna liczba zmiennych %dNiepoprawna szerokość %d zmiennejBrakuje podpisu SPSSPORTBrakuje terminatora liczbowegoOczekiwano liczbyFormat wyjściowy %s określa błędną liczbę założonych miejsc dziesiętnych %d. Format wyjściowy %s pozwala na założenie miejsc dziesiętnych pomiędzy 1 a 16plik transferowy SAS posiada niepoprawny nagłówek bibliotekiplik transferowy SAS posiada niepoprawny nagłówek członkaNieoczekiwany koniec plikuNieznana zmienna %s podczas przetwarzania etykiet wartościNierozpoznany kod wersji %dZmienna ważąca %s nie jest obecna w słownikuwystąpił błąd odczytu binarnegonastąpił błąd zapisu danych binarnychnastąpił błąd podczas otwierania '%s' do odczytu jako plik przenośny: %snie można na chwilę obecną odczytać pliku .dta Stata na tej platformiemożna zapisywać formaty w wersji 6-10nie można wyświetlić zmiennej tekstowej o szerokości %d ze znacznikiem formatu %snie można otworzyć pliku '%s'nie można odczytać pliku %s jako pliku przenośnego: plik został już otwarty do %snie można odczytać pliku %s jako pliku systemowego: już otwarty dla %snie można na chwilę obecną zapisać pliku .dta Stata na tej platformiezapisywane dane muszą być w formacie ramki danychbłąd podczas czytania słownika pliku przenośnegobłąd podczas odczytywania nagłówka pliku systemowegoplik '%s' nie jest w formacie Minitab Portable Worksheetplik '%s' nie jest w żadnym wspieranym formacie SPSSbłąd dostępu do plikuobsługa pliku '%s' nie została poprzednio zadeklarowana w FILE HANDLEplik ma więcej zmiennych niż ta funkcja może przeczytaćplik nie jest w formacie transferowym SASbłąd odczytu plikupierwszy argument musi być nazwą plikupierwszy argument musi być nazwą pliku pierwszy rekord wpisu %d jest uszkodzonyformat %s nie może być użyty jako format wejściowygetlab: Błąd dostępu do plikugetlab: Nieznany format plikugetlab: bajt 0 = %o ósemkowogetlab: bajt 1 = %o ósemkowogetlab: bajt 9 = %o ósemkowogetlab: bajt lab[%d]$ = %o ósemkowogetlab: bajt lab[%d]0 = %o, nv=%dgetlab: bajt nv$ = %o ósemkowogetlab: bajt nv0 = %o ósemkowogetlab: komentarz = %cgetlab: bajt rozpoczęcia komentarza = %ogetlab: bajt końca komentarza = %ogetuse: Niepowodzenie podczas rozpakowywania zmiennejgetuse: Błąd dostępu do plikugetuse: licznik bajtów %o ósemkowogetuse: niecałkowita liczba obserwacjigetuse: końcowy pusty blokformat wejściowy %s określa niepoprawną szerokość %d. Format %s wymaga szerokości pomiędzy %d a %dformat wejściowy %s określa nieparzystą szerokość %d, ale format %s wymaga parzystej szerokości pomiędzy %d a %dniepoprawna długość pola w zmiennej liczbowejniezgodność w liczbie zmiennychbrak pól w tabeli DBFnieliczbowe typy danych nie są jeszcze zaimplementowaneto nie jest plik .dta Stata wersja 5-12nieprostokątny plik z danymi (mtype %s wynosi %d)'nval' jest równe 0format wyjściowy %s wymaga minimalnej szerokości %d aby dopuścić %d miejsc dziesiętnych. Spróbuj %s%d.%d zamiast %sformat wyjściowy %s określa błędną szerokość %d. Format %s wymaga szerokości pomiędzy %d a %dformat wyjściowy %s określa nieparzystą szerokość %d, ale format wyjściowy %s wymaga parzystej szerokości pomiędzy %d and %dpozycja %d: Nazwa zmiennej rozpoczyna się niepoprawnym znakiempozycja %d: Nazwa zmiennej rozpoczyna się małą literą %cpozycja %d: Znak %d nazwy zmiennej jest małą literą %cpozycja %d: Nazwa zmiennej ma %u znakówpozycja %d: znak '\%03o' nie jest poprawny w nazwie zmiennejproblem z dostępem do pliku SAS XPORTproblem podczas czytania pliku '%s'problem podczas czytania pliku SAS XPORT '%s'problem podczas czytania pliku transportowego SAScoś dziwnego w pliku (Charakterystyka typu 0 posiada niezerową długość)zmienna tekstowato nie powinno się zdarzyć: przeskakiwanieto nie powinno się zdarzyć: przepuszczanieto nie powinno się zdarzyć.nie można otworzyć pliku DBFnie można otworzyć plikunie można otworzyć pliku '%s': '%s'nie można otworzyć pliku do zapisu: '%s'nie można otworzyć pliku: '%s'nieznany typ danychznaleziono wartość |%d| w polu logicznymforeign/inst/po/en@quot/0000755000175100001440000000000013245463571014741 5ustar hornikusersforeign/inst/po/en@quot/LC_MESSAGES/0000755000175100001440000000000014011446270016513 5ustar hornikusersforeign/inst/po/en@quot/LC_MESSAGES/R-foreign.mo0000644000175100001440000001116714011446270020706 0ustar hornikusers0C()4Bwy9{5G3OCm   /-;i:1,.Ca}8"!,,)Y1i/ >O % "     $5 !Z $|    8 % ' =) 5g G   G g     - :61q07<J"!,)1Ais/> %L"r $!$:_ ,0!) &$%" *-#( .' +/'file' must be character'missing.type' only applicable to version >= 8 files,:Argument 'file' must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersDuplicated levels in factorField name: %s changed to: %sI cannot abbreviate the variable names to 'maxchars' or fewer charsInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType 'relational' currently not implemented.Undeclared level(s)Version must be 6-12Version must be 6-12: using 7abbreviating variable namesadded in variable:argument 'file' must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsProject-Id-Version: foreign 0.8-81 PO-Revision-Date: 2021-02-12 09:19 Last-Translator: Automatically generated Language-Team: none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: en Plural-Forms: nplurals=2; plural=(n != 1); ‘file’ must be character‘missing.type’ only applicable to version >= 8 files,:Argument ‘file’ must be a character string or connection.Cannot uniquely abbreviate format names to conform toCannot uniquely abbreviate the variable names to %d or fewer charactersDuplicated levels in factorField name: %s changed to: %sI cannot abbreviate the variable names to ‘maxchars’ or fewer charsInvalid attribute specification.Invalid type specification.Missing attribute section.Missing data section.NA in precisionNA in scaleS mode %s (near byte offset %s) not supportedSAS return code was %dSome variable names were abbreviated or otherwise altered.The object "dataframe" must have class data.frameType ‘relational’ currently not implemented.Undeclared level(s)Version must be 6-12Version must be 6-12: using 7abbreviating variable namesadded in variable:argument ‘file’ must be a character string or connectioncannot handle matrix/array columnscannot handle multicolumn columnscannot handle unknown type %scannot read factor labels from Stata 5 filescannot uniquely abbreviate variable namescharacter column %d will be truncated to %d bytesdata frame contains columns of unsupported class %sdata frame contains columns of unsupported classes %seight-character limit and not ending in a digitfile has zero or fewer variables: probably not an EpiInfo fileinternal error - illegal S code valuemissingness type %s is not handledno records in filenot an S objectonly one filere-encoding from %ssectionname %s not foundsome variable names were abbreviatedunknown column type in data framevalue labels (%s) for %s are missingwrong number of recordsforeign/inst/po/en@quot/LC_MESSAGES/foreign.mo0000644000175100001440000005007514011446270020510 0ustar hornikusers4L $ ) - F"ge\\MC7(3`>Bl1@B["~z)ZATAR79!8[<lj>(G;6QrE>E=b|%f~ yJ3M?*KT8<=qGzE4N anV+,@0m|      !.!-!!."C"/`"""G",##@#Ed##;#9#+6$(b$&$ $5$- %7%@I%3%%%"%#&$5&,Z&&&&&& '!,'N'j''''%''(*7(b(W~(a((8) a)).)"),) *a"*X*i*8G+:+>+,+>', f,,#,",H,4-D-`-}----%-. .!2.1T.$/)/-/ 0"$0eG0\0\ 1g11C17132Q2>l2B2l2@[3B3[3;4z4Za5A5T5RS6769687<Q7l7j7(f88G8;8Q/999E9>:=A:b:|:f_;~;yE<J<3 =?>=*~=K=T=<J>=>u>G;?I????@ &@3@M@b@|@V@@,A02AcA~AAA|ASBrBBBBB.eC-CC.CD/%DUDrDGD,D#EE)EoE;E9E+E(+F&TF {F9F1FG@G3[GGG"G#G$H,+HXHrHHHH H!HI;IWIlII%III*J3JWOJaJ( K 2KSK.jK"K,K KaKXULiL8M:QM>M,M>M 7N XN'yN"NHN OO9OVOnOO&O)OO P!PLNwgj) (f5RQ_9T,IX+CKo0Py[DHVY;"64&m$c=S~}OtkJMG /B?vE8n`p\bu iAU.|Z>!e3s2dx@F#^q *W %7l]z<a1h:-{r '$ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string missing values record found (record type 7, subtype %d), but ignored%s: Long string value labels record found (record type 7, subtype %d), but ignored%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening '%s' for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file '%s'cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile '%s' is not in Minitab Portable Worksheet formatfile '%s' is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file '%s'problem reading SAS XPORT file '%s'problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file '%s': '%s'unable to open file for writing: '%s'unable to open file: '%s'unknown data typevalue |%d| found in logical fieldProject-Id-Version: foreign 0.8-81 Report-Msgid-Bugs-To: PO-Revision-Date: 2021-02-12 09:19+0000 Last-Translator: Automatically generated Language-Team: none Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); $ not in variable label column 9: %s%s variable %s has %s format specifier %s%s: %s variable %s has %s format specifier %s%s: Bad format specifier byte %d%s: Bad format specifier byte (%d)%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8%s: Closing portable file: %s%s: Closing system file: %s%s: Compressed data is corrupted. Data ends partway through a case%s: Compression bias (%g) is not the usual value of 100%s: Duplicate variable name `%s' within system file%s: Error reading file: %s%s: File contains duplicate label for value %g for variable %s%s: File contains duplicate label for value `%.*s' for variable %s%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format%s: File-indicated character representation code (%d) is unknown%s: File-indicated character representation code (%s) is not ASCII%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)%s: Long string continuation records omitted at end of dictionary%s: Long string missing values record found (record type 7, subtype %d), but ignored%s: Long string value labels record found (record type 7, subtype %d), but ignored%s: Long string variable %s may not have missing values%s: Number of cases in file (%d) is not between -1 and %d%s: Number of document lines (%d) must be greater than 0%s: Number of elements per case (%d) is not between 1 and %d%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records%s: Partial record at end of system file%s: Reading system file: %s%s: String variable %s may not have missing values specified as a range%s: System file contains multiple type 6 (document) records%s: System file header indicates %d variable positions but %d were read from file%s: Unexpected end of file%s: Unrecognized record type %d%s: Unrecognized record type 7, subtype %d encountered in system file%s: Value labels are not allowed on long string variables (%s)%s: Variable %s indicates variable label of invalid length %d%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought%s: Variables associated with value label are not all of identical type. Variable %s has %s type, but variable %s has %s type%s: Very long string record(s) found (record type 7, subtype %d), each will be imported in consecutive separate variables%s: Weighting variable may not be a continuation of a long string variable%s: Weighting variable may not be a string variable%s: position %d: Bad record type (%d); the expected value was 2%s: position %d: Bad variable type code %d%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3%s: position %d: String variable does not have proper number of continuation records%s: position %d: Superfluous long string continuation record%s: position %d: Variable label indicator field is not 0 or 1%s: position %d: Variable name begins with octothorpe (‘#’). Scratch variables should not appear in system files%s: position %d: character `\%03o' (%c) is not valid in a variable nameAn error occurred while opening ‘%s’ for reading as a system file: %sBad character in dateBad character in timeBad date string length %dBad integer formatBad line endBad missing values for %sBad string length %dBad time string length %dBad width %d for variable %sCannot assign value labels to %s and %s, which have different variable types or widthsData record expectedDuplicate label for value %g for variable %sDuplicate label for value `%.*s' for variable %sDuplicate variable name %sEnd of file midway through caseExpected variable count recordExpected variable recordInput format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal placesInvalid number of variables %dInvalid variable width %dMissing SPSSPORT signatureMissing numeric terminatorNumber expectedOutput format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16SAS transfer file has incorrect library headerSAS transfer file has incorrect member headerUnexpected end of fileUnknown variable %s while parsing value labelsUnrecognized version code %dWeighting variable %s not present in dictionarya binary read error occurreda binary write error occurredan error occurred while opening "%s" for reading as a portable file: %scan not yet read Stata .dta on this platformcan only write version 6-10 formatscannot display a string variable of width %d with format specifier %scannot open file ‘%s’cannot read file %s as portable file: already opened for %scannot read file %s as system file: already opened for %scannot yet read write .dta on this platformdata to be saved must be in a data frameerror reading portable-file dictionaryerror reading system-file headerfile ‘%s’ is not in Minitab Portable Worksheet formatfile ‘%s’ is not in any supported SPSS formatfile access errorfile handle `%s' has not been previously declared on FILE HANDLEfile has more variables than this function can readfile not in SAS transfer formatfile read errorfirst argument must be a file namefirst argument must be a file name first record for entry %d is corruptformat %s may not be used as an input formatgetlab: File access errorgetlab: File format unknowngetlab: byte 0 = %o octalgetlab: byte 1 = %o octalgetlab: byte 9 = %o octalgetlab: byte lab[%d]$ = %o octalgetlab: byte lab[%d]0 = %o, nv=%dgetlab: byte nv$ = %o octalgetlab: byte nv0 = %o octalgetlab: comment = %cgetlab: comment begin byte = %ogetlab: comment end byte = %ogetuse: Failure in variable unpackinggetuse: File access errorgetuse: byte counter %o octalgetuse: non-integer number of observationsgetuse: terminal null blockinput format %s specifies a bad width %d. Format %s requires a width between %d and %dinput format %s specifies an odd width %d, but format %s requires an even width between %d and %dinvalid field length in numeric variablemismatch in numbers of variablesno fields in DBF tablenon-numeric data types are not yet implementednot a Stata version 5-12 .dta filenot a rectangular data file (%s mtype is %d)nval is 0output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %soutput format %s specifies a bad width %d. Format %s requires a width between %d and %doutput format %s specifies an odd width %d, but output format %s requires an even width between %d and %dposition %d: Variable name begins with invalid characterposition %d: Variable name begins with lowercase letter %cposition %d: Variable name character %d is lowercase letter %cposition %d: Variable name has %u charactersposition %d: character `\%03o' is not valid in a variable nameproblem accessing SAS XPORT fileproblem in reading file ‘%s’problem reading SAS XPORT file ‘%s’problem reading SAS transport filesomething strange in the file (Type 0 characteristic of nonzero length)string variablethis should happen: overrunthis should happen: underrunthis should not happen.unable to open DBF fileunable to open fileunable to open file ‘%s’: ‘%s’unable to open file for writing: ‘%s’unable to open file: ‘%s’unknown data typevalue |%d| found in logical fieldforeign/po/0000755000175100001440000000000014011446267012344 5ustar hornikusersforeign/po/foreign.pot0000644000175100001440000004173114011446267014527 0ustar hornikusers# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the foreign package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: foreign 0.8-81\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-12 09:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: R_systat.c:131 #, c-format msgid "not a rectangular data file (%s mtype is %d)" msgstr "" #: R_systat.c:137 msgid "mismatch in numbers of variables" msgstr "" #: R_systat.c:173 R_systat.c:684 R_systat.c:689 R_systat.c:695 R_systat.c:698 #: R_systat.c:717 R_systat.c:737 msgid "file access error" msgstr "" #: R_systat.c:236 #, c-format msgid "cannot open file '%s'" msgstr "" #: R_systat.c:256 msgid "getuse: Failure in variable unpacking" msgstr "" #: R_systat.c:258 R_systat.c:270 R_systat.c:273 R_systat.c:323 R_systat.c:329 #: R_systat.c:338 msgid "getuse: File access error" msgstr "" #: R_systat.c:319 #, c-format msgid "getuse: byte counter %o octal" msgstr "" #: R_systat.c:340 msgid "getuse: terminal null block" msgstr "" #: R_systat.c:352 msgid "getuse: non-integer number of observations" msgstr "" #: R_systat.c:413 msgid "getlab: File format unknown" msgstr "" #: R_systat.c:417 R_systat.c:431 R_systat.c:433 R_systat.c:435 R_systat.c:482 #: R_systat.c:484 R_systat.c:486 R_systat.c:509 msgid "getlab: File access error" msgstr "" #: R_systat.c:421 #, c-format msgid "getlab: byte 0 = %o octal" msgstr "" #: R_systat.c:425 #, c-format msgid "getlab: byte 1 = %o octal" msgstr "" #: R_systat.c:437 #, c-format msgid "getlab: byte 9 = %o octal" msgstr "" #: R_systat.c:448 #, c-format msgid "getlab: comment begin byte = %o" msgstr "" #: R_systat.c:454 #, c-format msgid "getlab: comment = %c" msgstr "" #: R_systat.c:459 #, c-format msgid "getlab: comment end byte = %o" msgstr "" #: R_systat.c:477 #, c-format msgid "getlab: byte nv0 = %o octal" msgstr "" #: R_systat.c:488 #, c-format msgid "getlab: byte nv$ = %o octal" msgstr "" #: R_systat.c:496 msgid "file has more variables than this function can read" msgstr "" #: R_systat.c:503 #, c-format msgid "getlab: byte lab[%d]0 = %o, nv=%d" msgstr "" #: R_systat.c:516 #, c-format msgid "$ not in variable label column 9: %s" msgstr "" #: R_systat.c:536 #, c-format msgid "getlab: byte lab[%d]$ = %o octal" msgstr "" #: R_systat.c:714 msgid "string variable" msgstr "" #: Rdbfread.c:56 msgid "unable to open DBF file" msgstr "" #: Rdbfread.c:64 msgid "no fields in DBF table" msgstr "" #: Rdbfread.c:193 #, c-format msgid "value |%d| found in logical field" msgstr "" #: Rdbfwrite.c:50 SASxport.c:510 SASxport.c:607 msgid "first argument must be a file name" msgstr "" #: Rdbfwrite.c:53 msgid "unable to open file" msgstr "" #: Rdbfwrite.c:97 Rdbfwrite.c:135 stataread.c:304 stataread.c:325 #: stataread.c:816 stataread.c:846 msgid "unknown data type" msgstr "" #: SASxport.c:90 msgid "invalid field length in numeric variable" msgstr "" #: SASxport.c:152 SASxport.c:188 SASxport.c:233 SASxport.c:259 SASxport.c:303 #: SASxport.c:311 msgid "file not in SAS transfer format" msgstr "" #: SASxport.c:225 SASxport.c:293 msgid "SAS transfer file has incorrect library header" msgstr "" #: SASxport.c:251 msgid "SAS transfer file has incorrect member header" msgstr "" #: SASxport.c:364 SASxport.c:405 SASxport.c:411 msgid "problem accessing SAS XPORT file" msgstr "" #: SASxport.c:513 SASxport.c:610 spss.c:670 stataread.c:592 #, c-format msgid "unable to open file: '%s'" msgstr "" #: SASxport.c:612 #, c-format msgid "problem reading SAS XPORT file '%s'" msgstr "" #: SASxport.c:641 msgid "problem reading SAS transport file" msgstr "" #: file-handle.c:115 #, c-format msgid "file handle `%s' has not been previously declared on FILE HANDLE" msgstr "" #: format.c:108 #, c-format msgid "format %s may not be used as an input format" msgstr "" #: format.c:113 #, c-format msgid "" "input format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" #: format.c:119 #, c-format msgid "" "input format %s specifies an odd width %d, but format %s requires an even " "width between %d and %d" msgstr "" #: format.c:125 #, c-format msgid "" "Input format %s specifies a bad number of implied decimal places %d. Input " "format %s allows up to 16 implied decimal places" msgstr "" #: format.c:144 #, c-format msgid "" "output format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" #: format.c:153 #, c-format msgid "" "output format %s requires minimum width %d to allow %d decimal places. Try " "%s%d.%d instead of %s" msgstr "" #: format.c:160 #, c-format msgid "" "output format %s specifies an odd width %d, but output format %s requires an " "even width between %d and %d" msgstr "" #: format.c:166 #, c-format msgid "" "Output format %s specifies a bad number of implied decimal places %d. " "Output format %s allows a number of implied decimal places between 1 and 16" msgstr "" #: format.c:181 #, c-format msgid "cannot display a string variable of width %d with format specifier %s" msgstr "" #: minitab.c:92 minitab.c:158 msgid "non-numeric data types are not yet implemented" msgstr "" #: minitab.c:119 #, c-format msgid "unable to open file '%s': '%s'" msgstr "" #: minitab.c:123 #, c-format msgid "file '%s' is not in Minitab Portable Worksheet format" msgstr "" #: minitab.c:126 minitab.c:147 minitab.c:155 minitab.c:162 msgid "file read error" msgstr "" #: minitab.c:139 #, c-format msgid "first record for entry %d is corrupt" msgstr "" #: pfm-read.c:117 #, c-format msgid "%s: Closing portable file: %s" msgstr "" #: pfm-read.c:138 msgid "Unexpected end of file" msgstr "" #: pfm-read.c:146 msgid "Bad line end" msgstr "" #: pfm-read.c:227 #, c-format msgid "cannot read file %s as portable file: already opened for %s" msgstr "" #: pfm-read.c:243 #, c-format msgid "" "an error occurred while opening \"%s\" for reading as a portable file: %s" msgstr "" #: pfm-read.c:275 msgid "Data record expected" msgstr "" #: pfm-read.c:295 msgid "error reading portable-file dictionary" msgstr "" #: pfm-read.c:358 msgid "Number expected" msgstr "" #: pfm-read.c:386 msgid "Missing numeric terminator" msgstr "" #: pfm-read.c:423 msgid "Bad integer format" msgstr "" #: pfm-read.c:453 #, c-format msgid "Bad string length %d" msgstr "" #: pfm-read.c:523 msgid "Missing SPSSPORT signature" msgstr "" #: pfm-read.c:541 #, c-format msgid "Unrecognized version code %d" msgstr "" #: pfm-read.c:552 #, c-format msgid "Bad date string length %d" msgstr "" #: pfm-read.c:559 msgid "Bad character in date" msgstr "" #: pfm-read.c:579 #, c-format msgid "Bad time string length %d" msgstr "" #: pfm-read.c:586 msgid "Bad character in time" msgstr "" #: pfm-read.c:640 #, c-format msgid "%s: Bad format specifier byte %d" msgstr "" #: pfm-read.c:649 sfm-read.c:1157 sfm-read.c:1167 #, c-format msgid "%s: Bad format specifier byte (%d)" msgstr "" #: pfm-read.c:651 #, c-format msgid "%s variable %s has %s format specifier %s" msgstr "" #: pfm-read.c:690 msgid "Expected variable count record" msgstr "" #: pfm-read.c:694 #, c-format msgid "Invalid number of variables %d" msgstr "" #: pfm-read.c:730 msgid "Expected variable record" msgstr "" #: pfm-read.c:736 #, c-format msgid "Invalid variable width %d" msgstr "" #: pfm-read.c:754 #, c-format msgid "position %d: Variable name has %u characters" msgstr "" #: pfm-read.c:758 #, c-format msgid "position %d: Variable name begins with invalid character" msgstr "" #: pfm-read.c:762 #, c-format msgid "position %d: Variable name begins with lowercase letter %c" msgstr "" #: pfm-read.c:774 #, c-format msgid "position %d: Variable name character %d is lowercase letter %c" msgstr "" #: pfm-read.c:783 #, c-format msgid "position %d: character `\\%03o' is not valid in a variable name" msgstr "" #: pfm-read.c:789 #, c-format msgid "Bad width %d for variable %s" msgstr "" #: pfm-read.c:795 #, c-format msgid "Duplicate variable name %s" msgstr "" #: pfm-read.c:839 #, c-format msgid "Bad missing values for %s" msgstr "" #: pfm-read.c:862 #, c-format msgid "Weighting variable %s not present in dictionary" msgstr "" #: pfm-read.c:932 #, c-format msgid "Unknown variable %s while parsing value labels" msgstr "" #: pfm-read.c:935 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types " "or widths" msgstr "" #: pfm-read.c:981 #, c-format msgid "Duplicate label for value %g for variable %s" msgstr "" #: pfm-read.c:984 #, c-format msgid "Duplicate label for value `%.*s' for variable %s" msgstr "" #: pfm-read.c:1072 msgid "End of file midway through case" msgstr "" #: sfm-read.c:168 #, c-format msgid "%s: Closing system file: %s" msgstr "" #: sfm-read.c:299 #, c-format msgid "cannot read file %s as system file: already opened for %s" msgstr "" #: sfm-read.c:314 #, c-format msgid "An error occurred while opening '%s' for reading as a system file: %s" msgstr "" #: sfm-read.c:345 #, c-format msgid "" "%s: Weighting variable may not be a continuation of a long string variable" msgstr "" #: sfm-read.c:347 #, c-format msgid "%s: Weighting variable may not be a string variable" msgstr "" #: sfm-read.c:372 #, c-format msgid "" "%s: Orphaned variable index record (type 4). Type 4 records must always " "immediately follow type 3 records" msgstr "" #: sfm-read.c:452 #, c-format msgid "" "%s: Very long string record(s) found (record type 7, subtype %d), each will " "be imported in consecutive separate variables" msgstr "" #: sfm-read.c:477 #, c-format msgid "" "%s: Long string value labels record found (record type 7, subtype %d), but " "ignored" msgstr "" #: sfm-read.c:482 #, c-format msgid "" "%s: Long string missing values record found (record type 7, subtype %d), but " "ignored" msgstr "" #: sfm-read.c:491 #, c-format msgid "%s: Unrecognized record type 7, subtype %d encountered in system file" msgstr "" #: sfm-read.c:514 #, c-format msgid "%s: Unrecognized record type %d" msgstr "" #: sfm-read.c:538 msgid "error reading system-file header" msgstr "" #: sfm-read.c:554 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected " "size %d, count 8" msgstr "" #: sfm-read.c:567 #, c-format msgid "" "%s: Floating-point representation in system file is not IEEE-754. read.spss " "cannot convert between floating-point formats" msgstr "" #: sfm-read.c:586 #, c-format msgid "" "%s: File-indicated endianness (%s) does not match endianness intuited from " "file header (%s)" msgstr "" #: sfm-read.c:598 #, c-format msgid "%s: File-indicated character representation code (%s) is not ASCII" msgstr "" #: sfm-read.c:603 #, c-format msgid "%s: File-indicated character representation code (%d) is unknown" msgstr "" #: sfm-read.c:621 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected " "size %d, count 8" msgstr "" #: sfm-read.c:635 #, c-format msgid "" "%s: File-indicated value is different from internal value for at least one " "of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, " "%g; LOWEST: %g, %g" msgstr "" #: sfm-read.c:745 #, c-format msgid "" "%s: Bad magic. Proper system files begin with the four characters `$FL2'. " "This file will not be read" msgstr "" #: sfm-read.c:787 #, c-format msgid "" "%s: File layout code has unexpected value %d. Value should be 2 or 3, in " "big-endian or little-endian format" msgstr "" #: sfm-read.c:802 #, c-format msgid "%s: Number of elements per case (%d) is not between 1 and %d" msgstr "" #: sfm-read.c:809 #, c-format msgid "" "%s: Index of weighting variable (%d) is not between 0 and number of elements " "per case (%d)" msgstr "" #: sfm-read.c:814 #, c-format msgid "%s: Number of cases in file (%d) is not between -1 and %d" msgstr "" #: sfm-read.c:819 #, c-format msgid "%s: Compression bias (%g) is not the usual value of 100" msgstr "" #: sfm-read.c:921 #, c-format msgid "%s: position %d: Bad record type (%d); the expected value was 2" msgstr "" #: sfm-read.c:930 #, c-format msgid "" "%s: position %d: String variable does not have proper number of continuation " "records" msgstr "" #: sfm-read.c:938 #, c-format msgid "%s: position %d: Superfluous long string continuation record" msgstr "" #: sfm-read.c:943 #, c-format msgid "%s: position %d: Bad variable type code %d" msgstr "" #: sfm-read.c:946 #, c-format msgid "%s: position %d: Variable label indicator field is not 0 or 1" msgstr "" #: sfm-read.c:950 #, c-format msgid "" "%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3" msgstr "" #: sfm-read.c:972 #, c-format msgid "" "%s: position %d: Variable name begins with octothorpe ('#'). Scratch " "variables should not appear in system files" msgstr "" #: sfm-read.c:994 #, c-format msgid "" "%s: position %d: character `\\%03o' (%c) is not valid in a variable name" msgstr "" #: sfm-read.c:1036 #, c-format msgid "%s: Variable %s indicates variable label of invalid length %d" msgstr "" #: sfm-read.c:1052 #, c-format msgid "%s: Long string variable %s may not have missing values" msgstr "" #: sfm-read.c:1075 #, c-format msgid "%s: String variable %s may not have missing values specified as a range" msgstr "" #: sfm-read.c:1118 #, c-format msgid "%s: Long string continuation records omitted at end of dictionary" msgstr "" #: sfm-read.c:1121 #, c-format msgid "" "%s: System file header indicates %d variable positions but %d were read from " "file" msgstr "" #: sfm-read.c:1130 #, c-format msgid "%s: Duplicate variable name `%s' within system file" msgstr "" #: sfm-read.c:1170 #, c-format msgid "%s: %s variable %s has %s format specifier %s" msgstr "" #: sfm-read.c:1249 #, c-format msgid "" "%s: Variable index record (type 4) does not immediately follow value label " "record (type 3) as it ought" msgstr "" #: sfm-read.c:1258 #, c-format msgid "" "%s: Number of variables associated with a value label (%d) is not between 1 " "and the number of variables (%d)" msgstr "" #: sfm-read.c:1275 #, c-format msgid "" "%s: Variable index associated with value label (%d) is not between 1 and the " "number of values (%d)" msgstr "" #: sfm-read.c:1281 #, c-format msgid "" "%s: Variable index associated with value label (%d) refers to a continuation " "of a string variable, not to an actual variable" msgstr "" #: sfm-read.c:1284 #, c-format msgid "%s: Value labels are not allowed on long string variables (%s)" msgstr "" #: sfm-read.c:1293 #, c-format msgid "" "%s: Variables associated with value label are not all of identical type. " "Variable %s has %s type, but variable %s has %s type" msgstr "" #: sfm-read.c:1335 #, c-format msgid "%s: File contains duplicate label for value %g for variable %s" msgstr "" #: sfm-read.c:1338 #, c-format msgid "%s: File contains duplicate label for value `%.*s' for variable %s" msgstr "" #: sfm-read.c:1378 sfm-read.c:1656 #, c-format msgid "%s: Reading system file: %s" msgstr "" #: sfm-read.c:1380 sfm-read.c:1564 sfm-read.c:1605 #, c-format msgid "%s: Unexpected end of file" msgstr "" #: sfm-read.c:1397 #, c-format msgid "%s: System file contains multiple type 6 (document) records" msgstr "" #: sfm-read.c:1407 #, c-format msgid "%s: Number of document lines (%d) must be greater than 0" msgstr "" #: sfm-read.c:1518 #, c-format msgid "%s: Error reading file: %s" msgstr "" #: sfm-read.c:1556 #, c-format msgid "%s: Compressed data is corrupted. Data ends partway through a case" msgstr "" #: sfm-read.c:1658 #, c-format msgid "%s: Partial record at end of system file" msgstr "" #: spss.c:382 spss.c:504 msgid "nval is 0" msgstr "" #: spss.c:673 #, c-format msgid "problem in reading file '%s'" msgstr "" #: spss.c:683 #, c-format msgid "file '%s' is not in any supported SPSS format" msgstr "" #: stataread.c:95 stataread.c:105 stataread.c:113 stataread.c:140 #: stataread.c:153 stataread.c:163 stataread.c:520 msgid "a binary read error occurred" msgstr "" #: stataread.c:241 msgid "not a Stata version 5-12 .dta file" msgstr "" #: stataread.c:439 msgid "" "something strange in the file\n" " (Type 0 characteristic of nonzero length)" msgstr "" #: stataread.c:584 msgid "can not yet read Stata .dta on this platform" msgstr "" #: stataread.c:588 stataread.c:1044 msgid "first argument must be a file name\n" msgstr "" #: stataread.c:606 stataread.c:613 stataread.c:619 stataread.c:634 #: stataread.c:636 stataread.c:644 stataread.c:652 msgid "a binary write error occurred" msgstr "" #: stataread.c:722 msgid "this should happen: overrun" msgstr "" #: stataread.c:724 msgid "this should happen: underrun" msgstr "" #: stataread.c:983 msgid "this should not happen." msgstr "" #: stataread.c:1040 msgid "cannot yet read write .dta on this platform" msgstr "" #: stataread.c:1048 msgid "data to be saved must be in a data frame" msgstr "" #: stataread.c:1051 #, c-format msgid "unable to open file for writing: '%s'" msgstr "" #: stataread.c:1056 msgid "can only write version 6-10 formats" msgstr "" foreign/po/pl.po0000644000175100001440000014147714011446267013335 0ustar hornikusersmsgid "" msgstr "" "Project-Id-Version: foreign 0.8-60\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-12 09:19+0000\n" "PO-Revision-Date: 2014-03-24 17:30+0100\n" "Last-Translator: Łukasz Daniel \n" "Language-Team: Łukasz Daniel \n" "Language: pl_PL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "X-Poedit-SourceCharset: iso-8859-1\n" "X-Generator: Poedit 1.5.4\n" # foreign/src/R_systat.c: 132 # sprintf(msg, _("not a rectangular data file (%s mtype is %d)"), # CHAR(STRING_ELT(file, 0)), getmtype(use)) #: R_systat.c:131 #, c-format msgid "not a rectangular data file (%s mtype is %d)" msgstr "nieprostokątny plik z danymi (mtype %s wynosi %d)" # foreign/src/R_systat.c: 138 # error(_("mismatch in numbers of variables")) #: R_systat.c:137 msgid "mismatch in numbers of variables" msgstr "niezgodność w liczbie zmiennych" # foreign/src/R_systat.c: 174 # error(_("file access error")) # foreign/src/R_systat.c: 685 # error(_("file access error")) # foreign/src/R_systat.c: 690 # error(_("file access error")) # foreign/src/R_systat.c: 696 # error(_("file access error")) # foreign/src/R_systat.c: 699 # error(_("file access error")) # foreign/src/R_systat.c: 718 # error(_("file access error")) # foreign/src/R_systat.c: 738 # error(_("file access error")) #: R_systat.c:173 R_systat.c:684 R_systat.c:689 R_systat.c:695 R_systat.c:698 #: R_systat.c:717 R_systat.c:737 msgid "file access error" msgstr "błąd dostępu do pliku" # foreign/src/R_systat.c: 237 # error(_("cannot open file '%s'"), fname) #: R_systat.c:236 #, c-format msgid "cannot open file '%s'" msgstr "nie można otworzyć pliku '%s'" # foreign/src/R_systat.c: 257 # error(_("getuse: Failure in variable unpacking")) #: R_systat.c:256 msgid "getuse: Failure in variable unpacking" msgstr "getuse: Niepowodzenie podczas rozpakowywania zmiennej" # foreign/src/R_systat.c: 259 # error(_("getuse: File access error")) # foreign/src/R_systat.c: 271 # error(_("getuse: File access error")) # foreign/src/R_systat.c: 274 # error(_("getuse: File access error")) # foreign/src/R_systat.c: 324 # error(_("getuse: File access error")) # foreign/src/R_systat.c: 330 # error(_("getuse: File access error")) # foreign/src/R_systat.c: 339 # error(_("getuse: File access error")) #: R_systat.c:258 R_systat.c:270 R_systat.c:273 R_systat.c:323 R_systat.c:329 #: R_systat.c:338 msgid "getuse: File access error" msgstr "getuse: Błąd dostępu do pliku" # foreign/src/R_systat.c: 320 # sprintf(tmp, _("getuse: byte counter %o octal"), k) #: R_systat.c:319 #, c-format msgid "getuse: byte counter %o octal" msgstr "getuse: licznik bajtów %o ósemkowo" # foreign/src/R_systat.c: 341 # error(_("getuse: terminal null block")) #: R_systat.c:340 msgid "getuse: terminal null block" msgstr "getuse: końcowy pusty blok" # foreign/src/R_systat.c: 353 # error(_("getuse: non-integer number of observations")) #: R_systat.c:352 msgid "getuse: non-integer number of observations" msgstr "getuse: niecałkowita liczba obserwacji" # foreign/src/R_systat.c: 414 # _("getlab: File format unknown") #: R_systat.c:413 msgid "getlab: File format unknown" msgstr "getlab: Nieznany format pliku" # foreign/src/R_systat.c: 418 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 432 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 434 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 436 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 483 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 485 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 487 # error(_("getlab: File access error")) # foreign/src/R_systat.c: 510 # error(_("getlab: File access error")) #: R_systat.c:417 R_systat.c:431 R_systat.c:433 R_systat.c:435 R_systat.c:482 #: R_systat.c:484 R_systat.c:486 R_systat.c:509 msgid "getlab: File access error" msgstr "getlab: Błąd dostępu do pliku" # foreign/src/R_systat.c: 422 # sprintf(tmp1, _("getlab: byte 0 = %o octal"), o) #: R_systat.c:421 #, c-format msgid "getlab: byte 0 = %o octal" msgstr "getlab: bajt 0 = %o ósemkowo" # foreign/src/R_systat.c: 426 # sprintf(tmp1, _("getlab: byte 1 = %o octal"), o) #: R_systat.c:425 #, c-format msgid "getlab: byte 1 = %o octal" msgstr "getlab: bajt 1 = %o ósemkowo" # foreign/src/R_systat.c: 438 # sprintf(tmp1, _("getlab: byte 9 = %o octal"), o) #: R_systat.c:437 #, c-format msgid "getlab: byte 9 = %o octal" msgstr "getlab: bajt 9 = %o ósemkowo" # foreign/src/R_systat.c: 449 # sprintf(tmp1, _("getlab: comment begin byte = %o"), o) #: R_systat.c:448 #, c-format msgid "getlab: comment begin byte = %o" msgstr "getlab: bajt rozpoczęcia komentarza = %o" # foreign/src/R_systat.c: 455 # sprintf(tmp1, _("getlab: comment = %c"), o) #: R_systat.c:454 #, c-format msgid "getlab: comment = %c" msgstr "getlab: komentarz = %c" # foreign/src/R_systat.c: 460 # sprintf(tmp1, _("getlab: comment end byte = %o"), o) #: R_systat.c:459 #, c-format msgid "getlab: comment end byte = %o" msgstr "getlab: bajt końca komentarza = %o" # foreign/src/R_systat.c: 478 # sprintf(tmp1, _("getlab: byte nv0 = %o octal"), o) #: R_systat.c:477 #, c-format msgid "getlab: byte nv0 = %o octal" msgstr "getlab: bajt nv0 = %o ósemkowo" # foreign/src/R_systat.c: 489 # sprintf(tmp1, _("getlab: byte nv$ = %o octal"), o) #: R_systat.c:488 #, c-format msgid "getlab: byte nv$ = %o octal" msgstr "getlab: bajt nv$ = %o ósemkowo" # foreign/src/R_systat.c: 497 # error(_("file has more variables than this function can read")) #: R_systat.c:496 msgid "file has more variables than this function can read" msgstr "plik ma więcej zmiennych niż ta funkcja może przeczytać" # foreign/src/R_systat.c: 504 # sprintf(tmp1, _("getlab: byte lab[%d]0 = %o, nv=%d"), # j, o, u->h.nv) #: R_systat.c:503 #, c-format msgid "getlab: byte lab[%d]0 = %o, nv=%d" msgstr "getlab: bajt lab[%d]0 = %o, nv=%d" # foreign/src/R_systat.c: 517 # sprintf(mes, _("$ not in variable label column 9: %s"), label) #: R_systat.c:516 #, c-format msgid "$ not in variable label column 9: %s" msgstr "$ nie jest w kolumnie 9 etykiety zmiennej: %s" # foreign/src/R_systat.c: 537 # sprintf(tmp1, _("getlab: byte lab[%d]$ = %o octal"), j, o) #: R_systat.c:536 #, c-format msgid "getlab: byte lab[%d]$ = %o octal" msgstr "getlab: bajt lab[%d]$ = %o ósemkowo" # foreign/src/R_systat.c: 715 # error(_("string variable")) #: R_systat.c:714 msgid "string variable" msgstr "zmienna tekstowa" # foreign/src/Rdbfread.c: 56 # error(_("unable to open DBF file")) #: Rdbfread.c:56 msgid "unable to open DBF file" msgstr "nie można otworzyć pliku DBF" # foreign/src/Rdbfread.c: 64 # error(_("no fields in DBF table")) #: Rdbfread.c:64 msgid "no fields in DBF table" msgstr "brak pól w tabeli DBF" # foreign/src/Rdbfread.c: 193 # warning(_("value |%d| found in logical field"), *p) #: Rdbfread.c:193 #, c-format msgid "value |%d| found in logical field" msgstr "znaleziono wartość |%d| w polu logicznym" # foreign/src/stataread.c: 579 # error(_("first argument must be a file name\n")) # foreign/src/stataread.c: 1026 # error(_("first argument must be a file name\n")) # foreign/src/Rdbfwrite.c: 48 # error(_("first argument must be a file name")) # foreign/src/SASxport.c: 507 # error(_("first argument must be a file name")) # foreign/src/SASxport.c: 604 # error(_("first argument must be a file name")) #: Rdbfwrite.c:50 SASxport.c:510 SASxport.c:607 msgid "first argument must be a file name" msgstr "pierwszy argument musi być nazwą pliku" # foreign/src/Rdbfwrite.c: 51 # error(_("unable to open file")) #: Rdbfwrite.c:53 msgid "unable to open file" msgstr "nie można otworzyć pliku" # foreign/src/stataread.c: 292 # error(_("unknown data type")) # foreign/src/stataread.c: 313 # error(_("unknown data type")) # foreign/src/stataread.c: 802 # error(_("unknown data type")) # foreign/src/stataread.c: 832 # error(_("unknown data type")) # foreign/src/Rdbfwrite.c: 95 # error(_("unknown data type")) # foreign/src/Rdbfwrite.c: 133 # error(_("unknown data type")) #: Rdbfwrite.c:97 Rdbfwrite.c:135 stataread.c:304 stataread.c:325 #: stataread.c:816 stataread.c:846 msgid "unknown data type" msgstr "nieznany typ danych" # foreign/src/SASxport.c: 87 # error(_("invalid field length in numeric variable")) #: SASxport.c:90 msgid "invalid field length in numeric variable" msgstr "niepoprawna długość pola w zmiennej liczbowej" # foreign/src/SASxport.c: 149 # error(_("file not in SAS transfer format")) # foreign/src/SASxport.c: 185 # error(_("file not in SAS transfer format")) # foreign/src/SASxport.c: 230 # error(_("file not in SAS transfer format")) # foreign/src/SASxport.c: 256 # error(_("file not in SAS transfer format")) # foreign/src/SASxport.c: 300 # error(_("file not in SAS transfer format")) # foreign/src/SASxport.c: 308 # error(_("file not in SAS transfer format")) #: SASxport.c:152 SASxport.c:188 SASxport.c:233 SASxport.c:259 SASxport.c:303 #: SASxport.c:311 msgid "file not in SAS transfer format" msgstr "plik nie jest w formacie transferowym SAS" # foreign/src/SASxport.c: 222 # error(_("SAS transfer file has incorrect library header")) # foreign/src/SASxport.c: 290 # error(_("SAS transfer file has incorrect library header")) #: SASxport.c:225 SASxport.c:293 msgid "SAS transfer file has incorrect library header" msgstr "plik transferowy SAS posiada niepoprawny nagłówek biblioteki" # foreign/src/SASxport.c: 248 # error(_("SAS transfer file has incorrect member header")) #: SASxport.c:251 msgid "SAS transfer file has incorrect member header" msgstr "plik transferowy SAS posiada niepoprawny nagłówek członka" # foreign/src/SASxport.c: 361 # error(_("problem accessing SAS XPORT file")) # foreign/src/SASxport.c: 402 # error(_("problem accessing SAS XPORT file")) # foreign/src/SASxport.c: 408 # error(_("problem accessing SAS XPORT file")) #: SASxport.c:364 SASxport.c:405 SASxport.c:411 msgid "problem accessing SAS XPORT file" msgstr "problem z dostępem do pliku SAS XPORT" # foreign/src/stataread.c: 583 # error(_("unable to open file: '%s'"), strerror(errno)) # foreign/src/spss.c: 669 # error(_("unable to open file: '%s'"), strerror(errno)) # foreign/src/SASxport.c: 510 # error(_("unable to open file: '%s'"), strerror(errno)) # foreign/src/SASxport.c: 607 # error(_("unable to open file: '%s'"), strerror(errno)) #: SASxport.c:513 SASxport.c:610 spss.c:670 stataread.c:592 #, c-format msgid "unable to open file: '%s'" msgstr "nie można otworzyć pliku: '%s'" # foreign/src/SASxport.c: 609 # error(_("problem reading SAS XPORT file '%s'"), # CHAR(STRING_ELT(xportFile, 0))) #: SASxport.c:612 #, c-format msgid "problem reading SAS XPORT file '%s'" msgstr "problem podczas czytania pliku SAS XPORT '%s'" # foreign/src/SASxport.c: 638 # error(_("problem reading SAS transport file")) #: SASxport.c:641 msgid "problem reading SAS transport file" msgstr "problem podczas czytania pliku transportowego SAS" # foreign/src/file-handle.c: 115 # error(_("file handle `%s' has not been previously declared on FILE HANDLE"), name) #: file-handle.c:115 #, c-format msgid "file handle `%s' has not been previously declared on FILE HANDLE" msgstr "obsługa pliku '%s' nie została poprzednio zadeklarowana w FILE HANDLE" # foreign/src/format.c: 109 # error(_("format %s may not be used as an input format"), f->name) #: format.c:108 #, c-format msgid "format %s may not be used as an input format" msgstr "format %s nie może być użyty jako format wejściowy" # foreign/src/format.c: 114 # error(_("input format %s specifies a bad width %d. Format %s requires a width between %d and %d"), # str, spec->w, f->name, f->Imin_w, f->Imax_w) #: format.c:113 #, c-format msgid "" "input format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "format wejściowy %s określa niepoprawną szerokość %d. Format %s wymaga " "szerokości pomiędzy %d a %d" # foreign/src/format.c: 120 # error(_("input format %s specifies an odd width %d, but format %s requires an even width between %d and %d"), # str, spec->w, f->name, f->Imin_w, f->Imax_w) #: format.c:119 #, c-format msgid "" "input format %s specifies an odd width %d, but format %s requires an even " "width between %d and %d" msgstr "" "format wejściowy %s określa nieparzystą szerokość %d, ale format %s wymaga " "parzystej szerokości pomiędzy %d a %d" # foreign/src/format.c: 126 # error(_("Input format %s specifies a bad number of implied decimal places %d. Input format %s allows up to 16 implied decimal places"), # str, spec->d, f->name) #: format.c:125 #, c-format msgid "" "Input format %s specifies a bad number of implied decimal places %d. Input " "format %s allows up to 16 implied decimal places" msgstr "" "Format wejściowy %s określa błędną liczbę założonych miejsc dziesiętnych " "%d. Format wejściowy %s pozwala na założenie do 16 miejsc dziesiętnych" # foreign/src/format.c: 145 # error(_("output format %s specifies a bad width %d. Format %s requires a width between %d and %d"), # str, spec->w, f->name, f->Omin_w, f->Omax_w) #: format.c:144 #, c-format msgid "" "output format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "format wyjściowy %s określa błędną szerokość %d. Format %s wymaga " "szerokości pomiędzy %d a %d" # foreign/src/format.c: 154 # error(_("output format %s requires minimum width %d to allow %d decimal places. Try %s%d.%d instead of %s"), # f->name, f->Omin_w + 1 + spec->d, spec->d, f->name, # f->Omin_w + 1 + spec->d, spec->d, str) #: format.c:153 #, c-format msgid "" "output format %s requires minimum width %d to allow %d decimal places. Try " "%s%d.%d instead of %s" msgstr "" "format wyjściowy %s wymaga minimalnej szerokości %d aby dopuścić %d miejsc " "dziesiętnych. Spróbuj %s%d.%d zamiast %s" # foreign/src/format.c: 161 # error(_("output format %s specifies an odd width %d, but output format %s requires an even width between %d and %d"), # str, spec->w, f->name, f->Omin_w, f->Omax_w) #: format.c:160 #, c-format msgid "" "output format %s specifies an odd width %d, but output format %s requires an " "even width between %d and %d" msgstr "" "format wyjściowy %s określa nieparzystą szerokość %d, ale format wyjściowy " "%s wymaga parzystej szerokości pomiędzy %d and %d" # foreign/src/format.c: 167 # error(_("Output format %s specifies a bad number of implied decimal places %d. Output format %s allows a number of implied decimal places between 1 and 16"), # str, spec->d, f->name) #: format.c:166 #, c-format msgid "" "Output format %s specifies a bad number of implied decimal places %d. " "Output format %s allows a number of implied decimal places between 1 and 16" msgstr "" "Format wyjściowy %s określa błędną liczbę założonych miejsc dziesiętnych " "%d. Format wyjściowy %s pozwala na założenie miejsc dziesiętnych pomiędzy 1 " "a 16" # foreign/src/format.c: 182 # error(_("cannot display a string variable of width %d with format specifier %s"), # min_len, fmt_to_string (f)) #: format.c:181 #, c-format msgid "cannot display a string variable of width %d with format specifier %s" msgstr "" "nie można wyświetlić zmiennej tekstowej o szerokości %d ze znacznikiem " "formatu %s" # foreign/src/minitab.c: 91 # error(_("non-numeric data types are not yet implemented")) # foreign/src/minitab.c: 157 # error(_("non-numeric data types are not yet implemented")) #: minitab.c:92 minitab.c:158 msgid "non-numeric data types are not yet implemented" msgstr "nieliczbowe typy danych nie są jeszcze zaimplementowane" # foreign/src/minitab.c: 118 # error(_("unable to open file '%s': '%s'"), # CHAR(fname), strerror(errno)) #: minitab.c:119 #, c-format msgid "unable to open file '%s': '%s'" msgstr "nie można otworzyć pliku '%s': '%s'" # foreign/src/minitab.c: 122 # error(_("file '%s' is not in Minitab Portable Worksheet format"), # CHAR(fname)) #: minitab.c:123 #, c-format msgid "file '%s' is not in Minitab Portable Worksheet format" msgstr "plik '%s' nie jest w formacie Minitab Portable Worksheet" # foreign/src/minitab.c: 125 # error(_("file read error")) # foreign/src/minitab.c: 146 # error(_("file read error")) # foreign/src/minitab.c: 154 # error(_("file read error")) # foreign/src/minitab.c: 161 # error(_("file read error")) #: minitab.c:126 minitab.c:147 minitab.c:155 minitab.c:162 msgid "file read error" msgstr "błąd odczytu pliku" # foreign/src/minitab.c: 138 # error(_("first record for entry %d is corrupt"), i+1) #: minitab.c:139 #, c-format msgid "first record for entry %d is corrupt" msgstr "pierwszy rekord wpisu %d jest uszkodzony" # foreign/src/pfm-read.c: 117 # error(_("%s: Closing portable file: %s"), h->fn, strerror (errno)) #: pfm-read.c:117 #, c-format msgid "%s: Closing portable file: %s" msgstr "%s: Zamykanie przenośnego pliku: %s" # foreign/src/pfm-read.c: 138 # (_("Unexpected end of file")) #: pfm-read.c:138 msgid "Unexpected end of file" msgstr "Nieoczekiwany koniec pliku" # foreign/src/pfm-read.c: 146 # (_("Bad line end")) #: pfm-read.c:146 msgid "Bad line end" msgstr "Błędne zakończenie linii" # foreign/src/pfm-read.c: 227 # error(_("cannot read file %s as portable file: already opened for %s"), # fh_handle_name (h), h->class->name) #: pfm-read.c:227 #, c-format msgid "cannot read file %s as portable file: already opened for %s" msgstr "" "nie można odczytać pliku %s jako pliku przenośnego: plik został już otwarty " "do %s" # foreign/src/pfm-read.c: 243 # error(_("an error occurred while opening \"%s\" for reading as a portable file: %s"), # h->fn, strerror (errno)) #: pfm-read.c:243 #, c-format msgid "" "an error occurred while opening \"%s\" for reading as a portable file: %s" msgstr "" "nastąpił błąd podczas otwierania '%s' do odczytu jako plik przenośny: %s" # foreign/src/pfm-read.c: 275 # (_("Data record expected")) #: pfm-read.c:275 msgid "Data record expected" msgstr "Oczekowano rekordu danych" # foreign/src/pfm-read.c: 295 # error(_("error reading portable-file dictionary")) #: pfm-read.c:295 msgid "error reading portable-file dictionary" msgstr "błąd podczas czytania słownika pliku przenośnego" # foreign/src/pfm-read.c: 358 # (_("Number expected")) #: pfm-read.c:358 msgid "Number expected" msgstr "Oczekiwano liczby" # foreign/src/pfm-read.c: 386 # (_("Missing numeric terminator")) #: pfm-read.c:386 msgid "Missing numeric terminator" msgstr "Brakuje terminatora liczbowego" # foreign/src/pfm-read.c: 423 # (_("Bad integer format")) #: pfm-read.c:423 msgid "Bad integer format" msgstr "Niepoprawny format liczby całkowitej" # foreign/src/pfm-read.c: 453 # (_("Bad string length %d"), n) #: pfm-read.c:453 #, c-format msgid "Bad string length %d" msgstr "Niepoprawna długość %d łańcucha tekstowego" # foreign/src/pfm-read.c: 523 # (_("Missing SPSSPORT signature")) #: pfm-read.c:523 msgid "Missing SPSSPORT signature" msgstr "Brakuje podpisu SPSSPORT" # foreign/src/pfm-read.c: 541 # (_("Unrecognized version code %d"), ext->cc) #: pfm-read.c:541 #, c-format msgid "Unrecognized version code %d" msgstr "Nierozpoznany kod wersji %d" # foreign/src/pfm-read.c: 552 # (_("Bad date string length %d"), strlen (date)) #: pfm-read.c:552 #, c-format msgid "Bad date string length %d" msgstr "Niepoprawna długość %d łańcucha daty " # foreign/src/pfm-read.c: 559 # (_("Bad character in date")) #: pfm-read.c:559 msgid "Bad character in date" msgstr "Niepoprawny znak w dacie" # foreign/src/pfm-read.c: 579 # (_("Bad time string length %d"), strlen (time)) #: pfm-read.c:579 #, c-format msgid "Bad time string length %d" msgstr "Niepoprawna długość %d łańcucha czasu" # foreign/src/pfm-read.c: 586 # (_("Bad character in time")) #: pfm-read.c:586 msgid "Bad character in time" msgstr "Niepoprawny znak w czasie" # foreign/src/pfm-read.c: 636 # (_("%s: Bad format specifier byte %d"), vv->name, fmt[0]) #: pfm-read.c:640 #, c-format msgid "%s: Bad format specifier byte %d" msgstr "%s: Niepoprawny bajt określający format %d" # foreign/src/pfm-read.c: 645 # (_("%s: Bad format specifier byte (%d)"), vv->name, fmt[0]) # foreign/src/sfm-read.c: 1093 # (_("%s: Bad format specifier byte (%d)"), # h->fn, (s >> 16) & 0xff) # foreign/src/sfm-read.c: 1103 # (_("%s: Bad format specifier byte (%d)"), # h->fn, (s >> 16) & 0xff) #: pfm-read.c:649 sfm-read.c:1157 sfm-read.c:1167 #, c-format msgid "%s: Bad format specifier byte (%d)" msgstr "%s: Niepoprawny bajt określający format (%d)" # foreign/src/sfm-read.c: 1108 # (_("%s: String variable %s has string format specifier %s"), # h->fn, vv->name, formats[v->type].name) #: pfm-read.c:651 #, c-format msgid "%s variable %s has %s format specifier %s" msgstr "%s: Zmienna %s %s posiada określający format %s" # foreign/src/pfm-read.c: 699 # (_("Expected variable count record")) #: pfm-read.c:690 msgid "Expected variable count record" msgstr "Oczekiwano zmiennej zliczającej rekord" # foreign/src/pfm-read.c: 703 # (_("Invalid number of variables %d"), ext->nvars) #: pfm-read.c:694 #, c-format msgid "Invalid number of variables %d" msgstr "Niepoprawna liczba zmiennych %d" # foreign/src/pfm-read.c: 739 # (_("Expected variable record")) #: pfm-read.c:730 msgid "Expected variable record" msgstr "Oczekiwano zmiennej rekordu" # foreign/src/pfm-read.c: 745 # (_("Invalid variable width %d"), width) #: pfm-read.c:736 #, c-format msgid "Invalid variable width %d" msgstr "Niepoprawna szerokość %d zmiennej" # foreign/src/pfm-read.c: 763 # (_("position %d: Variable name has %u characters"), # i, strlen ((char *) name)) #: pfm-read.c:754 #, c-format msgid "position %d: Variable name has %u characters" msgstr "pozycja %d: Nazwa zmiennej ma %u znaków" # foreign/src/pfm-read.c: 767 # (_("position %d: Variable name begins with invalid character"), # i) #: pfm-read.c:758 #, c-format msgid "position %d: Variable name begins with invalid character" msgstr "pozycja %d: Nazwa zmiennej rozpoczyna się niepoprawnym znakiem" # foreign/src/pfm-read.c: 771 # warning(_("position %d: Variable name begins with lowercase letter %c"), # i, name[0] - 100 + 'a') #: pfm-read.c:762 #, c-format msgid "position %d: Variable name begins with lowercase letter %c" msgstr "pozycja %d: Nazwa zmiennej rozpoczyna się małą literą %c" # foreign/src/pfm-read.c: 783 # warning(_("position %d: Variable name character %d is lowercase letter %c"), # i, j + 1, c - 100 + 'a') #: pfm-read.c:774 #, c-format msgid "position %d: Variable name character %d is lowercase letter %c" msgstr "pozycja %d: Znak %d nazwy zmiennej jest małą literą %c" # foreign/src/pfm-read.c: 792 # (_("position %d: character `\\%03o' is not valid in a variable name"), # i, c) #: pfm-read.c:783 #, c-format msgid "position %d: character `\\%03o' is not valid in a variable name" msgstr "pozycja %d: znak '\\%03o' nie jest poprawny w nazwie zmiennej" # foreign/src/pfm-read.c: 798 # (_("Bad width %d for variable %s"), width, name) #: pfm-read.c:789 #, c-format msgid "Bad width %d for variable %s" msgstr "Niepoprawna szerokość %d dla zmiennej %s" # foreign/src/pfm-read.c: 804 # (_("Duplicate variable name %s"), name) #: pfm-read.c:795 #, c-format msgid "Duplicate variable name %s" msgstr "Powtórzona nazwa %s zmiennej" # foreign/src/pfm-read.c: 848 # (_("Bad missing values for %s"), v->name) #: pfm-read.c:839 #, c-format msgid "Bad missing values for %s" msgstr "Niepoprawne wartości brakujące dla %s" # foreign/src/pfm-read.c: 871 # (_("Weighting variable %s not present in dictionary"), # ext->dict->weight_var) #: pfm-read.c:862 #, c-format msgid "Weighting variable %s not present in dictionary" msgstr "Zmienna ważąca %s nie jest obecna w słowniku" # foreign/src/pfm-read.c: 939 # (_("Unknown variable %s while parsing value labels"), name) #: pfm-read.c:932 #, c-format msgid "Unknown variable %s while parsing value labels" msgstr "Nieznana zmienna %s podczas przetwarzania etykiet wartości" # foreign/src/pfm-read.c: 942 # (_("Cannot assign value labels to %s and %s, which have different variable types or widths"), # v[0]->name, v[i]->name) #: pfm-read.c:935 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types " "or widths" msgstr "" "Nie można przypisać etykiet wartości do %s oraz %s, które mają różne type " "lub szerokości zmiennych" # foreign/src/pfm-read.c: 988 # (_("Duplicate label for value %g for variable %s"), # vl->v.f, var->name) #: pfm-read.c:981 #, c-format msgid "Duplicate label for value %g for variable %s" msgstr "Powtórzone etykiety dla wartości %g zmiennej %s" # foreign/src/pfm-read.c: 991 # (_("Duplicate label for value '%.*s' for variable %s"), # var->width, vl->v.s, var->name) #: pfm-read.c:984 #, c-format msgid "Duplicate label for value `%.*s' for variable %s" msgstr "Powtórzona etykieta dla wartości '%.*s' zmiennej %s" # foreign/src/pfm-read.c: 1079 # (_("End of file midway through case")) #: pfm-read.c:1072 msgid "End of file midway through case" msgstr "Nieoczekiwany koniec pliku podczas odczytu przypadku" # foreign/src/sfm-read.c: 165 # error(_("%s: Closing system file: %s"), h->fn, strerror (errno)) #: sfm-read.c:168 #, c-format msgid "%s: Closing system file: %s" msgstr "%s: Zamykanie pliku systemowego: %s" # foreign/src/sfm-read.c: 296 # error(_("cannot read file %s as system file: already opened for %s"), # fh_handle_name (h), h->class->name) #: sfm-read.c:299 #, c-format msgid "cannot read file %s as system file: already opened for %s" msgstr "nie można odczytać pliku %s jako pliku systemowego: już otwarty dla %s" # foreign/src/sfm-read.c: 311 # error(_("An error occurred while opening '%s' for reading as a system file: %s"), # h->fn, strerror (errno)) #: sfm-read.c:314 #, c-format msgid "An error occurred while opening '%s' for reading as a system file: %s" msgstr "" "Wystąpił błąd podczas otwierania '%s' do odczytu jako plik systemowy: %s" # foreign/src/sfm-read.c: 342 # (_("%s: Weighting variable may not be a continuation of a long string variable"), h->fn) #: sfm-read.c:345 #, c-format msgid "" "%s: Weighting variable may not be a continuation of a long string variable" msgstr "" "%s: Zmienna ważona nie może być kontynuacją zmiennej o długim łańcuchu " "tekstowym" # foreign/src/sfm-read.c: 344 # (_("%s: Weighting variable may not be a string variable"), # h->fn) #: sfm-read.c:347 #, c-format msgid "%s: Weighting variable may not be a string variable" msgstr "%s: Zmienna ważona nie może być zmienną tekstową" # foreign/src/sfm-read.c: 369 # (_("%s: Orphaned variable index record (type 4). Type 4 records must always immediately follow type 3 records"), # h->fn) #: sfm-read.c:372 #, c-format msgid "" "%s: Orphaned variable index record (type 4). Type 4 records must always " "immediately follow type 3 records" msgstr "" "%s: Osierocony rekord (typ 4) indeksu zmiennej. Rekordy typu 4 muszą zawsze " "następować po rekordzach typu 3" #: sfm-read.c:452 #, c-format msgid "" "%s: Very long string record(s) found (record type 7, subtype %d), each will " "be imported in consecutive separate variables" msgstr "" #: sfm-read.c:477 #, c-format msgid "" "%s: Long string value labels record found (record type 7, subtype %d), but " "ignored" msgstr "" #: sfm-read.c:482 #, c-format msgid "" "%s: Long string missing values record found (record type 7, subtype %d), but " "ignored" msgstr "" # foreign/src/sfm-read.c: 442 # warning(_("%s: Unrecognized record type 7, subtype %d encountered in system file"), h->fn, data.subtype) #: sfm-read.c:491 #, c-format msgid "%s: Unrecognized record type 7, subtype %d encountered in system file" msgstr "" "%s: Nierozpoznany typ 7 rekordu, podtyp %d napotkany w pliku systemowym" # foreign/src/sfm-read.c: 465 # (_("%s: Unrecognized record type %d"), h->fn, rec_type) #: sfm-read.c:514 #, c-format msgid "%s: Unrecognized record type %d" msgstr "%s: Nierozpoznany typ %d rekordu" # foreign/src/sfm-read.c: 489 # error(_("error reading system-file header")) #: sfm-read.c:538 msgid "error reading system-file header" msgstr "błąd podczas odczytywania nagłówka pliku systemowego" # foreign/src/sfm-read.c: 505 # (_("%s: Bad size (%d) or count (%d) field on record type 7, subtype 3. Expected size %d, count 8"), # h->fn, size, count, sizeof (R_int32)) #: sfm-read.c:554 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected " "size %d, count 8" msgstr "" "%s: Niepoprawne pole rozmiaru (%d) lub zliczenia (%d) na rekordzie tpyu 7, " "podtyp 3.\tOczekiwano rozmiaru %d oraz 8 zliczeń" # foreign/src/sfm-read.c: 518 # (_("%s: Floating-point representation in system file is not IEEE-754. read.spss cannot convert between floating-point formats"), h->fn) #: sfm-read.c:567 #, c-format msgid "" "%s: Floating-point representation in system file is not IEEE-754. read.spss " "cannot convert between floating-point formats" msgstr "" "%s: Reprezentacja zmiennoprzecinkowa w pliku systemowym nie jest w " "standardzie IEEE-754. read.spss nie może wykonywać konwersji pomiędzy " "formatami zmiennoprzecinkowymi" # foreign/src/sfm-read.c: 537 # (_("%s: File-indicated endianness (%s) does not match endianness intuited from file header (%s)"), # h->fn, file_endian == BIG ? "big-endian" : "little-endian", # data[6] == 1 ? "big-endian" : (data[6] == 2 ? "little-endian" # : "unknown")) #: sfm-read.c:586 #, c-format msgid "" "%s: File-indicated endianness (%s) does not match endianness intuited from " "file header (%s)" msgstr "" "%s: Wskazana przez plik kolejność bajtów (%s) nie zgadza się z kolejnością " "bajtów wywnioskowanych z nagłówka pliku (%s)" # foreign/src/sfm-read.c: 549 # (_("%s: File-indicated character representation code (%s) is not ASCII"), h->fn, # data[7] == 1 ? "EBCDIC" : (data[7] == 4 ? "DEC Kanji" : "Unknown")) #: sfm-read.c:598 #, c-format msgid "%s: File-indicated character representation code (%s) is not ASCII" msgstr "" "%s: Wskazany przez plik kod reprezentacji znaków (%s) nie jest kodem ASCII" # foreign/src/sfm-read.c: 554 # warning(_("%s: File-indicated character representation code (%d) is unknown"), h->fn, data[7]) #: sfm-read.c:603 #, c-format msgid "%s: File-indicated character representation code (%d) is unknown" msgstr "%s: Wskazany przez plik kod reprezentacji znaków (%d) jest nieznany" # foreign/src/sfm-read.c: 572 # (_("%s: Bad size (%d) or count (%d) field on record type 7, subtype 4. Expected size %d, count 8"), # h->fn, size, count, sizeof (R_flt64)) #: sfm-read.c:621 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected " "size %d, count 8" msgstr "" "%s: Niepoprawne pole rozmiaru (%d) lub zliczenia (%d) na rekordzie tpyu 7, " "podtyp 4.\tOczekiwano rozmiaru %d oraz 8 zliczeń" # foreign/src/sfm-read.c: 586 # warning(_("%s: File-indicated value is different from internal value for at least one of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, %g; LOWEST: %g, %g"), # h->fn, (double) data[0], (double) SYSMIS, # (double) data[1], (double) DBL_MAX, # (double) data[2], (double) second_lowest_double_val()) #: sfm-read.c:635 #, c-format msgid "" "%s: File-indicated value is different from internal value for at least one " "of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, " "%g; LOWEST: %g, %g" msgstr "" "%s: Wskazana przez plik wartość jest różna od wartości wewnętrznej dla " "przynajmniej jeden z trzech wartości systemowych. SYSMIS: wskazał %g, " "oczekiwano %g; NAJWYŻSZA: %g, %g; NAJNIŻSZA: %g, %g" # foreign/src/sfm-read.c: 690 # (_("%s: Bad magic. Proper system files begin with the four characters `$FL2'. This file will not be read"), # h->fn) #: sfm-read.c:745 #, c-format msgid "" "%s: Bad magic. Proper system files begin with the four characters `$FL2'. " "This file will not be read" msgstr "" "%s: Niepoprawna liczba magiczna. Poprawne pliki systemowe rozpoczynają się " "czterema znakami'$FL2'. Ten plik nie będzie odczytywany" # foreign/src/sfm-read.c: 732 # (_("%s: File layout code has unexpected value %d. Value should be 2 or 3, in big-endian or little-endian format"), # h->fn, hdr.layout_code) #: sfm-read.c:787 #, c-format msgid "" "%s: File layout code has unexpected value %d. Value should be 2 or 3, in " "big-endian or little-endian format" msgstr "" "%s: Kod układu pliku ma nieoczekiwaną wartość %d. Wartość powinna wynosić 2 " "lub 3, w formacie grubokońcowości lub cienkokońcowości" # foreign/src/sfm-read.c: 747 # (_("%s: Number of elements per case (%d) is not between 1 and %d"), # h->fn, hdr.case_size, INT_MAX / sizeof (union value) / 2) #: sfm-read.c:802 #, c-format msgid "%s: Number of elements per case (%d) is not between 1 and %d" msgstr "%s: Liczba elementów na przypadek (%d) nie jest pomiędzy 1 a %d" # foreign/src/sfm-read.c: 754 # (_("%s: Index of weighting variable (%d) is not between 0 and number of elements per case (%d)"), # h->fn, hdr.weight_index, ext->case_size) #: sfm-read.c:809 #, c-format msgid "" "%s: Index of weighting variable (%d) is not between 0 and number of elements " "per case (%d)" msgstr "" "%s: Indeks zmiennej ważącej (%d) nie jest pomiędzy 0 a liczbą elementów na " "przypadek (%d)" # foreign/src/sfm-read.c: 759 # (_("%s: Number of cases in file (%d) is not between -1 and %d"), # h->fn, ext->ncases, INT_MAX / 2) #: sfm-read.c:814 #, c-format msgid "%s: Number of cases in file (%d) is not between -1 and %d" msgstr "%s: Liczba przypadków w pliku (%d) nie jest pomiędzy -1 a %d" # foreign/src/sfm-read.c: 764 # warning(_("%s: Compression bias (%g) is not the usual value of 100"), # h->fn, ext->bias) #: sfm-read.c:819 #, c-format msgid "%s: Compression bias (%g) is not the usual value of 100" msgstr "%s: Obciążenie kompresji (%g) nie jest typową wartością 100" # foreign/src/sfm-read.c: 866 # (_("%s: position %d: Bad record type (%d); the expected value was 2"), # h->fn, i, sv.rec_type) #: sfm-read.c:921 #, c-format msgid "%s: position %d: Bad record type (%d); the expected value was 2" msgstr "%s: pozycja %d: Niepoprawny typ (%d) rekordu; oczekiwano wartości 2" # foreign/src/sfm-read.c: 875 # (_("%s: position %d: String variable does not have proper number of continuation records"), # h->fn, i) #: sfm-read.c:930 #, c-format msgid "" "%s: position %d: String variable does not have proper number of continuation " "records" msgstr "" "%s: pozycja %d: Zmienna tekstowa nie ma poprawnej liczby kontynuujących " "rekordów" # foreign/src/sfm-read.c: 883 # (_("%s: position %d: Superfluous long string continuation record"), # h->fn, i) #: sfm-read.c:938 #, c-format msgid "%s: position %d: Superfluous long string continuation record" msgstr "%s: pozycja %d: Zbędny długotekstowy rekord kontynuacyjny" # foreign/src/sfm-read.c: 888 # (_("%s: position %d: Bad variable type code %d"), # h->fn, i, sv.type) #: sfm-read.c:943 #, c-format msgid "%s: position %d: Bad variable type code %d" msgstr "%s: pozycja %d: Niepoprawny kod %d typu zmiennej" # foreign/src/sfm-read.c: 891 # (_("%s: position %d: Variable label indicator field is not 0 or 1"), # h->fn, i) #: sfm-read.c:946 #, c-format msgid "%s: position %d: Variable label indicator field is not 0 or 1" msgstr "" "%s: pozycja %d: Pole wskazujące etykietę zmiennej nie ma wartości 0 lub 1" # foreign/src/sfm-read.c: 895 # (_("%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3"), h->fn, i) #: sfm-read.c:950 #, c-format msgid "" "%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3" msgstr "" "%s: pozycja %d: Pole wskazujące brakujące wartości nie ma wartości -3, -2, " "0, 1, 2, lub 3" # foreign/src/sfm-read.c: 915 # warning(_("%s: position %d: Variable name begins with octothorpe ('#'). Scratch variables should not appear in system files"), # h->fn, i) #: sfm-read.c:972 #, c-format msgid "" "%s: position %d: Variable name begins with octothorpe ('#'). Scratch " "variables should not appear in system files" msgstr "" "%s: pozycja %d: Nazwa zmiennej rozpoczyna się znakiem hash ('#'). Usunięte " "zmienne nie powinny pojawiać się w plikach systemowych" # foreign/src/sfm-read.c: 936 # (_("%s: position %d: character `\\%03o' (%c) is not valid in a variable name"), # h->fn, j, c, c) #: sfm-read.c:994 #, c-format msgid "" "%s: position %d: character `\\%03o' (%c) is not valid in a variable name" msgstr "%s: pozycja %d: znak '\\%03o' (%c) nie jest poprawny w nazwie zmiennej" # foreign/src/sfm-read.c: 978 # (_("%s: Variable %s indicates variable label of invalid length %d"), # h->fn, vv->name, len) #: sfm-read.c:1036 #, c-format msgid "%s: Variable %s indicates variable label of invalid length %d" msgstr "" "%s: Zmienna %s wskazuje na etykietę zmiennej o niepoprawnej długości %d" # foreign/src/sfm-read.c: 994 # (_("%s: Long string variable %s may not have missing values"), h->fn, vv->name) #: sfm-read.c:1052 #, c-format msgid "%s: Long string variable %s may not have missing values" msgstr "%s: Długotekstowa zmienna %s nie może mieć wartości brakujących" # foreign/src/sfm-read.c: 1017 # (_("%s: String variable %s may not have missing values specified as a range"), # h->fn, vv->name) #: sfm-read.c:1075 #, c-format msgid "%s: String variable %s may not have missing values specified as a range" msgstr "" "%s: Tekstowa zmienna %s nie może wartości brakujących określonych jako zakres" # foreign/src/sfm-read.c: 1054 # (_("%s: Long string continuation records omitted at end of dictionary"), # h->fn) #: sfm-read.c:1118 #, c-format msgid "%s: Long string continuation records omitted at end of dictionary" msgstr "%s: Długotekstowe rekordy kontynuacyjne pominięte na końcu słownika" # foreign/src/sfm-read.c: 1057 # (_("%s: System file header indicates %d variable positions but %d were read from file"), # h->fn, ext->case_size, next_value) #: sfm-read.c:1121 #, c-format msgid "" "%s: System file header indicates %d variable positions but %d were read from " "file" msgstr "" "%s: Nagłówek pliku systemowego wskazuje na %d pozycje zmiennych, ale %d " "zostało odczytanych z pliku" # foreign/src/sfm-read.c: 1066 # (_("%s: Duplicate variable name `%s' within system file"), # h->fn, dict->var[i]->name) #: sfm-read.c:1130 #, c-format msgid "%s: Duplicate variable name `%s' within system file" msgstr "%s: Powtórzona nazwa '%s' zmiennej wewnątrz pliku systemowego" # foreign/src/sfm-read.c: 1108 # (_("%s: String variable %s has string format specifier %s"), # h->fn, vv->name, formats[v->type].name) #: sfm-read.c:1170 #, c-format msgid "%s: %s variable %s has %s format specifier %s" msgstr "%s: Zmienna %s %s posiada określający format %s %s" # foreign/src/sfm-read.c: 1197 # (_("%s: Variable index record (type 4) does not immediately follow value label record (type 3) as it ought"), h->fn) #: sfm-read.c:1249 #, c-format msgid "" "%s: Variable index record (type 4) does not immediately follow value label " "record (type 3) as it ought" msgstr "" "%s: Indeks rekordu (typ 4) zmiennej nie następuje od razu po indeksie " "rekordu (typ 3) zmiennej jak powinien" # foreign/src/sfm-read.c: 1206 # (_("%s: Number of variables associated with a value label (%d) is not between 1 and the number of variables (%d)"), # h->fn, n_vars, ext->dict->nvar) #: sfm-read.c:1258 #, c-format msgid "" "%s: Number of variables associated with a value label (%d) is not between 1 " "and the number of variables (%d)" msgstr "" "%s: Liczba zmiennych powiązanych z wartością etykiety (%d) nie jest pomiędzy " "1 a liczbą zmiennych (%d)" # foreign/src/sfm-read.c: 1223 # (_("%s: Variable index associated with value label (%d) is not between 1 and the number of values (%d)"), # h->fn, var_index, ext->case_size) #: sfm-read.c:1275 #, c-format msgid "" "%s: Variable index associated with value label (%d) is not between 1 and the " "number of values (%d)" msgstr "" "%s: Indeks zmiennej powiązany z wartością etykiety (%d) nie jest pomiędzy 1 " "a liczbą wartości (%d)" # foreign/src/sfm-read.c: 1229 # (_("%s: Variable index associated with value label (%d) refers to a continuation of a string variable, not to an actual variable"), # h->fn, var_index) #: sfm-read.c:1281 #, c-format msgid "" "%s: Variable index associated with value label (%d) refers to a continuation " "of a string variable, not to an actual variable" msgstr "" "%s: Indeks zmiennej powiązany z wartością etykiety (%d) odnosi się do " "kontynuacji zmiennej tekstowej, nie do aktualnej zmiennej" # foreign/src/sfm-read.c: 1232 # (_("%s: Value labels are not allowed on long string variables (%s)"), h->fn, v->name) #: sfm-read.c:1284 #, c-format msgid "%s: Value labels are not allowed on long string variables (%s)" msgstr "" "%s: Etykiety wartości nie sa dozwolone dla długotekstowych zmiennych (%s)" # foreign/src/sfm-read.c: 1242 # (_("%s: Variables associated with value label are not all of identical type. Variable %s has string type, but variable %s has numeric type"), h->fn, # var[0]->name, var[i]->name) #: sfm-read.c:1293 #, c-format msgid "" "%s: Variables associated with value label are not all of identical type. " "Variable %s has %s type, but variable %s has %s type" msgstr "" "%s: Zmienne powiązane z etykietami wartości nie mają identycznego typu. " "Zmienna %s posiada typ %s, ale zmienna %s posiada typ %s" # foreign/src/sfm-read.c: 1287 # warning(_("%s: File contains duplicate label for value %g for variable %s"), # h->fn, cooked_label[j]->v.f, v->name) #: sfm-read.c:1335 #, c-format msgid "%s: File contains duplicate label for value %g for variable %s" msgstr "%s: Plik zawiera powtorzone etykiety dla wartości %g zmiennej %s" # foreign/src/sfm-read.c: 1290 # warning(_("%s: File contains duplicate label for value `%.*s' for variable %s"), # h->fn, v->width, # cooked_label[j]->v.s, v->name) #: sfm-read.c:1338 #, c-format msgid "%s: File contains duplicate label for value `%.*s' for variable %s" msgstr "%s: Plik zawiera powtórzone etykiety dla wartości '%.*s' zmiennej %s" # foreign/src/sfm-read.c: 1330 # error(_("%s: Reading system file: %s"), h->fn, strerror (errno)) # foreign/src/sfm-read.c: 1608 # error(_("%s: Reading system file: %s"), h->fn, strerror (errno)) #: sfm-read.c:1378 sfm-read.c:1656 #, c-format msgid "%s: Reading system file: %s" msgstr "%s: Czytanie pliku systemowego: %s" # foreign/src/sfm-read.c: 1332 # error(_("%s: Unexpected end of file"), h->fn) # foreign/src/sfm-read.c: 1516 # (_("%s: Unexpected end of file"), h->fn) # foreign/src/sfm-read.c: 1557 # (_("%s: Unexpected end of file"), h->fn) #: sfm-read.c:1380 sfm-read.c:1564 sfm-read.c:1605 #, c-format msgid "%s: Unexpected end of file" msgstr "%s: Nieoczekiwany koniec pliku" # foreign/src/sfm-read.c: 1349 # (_("%s: System file contains multiple type 6 (document) records"), # h->fn) #: sfm-read.c:1397 #, c-format msgid "%s: System file contains multiple type 6 (document) records" msgstr "%s: Plik systemowy zawiera wielokrotne rekordy typu 6 (dokument)" # foreign/src/sfm-read.c: 1359 # (_("%s: Number of document lines (%d) must be greater than 0"), # h->fn, dict->n_documents) #: sfm-read.c:1407 #, c-format msgid "%s: Number of document lines (%d) must be greater than 0" msgstr "%s: Liczba linii (%d) dokumentu musi byc większa niż 0" # foreign/src/sfm-read.c: 1470 # error(_("%s: Error reading file: %s"), h->fn, strerror (errno)) #: sfm-read.c:1518 #, c-format msgid "%s: Error reading file: %s" msgstr "%s: Błąd podczas czytania pliku: %s" # foreign/src/sfm-read.c: 1508 # (_("%s: Compressed data is corrupted. Data ends partway through a case"), h->fn) #: sfm-read.c:1556 #, c-format msgid "%s: Compressed data is corrupted. Data ends partway through a case" msgstr "" "%s: Skompresowane dane są uszkodzone. Dane kończą się częściowo na przypadku" # foreign/src/sfm-read.c: 1610 # error(_("%s: Partial record at end of system file"), h->fn) #: sfm-read.c:1658 #, c-format msgid "%s: Partial record at end of system file" msgstr "%s: Częściowy rekord na końcu pliku systemowego" # foreign/src/spss.c: 382 # error(_("nval is 0")) # foreign/src/spss.c: 504 # error(_("nval is 0")) #: spss.c:382 spss.c:504 msgid "nval is 0" msgstr "'nval' jest równe 0" # foreign/src/spss.c: 672 # error(_("problem in reading file '%s'"), filename) #: spss.c:673 #, c-format msgid "problem in reading file '%s'" msgstr "problem podczas czytania pliku '%s'" # foreign/src/spss.c: 682 # error(_("file '%s' is not in any supported SPSS format"), # filename) #: spss.c:683 #, c-format msgid "file '%s' is not in any supported SPSS format" msgstr "plik '%s' nie jest w żadnym wspieranym formacie SPSS" # foreign/src/stataread.c: 89 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 99 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 107 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 132 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 142 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 151 # error(_("a binary read error occurred")) # foreign/src/stataread.c: 507 # warning(_("a binary read error occurred")) #: stataread.c:95 stataread.c:105 stataread.c:113 stataread.c:140 #: stataread.c:153 stataread.c:163 stataread.c:520 msgid "a binary read error occurred" msgstr "wystąpił błąd odczytu binarnego" # foreign/src/stataread.c: 229 # error(_("not a Stata version 5-12 .dta file")) #: stataread.c:241 msgid "not a Stata version 5-12 .dta file" msgstr "to nie jest plik .dta Stata wersja 5-12" # foreign/src/stataread.c: 427 # error(_("something strange in the file\n (Type 0 characteristic of nonzero length)")) #: stataread.c:439 msgid "" "something strange in the file\n" " (Type 0 characteristic of nonzero length)" msgstr "" "coś dziwnego w pliku\n" " (Charakterystyka typu 0 posiada niezerową długość)" # foreign/src/stataread.c: 575 # error(_("can not yet read Stata .dta on this platform")) #: stataread.c:584 msgid "can not yet read Stata .dta on this platform" msgstr "nie można na chwilę obecną odczytać pliku .dta Stata na tej platformie" #: stataread.c:588 stataread.c:1044 msgid "first argument must be a file name\n" msgstr "pierwszy argument musi być nazwą pliku\n" # foreign/src/stataread.c: 597 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 604 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 610 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 625 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 627 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 635 # error(_("a binary write error occurred")) # foreign/src/stataread.c: 643 # error(_("a binary write error occurred")) #: stataread.c:606 stataread.c:613 stataread.c:619 stataread.c:634 #: stataread.c:636 stataread.c:644 stataread.c:652 msgid "a binary write error occurred" msgstr "nastąpił błąd zapisu danych binarnych" # foreign/src/stataread.c: 712 # error(_("this should happen: overrun")) #: stataread.c:722 msgid "this should happen: overrun" msgstr "to nie powinno się zdarzyć: przeskakiwanie" # foreign/src/stataread.c: 714 # error(_("this should happen: underrun")) #: stataread.c:724 msgid "this should happen: underrun" msgstr "to nie powinno się zdarzyć: przepuszczanie" # foreign/src/stataread.c: 965 # error(_("this should not happen.")) #: stataread.c:983 msgid "this should not happen." msgstr "to nie powinno się zdarzyć." # foreign/src/stataread.c: 1022 # error(_("cannot yet read write .dta on this platform")) #: stataread.c:1040 msgid "cannot yet read write .dta on this platform" msgstr "nie można na chwilę obecną zapisać pliku .dta Stata na tej platformie" # foreign/src/stataread.c: 1030 # error(_("data to be saved must be in a data frame")) #: stataread.c:1048 msgid "data to be saved must be in a data frame" msgstr "zapisywane dane muszą być w formacie ramki danych" # foreign/src/stataread.c: 1033 # error(_("unable to open file for writing: '%s'"), strerror(errno)) #: stataread.c:1051 #, c-format msgid "unable to open file for writing: '%s'" msgstr "nie można otworzyć pliku do zapisu: '%s'" # foreign/src/stataread.c: 1038 # error(_("can only write version 6-10 formats")) #: stataread.c:1056 msgid "can only write version 6-10 formats" msgstr "można zapisywać formaty w wersji 6-10" # foreign/src/sfm-read.c: 910 # (_("%s: position %d: Variable name begins with invalid character"), h->fn, i) #~ msgid "%s: position %d: Variable name begins with invalid character" #~ msgstr "%s: pozycja %d: Nazwa zmiennej rozpoczyna się niepoprawnym znakiem" # foreign/src/sfm-read.c: 912 # warning(_("%s: position %d: Variable name begins with lowercase letter %c"), # h->fn, i, sv.name[0]) #~ msgid "%s: position %d: Variable name begins with lowercase letter %c" #~ msgstr "%s: pozycja %d: Nazwa zmiennej rozpoczyna się małą literą %c" # foreign/src/sfm-read.c: 928 # warning(_("%s: position %d: Variable name character %d is lowercase letter %c"), # h->fn, i, j + 1, sv.name[j]) #~ msgid "%s: position %d: Variable name character %d is lowercase letter %c" #~ msgstr "%s: pozycja %d: Znak %d nazwy zmiennej jest małą literą %c" foreign/po/it.po0000644000175100001440000006616114011446267013332 0ustar hornikusers# R Italian translation # Copyright (C) The R Foundation # This file is distributed under the same license as the R package. # Daniele Medri , 2005-2020. # msgid "" msgstr "" "Project-Id-Version: foreign 0.8-70\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-12 09:19+0000\n" "PO-Revision-Date: \n" "Last-Translator: Daniele Medri \n" "Language-Team: Italian https://github.com/dmedri/R-italian-lang\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.2.1\n" #: R_systat.c:131 #, c-format msgid "not a rectangular data file (%s mtype is %d)" msgstr "non è un file dati rettangolare (%s mtype è %d)" #: R_systat.c:137 msgid "mismatch in numbers of variables" msgstr "mancata corrispondenza nel numero di variabili" #: R_systat.c:173 R_systat.c:684 R_systat.c:689 R_systat.c:695 R_systat.c:698 #: R_systat.c:717 R_systat.c:737 msgid "file access error" msgstr "errore di accesso al file" #: R_systat.c:236 #, c-format msgid "cannot open file '%s'" msgstr "non è possibile aprire il file '%s'" #: R_systat.c:256 msgid "getuse: Failure in variable unpacking" msgstr "getuse: Errore durante lo scompattamento variabile" #: R_systat.c:258 R_systat.c:270 R_systat.c:273 R_systat.c:323 R_systat.c:329 #: R_systat.c:338 msgid "getuse: File access error" msgstr "getuse: Errore di accesso al file" #: R_systat.c:319 #, c-format msgid "getuse: byte counter %o octal" msgstr "getuse: conta byte %o ottale" #: R_systat.c:340 msgid "getuse: terminal null block" msgstr "getuse: terminal null block" #: R_systat.c:352 msgid "getuse: non-integer number of observations" msgstr "getuse: numero di osservazioni non intero" #: R_systat.c:413 msgid "getlab: File format unknown" msgstr "getlab: Formato file sconosciuto" #: R_systat.c:417 R_systat.c:431 R_systat.c:433 R_systat.c:435 R_systat.c:482 #: R_systat.c:484 R_systat.c:486 R_systat.c:509 msgid "getlab: File access error" msgstr "getlab: Errore di accesso al file" #: R_systat.c:421 #, c-format msgid "getlab: byte 0 = %o octal" msgstr "getlab: byte 0 = %o ottale" #: R_systat.c:425 #, c-format msgid "getlab: byte 1 = %o octal" msgstr "getlab: byte 1 = %o ottale" #: R_systat.c:437 #, c-format msgid "getlab: byte 9 = %o octal" msgstr "getlab: byte 9 = %o ottale" #: R_systat.c:448 #, c-format msgid "getlab: comment begin byte = %o" msgstr "getlab: inizio commento byte = %o" #: R_systat.c:454 #, c-format msgid "getlab: comment = %c" msgstr "getlab: comment = %c" #: R_systat.c:459 #, c-format msgid "getlab: comment end byte = %o" msgstr "getlab: fine commento byte = %o" #: R_systat.c:477 #, c-format msgid "getlab: byte nv0 = %o octal" msgstr "getlab: byte nv0 = %o ottale" #: R_systat.c:488 #, c-format msgid "getlab: byte nv$ = %o octal" msgstr "getlab: byte nv$ = %o ottale" #: R_systat.c:496 msgid "file has more variables than this function can read" msgstr "file con più variabili di quelle gestibili da questa funzione" #: R_systat.c:503 #, c-format msgid "getlab: byte lab[%d]0 = %o, nv=%d" msgstr "getlab: byte lab[%d]0 = %o, nv=%d" #: R_systat.c:516 #, c-format msgid "$ not in variable label column 9: %s" msgstr "$ non nella colonna 9 dell'etichetta variabile: %s" #: R_systat.c:536 #, c-format msgid "getlab: byte lab[%d]$ = %o octal" msgstr "getlab: byte lab[%d]$ = %o ottale" #: R_systat.c:714 msgid "string variable" msgstr "variabile stringa" #: Rdbfread.c:56 msgid "unable to open DBF file" msgstr "non è possibile aprire il file DBF" #: Rdbfread.c:64 msgid "no fields in DBF table" msgstr "nessun campo nella tabella DBF" #: Rdbfread.c:193 #, c-format msgid "value |%d| found in logical field" msgstr "trovato il valore |%d| nel campo logico" #: Rdbfwrite.c:50 SASxport.c:510 SASxport.c:607 msgid "first argument must be a file name" msgstr "il primo argomento dev'essere un nome file" #: Rdbfwrite.c:53 msgid "unable to open file" msgstr "non è possibile aprire il file" #: Rdbfwrite.c:97 Rdbfwrite.c:135 stataread.c:304 stataread.c:325 #: stataread.c:816 stataread.c:846 msgid "unknown data type" msgstr "tipo dato sconosciuto" #: SASxport.c:90 msgid "invalid field length in numeric variable" msgstr "lunghezza campo non valida in una variabile numerica" #: SASxport.c:152 SASxport.c:188 SASxport.c:233 SASxport.c:259 SASxport.c:303 #: SASxport.c:311 msgid "file not in SAS transfer format" msgstr "il file non è nel formato SAS transfer" #: SASxport.c:225 SASxport.c:293 msgid "SAS transfer file has incorrect library header" msgstr "Il file transfer SAS ha un'intestazione libreria incorretta" #: SASxport.c:251 msgid "SAS transfer file has incorrect member header" msgstr "Il file transfer SAS ha un'intestazione membro incorretta" #: SASxport.c:364 SASxport.c:405 SASxport.c:411 msgid "problem accessing SAS XPORT file" msgstr "problema di accesso ai file SAS XPORT" #: SASxport.c:513 SASxport.c:610 spss.c:670 stataread.c:592 #, c-format msgid "unable to open file: '%s'" msgstr "non è possibile aprire il file: '%s'" #: SASxport.c:612 #, c-format msgid "problem reading SAS XPORT file '%s'" msgstr "problema di lettura del file SAS XPORT '%s'" #: SASxport.c:641 msgid "problem reading SAS transport file" msgstr "problema di lettura del file SAS transport" #: file-handle.c:115 #, c-format msgid "file handle `%s' has not been previously declared on FILE HANDLE" msgstr "" "il gestore del file `%s 'non è stato precedentemente dichiarato su FILE " "HANDLE" #: format.c:108 #, c-format msgid "format %s may not be used as an input format" msgstr "il formato %s potrebbe non essere utilizzato come formato di input" #: format.c:113 #, c-format msgid "" "input format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "il formato di input %s specifica una larghezza errata %d. Il formato %s " "richiede una larghezza compresa tra %d e %d" #: format.c:119 #, c-format msgid "" "input format %s specifies an odd width %d, but format %s requires an even " "width between %d and %d" msgstr "" "il formato di input %s specifica una larghezza dispari %d, ma il formato %s " "richiede una larghezza uniforme tra %d e %d" #: format.c:125 #, c-format msgid "" "Input format %s specifies a bad number of implied decimal places %d. Input " "format %s allows up to 16 implied decimal places" msgstr "" "Il formato di input %s specifica un numero errato di posizioni decimali " "implicite %d. Il formato di input %s consente fino a 16 cifre decimali di " "questo tipo" #: format.c:144 #, c-format msgid "" "output format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "il formato di output %s specifica una larghezza errata %d. Il formato %s " "richiede una larghezza compresa tra %d e %d" #: format.c:153 #, c-format msgid "" "output format %s requires minimum width %d to allow %d decimal places. Try " "%s%d.%d instead of %s" msgstr "" "il formato di output %s richiede la larghezza minima %d per consentire %d " "cifre decimali. Si utilizzi %s%d.%d invece di %s" #: format.c:160 #, c-format msgid "" "output format %s specifies an odd width %d, but output format %s requires an " "even width between %d and %d" msgstr "" "il formato di output %s specifica una larghezza dispari %d, ma il formato di " "output %s richiede una larghezza uniforme tra %d e %d" #: format.c:166 #, c-format msgid "" "Output format %s specifies a bad number of implied decimal places %d. " "Output format %s allows a number of implied decimal places between 1 and 16" msgstr "" "Il formato di output %s specifica un numero errato di posizioni decimali " "implicite %d. Il formato di output %s ammette un numero di decimali " "impliciti compreso tra 1 e 16" #: format.c:181 #, c-format msgid "cannot display a string variable of width %d with format specifier %s" msgstr "" "non è possibile visualizzare una variabile stringa di larghezza %d con " "identificatore di formato %s" #: minitab.c:92 minitab.c:158 msgid "non-numeric data types are not yet implemented" msgstr "i tipi di dati non-numerici non sono ancora implementati" #: minitab.c:119 #, c-format msgid "unable to open file '%s': '%s'" msgstr "non è possibile aprire il file '%s': '%s'" #: minitab.c:123 #, c-format msgid "file '%s' is not in Minitab Portable Worksheet format" msgstr "il file '%s' non è nel formato Minitab Portable Worksheet" #: minitab.c:126 minitab.c:147 minitab.c:155 minitab.c:162 msgid "file read error" msgstr "errore di lettura file" #: minitab.c:139 #, c-format msgid "first record for entry %d is corrupt" msgstr "il primo record per la voce %d è corrotto" #: pfm-read.c:117 #, c-format msgid "%s: Closing portable file: %s" msgstr "%s: Chiusura del file portatile: %s" #: pfm-read.c:138 msgid "Unexpected end of file" msgstr "Fine del file inattesa" #: pfm-read.c:146 msgid "Bad line end" msgstr "Fine linea errato" #: pfm-read.c:227 #, c-format msgid "cannot read file %s as portable file: already opened for %s" msgstr "" "non è possibile leggere il file %s come file portatile: già aperto per %s" #: pfm-read.c:243 #, c-format msgid "" "an error occurred while opening \"%s\" for reading as a portable file: %s" msgstr "" "si è verificato un errore durante l'apertura di \"%s\" per la lettura come " "file portatile: %s" #: pfm-read.c:275 msgid "Data record expected" msgstr "Atteso record dati" #: pfm-read.c:295 msgid "error reading portable-file dictionary" msgstr "errore di lettura del dizionario file portabile" #: pfm-read.c:358 msgid "Number expected" msgstr "Numero atteso" #: pfm-read.c:386 msgid "Missing numeric terminator" msgstr "Terminatore numerico mancante" #: pfm-read.c:423 msgid "Bad integer format" msgstr "Formato intero errato" #: pfm-read.c:453 #, c-format msgid "Bad string length %d" msgstr "Lunghezza stringa %d errata" #: pfm-read.c:523 msgid "Missing SPSSPORT signature" msgstr "Firma SPSSPORT mancante" #: pfm-read.c:541 #, c-format msgid "Unrecognized version code %d" msgstr "Codice versione %d non riconosciuto" #: pfm-read.c:552 #, c-format msgid "Bad date string length %d" msgstr "Lunghezza stringa data %d errata" #: pfm-read.c:559 msgid "Bad character in date" msgstr "Carattere errato nella data" #: pfm-read.c:579 #, c-format msgid "Bad time string length %d" msgstr "Lunghezza stringa orario %d errata" #: pfm-read.c:586 msgid "Bad character in time" msgstr "Carattere errato nell'orario" #: pfm-read.c:640 #, c-format msgid "%s: Bad format specifier byte %d" msgstr "%s: errato identificatore di formato byte %d" #: pfm-read.c:649 sfm-read.c:1157 sfm-read.c:1167 #, c-format msgid "%s: Bad format specifier byte (%d)" msgstr "%s: errato identificatore di formato byte (%d)" #: pfm-read.c:651 #, c-format msgid "%s variable %s has %s format specifier %s" msgstr "%s variabile %s ha %s identificatore di formato %s" #: pfm-read.c:690 msgid "Expected variable count record" msgstr "Atteso record di conteggio variabile" #: pfm-read.c:694 #, c-format msgid "Invalid number of variables %d" msgstr "Numero di variabili %d non valido" #: pfm-read.c:730 msgid "Expected variable record" msgstr "Atteso record variabile" #: pfm-read.c:736 #, c-format msgid "Invalid variable width %d" msgstr "Larghezza variabile %d non valida" #: pfm-read.c:754 #, c-format msgid "position %d: Variable name has %u characters" msgstr "posizione %d: Il nome della variabile ha %u caratteri" #: pfm-read.c:758 #, c-format msgid "position %d: Variable name begins with invalid character" msgstr "" "posizione %d: Il nome della variabile inizia con un carattere non valido" #: pfm-read.c:762 #, c-format msgid "position %d: Variable name begins with lowercase letter %c" msgstr "" "posizione %d: Il nome della variabile inizia con la lettera minuscola %c" #: pfm-read.c:774 #, c-format msgid "position %d: Variable name character %d is lowercase letter %c" msgstr "" "posizione %d: Il carattere del nome variabile %d è lettera minuscola %c" #: pfm-read.c:783 #, c-format msgid "position %d: character `\\%03o' is not valid in a variable name" msgstr "" "posizione %d: il carattere `\\%03o 'non è valido nel nome di una variabile" #: pfm-read.c:789 #, c-format msgid "Bad width %d for variable %s" msgstr "Larghezza %d errata per la variabile %s" #: pfm-read.c:795 #, c-format msgid "Duplicate variable name %s" msgstr "Nome variabile %s duplicato" #: pfm-read.c:839 #, c-format msgid "Bad missing values for %s" msgstr "Valori mancanti per %s errati" #: pfm-read.c:862 #, c-format msgid "Weighting variable %s not present in dictionary" msgstr "Variabile di ponderazione %s non presente nel dizionario" #: pfm-read.c:932 #, c-format msgid "Unknown variable %s while parsing value labels" msgstr "Variabile %s sconosciuta mentre si analizzano le etichette valore" #: pfm-read.c:935 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types " "or widths" msgstr "" "Non è possibile assegnare le etichette dei valori a %s e %s, le quali hanno " "tipi di variabili o larghezze differenti" #: pfm-read.c:981 #, c-format msgid "Duplicate label for value %g for variable %s" msgstr "Etichetta duplicata per il valore %g per la variabile %s" #: pfm-read.c:984 #, c-format msgid "Duplicate label for value `%.*s' for variable %s" msgstr "Etichetta duplicata per il valore '%.*s' per la variabile %s" #: pfm-read.c:1072 msgid "End of file midway through case" msgstr "Fine del file a metà del caso" #: sfm-read.c:168 #, c-format msgid "%s: Closing system file: %s" msgstr "%s: Chiusura file di sistema: %s" #: sfm-read.c:299 #, c-format msgid "cannot read file %s as system file: already opened for %s" msgstr "" "non è possibile leggere il file %s come file di sistema: già aperto per %s" #: sfm-read.c:314 #, c-format msgid "An error occurred while opening '%s' for reading as a system file: %s" msgstr "" "Si è verificato un errore durante l'apertura di '%s' per la lettura come " "file di sistema: %s" #: sfm-read.c:345 #, c-format msgid "" "%s: Weighting variable may not be a continuation of a long string variable" msgstr "" "%s: La variabile di ponderazione potrebbe non essere la continuazione di una " "variabile di stringa lunga" #: sfm-read.c:347 #, c-format msgid "%s: Weighting variable may not be a string variable" msgstr "" "%s: La variabile di ponderazione potrebbe non essere una variabile di stringa" #: sfm-read.c:372 #, c-format msgid "" "%s: Orphaned variable index record (type 4). Type 4 records must always " "immediately follow type 3 records" msgstr "" "%s: Record di indice variabile orfano (tipo 4). I record di tipo 4 devono " "sempre seguire immediatamente i record di tipo 3" #: sfm-read.c:452 #, c-format msgid "" "%s: Very long string record(s) found (record type 7, subtype %d), each will " "be imported in consecutive separate variables" msgstr "" "%s: Trovati record di stringa molto lunghi (tipo di record 7, sottotipo %d), " "ciascuno sarà importato in variabili separate consecutive" #: sfm-read.c:477 #, c-format msgid "" "%s: Long string value labels record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s: Trovato il record di etichette con valore stringa lungo (tipo di record " "7, sottotipo %d), ma ignorato" #: sfm-read.c:482 #, c-format msgid "" "%s: Long string missing values record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s: Trovato il record di valori mancanti di stringa lunga (tipo di record 7, " "sottotipo %d), ma ignorato" #: sfm-read.c:491 #, c-format msgid "%s: Unrecognized record type 7, subtype %d encountered in system file" msgstr "" "%s: Tipo di record 7 non riconosciuto, sottotipo %d rilevato nel file di " "sistema" #: sfm-read.c:514 #, c-format msgid "%s: Unrecognized record type %d" msgstr "%s: Tipo di record non riconosciuto %d" #: sfm-read.c:538 msgid "error reading system-file header" msgstr "errore di lettura intestazione file di sistema" #: sfm-read.c:554 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected " "size %d, count 8" msgstr "" "%s: Dimensione errata (%d) o conta (%d) campo sul record tipo 7, sottotipo 3." "\tDimensione attesa %d, conta 8" #: sfm-read.c:567 #, c-format msgid "" "%s: Floating-point representation in system file is not IEEE-754. read.spss " "cannot convert between floating-point formats" msgstr "" "%s: La rappresentazione in virgola mobile nel file di sistema non è " "IEEE-754. read.spss non può convertirle tra formati a virgola mobile" #: sfm-read.c:586 #, c-format msgid "" "%s: File-indicated endianness (%s) does not match endianness intuited from " "file header (%s)" msgstr "" "%s: L'endianness indicata dal file (%s) non corrisponde all'endianness " "rilevata dall'intestazione del file (%s)" #: sfm-read.c:598 #, c-format msgid "%s: File-indicated character representation code (%s) is not ASCII" msgstr "" "%s: Il codice di rappresentazione dei caratteri indicato dal file (%s) non è " "ASCII" #: sfm-read.c:603 #, c-format msgid "%s: File-indicated character representation code (%d) is unknown" msgstr "" "%s: Il codice di rappresentazione dei caratteri indicato dal file (%d) è " "sconosciuto" #: sfm-read.c:621 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected " "size %d, count 8" msgstr "" "%s: Dimensione errata (%d) o conta (%d) campo sul record tipo 7, sottotipo 4." "\tDimensione attesa %d, conta 8" #: sfm-read.c:635 #, c-format msgid "" "%s: File-indicated value is different from internal value for at least one " "of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, " "%g; LOWEST: %g, %g" msgstr "" "%s: Il valore indicato dal file è diverso dal valore interno per almeno uno " "dei tre valori di sistema. SYSMIS: indicato %g, atteso %g; PIU' ALTO: %g, " "%g; PIU' BASSO: %g, %g" #: sfm-read.c:745 #, c-format msgid "" "%s: Bad magic. Proper system files begin with the four characters `$FL2'. " "This file will not be read" msgstr "" "%s: Bad magic. Il file di sistema appropriato inizia con i quattro " "caratteri `$FL2'. Questo file non sarà letto" #: sfm-read.c:787 #, c-format msgid "" "%s: File layout code has unexpected value %d. Value should be 2 or 3, in " "big-endian or little-endian format" msgstr "" "%s: Il codice layout del file ha un valore inatteso %d. Il valore dovrebbe " "essere 2 o 3, in formato big-endian o little-endian" #: sfm-read.c:802 #, c-format msgid "%s: Number of elements per case (%d) is not between 1 and %d" msgstr "%s: Numero di elementi per caso (%d) non è tra 1 e %d" #: sfm-read.c:809 #, c-format msgid "" "%s: Index of weighting variable (%d) is not between 0 and number of elements " "per case (%d)" msgstr "" "%s: L'indice della variabile di ponderazione (%d) non è compreso tra 0 e il " "numero di elementi per caso (%d)" #: sfm-read.c:814 #, c-format msgid "%s: Number of cases in file (%d) is not between -1 and %d" msgstr "%s: Numero di casi nel file (%d) non è tra -1 e %d" #: sfm-read.c:819 #, c-format msgid "%s: Compression bias (%g) is not the usual value of 100" msgstr "%s: Il bias di compressione (%g) non è il valore normale di 100" #: sfm-read.c:921 #, c-format msgid "%s: position %d: Bad record type (%d); the expected value was 2" msgstr "%s: posizione %d: Tipo di record errato (%d); il valore atteso era 2" #: sfm-read.c:930 #, c-format msgid "" "%s: position %d: String variable does not have proper number of continuation " "records" msgstr "" "%s: position %d: La variabile stringa non ha un numero adeguato di record di " "continuazione" #: sfm-read.c:938 #, c-format msgid "%s: position %d: Superfluous long string continuation record" msgstr "" "%s: posizione %d: Record di continuazione della stringa lunga superfluo" #: sfm-read.c:943 #, c-format msgid "%s: position %d: Bad variable type code %d" msgstr "%s: posizione %d: Codice tipo variabile errato %d" #: sfm-read.c:946 #, c-format msgid "%s: position %d: Variable label indicator field is not 0 or 1" msgstr "" "%s: posizione %d: Il campo indicatore dell'etichetta variabile non è 0 o 1" #: sfm-read.c:950 #, c-format msgid "" "%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3" msgstr "" "%s: posizione %d: Il campo indicatore del valore mancante non è -3, -2, 0, " "1, 2 o 3" #: sfm-read.c:972 #, c-format msgid "" "%s: position %d: Variable name begins with octothorpe ('#'). Scratch " "variables should not appear in system files" msgstr "" "%s: posizione %d: Il nome della variabile inizia con il carattere " "cancelletto ('#'). Le variabili di questo tipo non dovrebbero apparire nei " "file di sistema" #: sfm-read.c:994 #, c-format msgid "" "%s: position %d: character `\\%03o' (%c) is not valid in a variable name" msgstr "" "%s: posizione %d: il carattere `\\%03o' (%c) non è valido in un nome di " "variabile" #: sfm-read.c:1036 #, c-format msgid "%s: Variable %s indicates variable label of invalid length %d" msgstr "" "%s: La variabile %s indica un'etichetta variabile di lunghezza non valida %d" #: sfm-read.c:1052 #, c-format msgid "%s: Long string variable %s may not have missing values" msgstr "%s: Variabile stringa lunga %s potrebbe non avere valori mancanti" #: sfm-read.c:1075 #, c-format msgid "%s: String variable %s may not have missing values specified as a range" msgstr "" "%s: La variabile di stringa %s potrebbe non avere valori mancanti " "specificati come intervallo" #: sfm-read.c:1118 #, c-format msgid "%s: Long string continuation records omitted at end of dictionary" msgstr "" "%s: I record di continuazione della stringa lunga omessi alla fine del " "dizionario" #: sfm-read.c:1121 #, c-format msgid "" "%s: System file header indicates %d variable positions but %d were read from " "file" msgstr "" "%s: L'intestazione del file di sistema indica %d posizioni variabili ma %d " "sono state lette dal file" #: sfm-read.c:1130 #, c-format msgid "%s: Duplicate variable name `%s' within system file" msgstr "%s: Nome variabile duplicato `%s' all'interno del file di sistema" #: sfm-read.c:1170 #, c-format msgid "%s: %s variable %s has %s format specifier %s" msgstr "%s: %s variabile %s ha %s identificatore di formato %s" #: sfm-read.c:1249 #, c-format msgid "" "%s: Variable index record (type 4) does not immediately follow value label " "record (type 3) as it ought" msgstr "" "%s: Il record dell'indice variabile (tipo 4) non segue immediatamente il " "record dell'etichetta del valore (tipo 3) come dovrebbe" #: sfm-read.c:1258 #, c-format msgid "" "%s: Number of variables associated with a value label (%d) is not between 1 " "and the number of variables (%d)" msgstr "" "%s: Il numero di variabili associate con un'etichetta valore (%d) non è tra " "1 e il numero di variabili (%d)" #: sfm-read.c:1275 #, c-format msgid "" "%s: Variable index associated with value label (%d) is not between 1 and the " "number of values (%d)" msgstr "" "%s: L'indice variabile associato all'etichetta del valore (%d) non è " "compreso tra 1 e il numero di valori (%d)" #: sfm-read.c:1281 #, c-format msgid "" "%s: Variable index associated with value label (%d) refers to a continuation " "of a string variable, not to an actual variable" msgstr "" "%s: L'indice di variabile associato all'etichetta del valore (%d) si " "riferisce a una continuazione di una variabile stringa, non a una variabile " "effettiva" #: sfm-read.c:1284 #, c-format msgid "%s: Value labels are not allowed on long string variables (%s)" msgstr "" "%s: Le etichette dei valori non sono consentite su variabili stringa lunghe " "(%s)" #: sfm-read.c:1293 #, c-format msgid "" "%s: Variables associated with value label are not all of identical type. " "Variable %s has %s type, but variable %s has %s type" msgstr "" "%s: Le variabili associate all'etichetta del valore non sono tutte di tipo " "identico. La variabile %s ha il tipo %s, ma la variabile %s ha il tipo %s" #: sfm-read.c:1335 #, c-format msgid "%s: File contains duplicate label for value %g for variable %s" msgstr "" "%s: Il file contiene un'etichetta duplicata per il valore %g per la " "variabile %s" #: sfm-read.c:1338 #, c-format msgid "%s: File contains duplicate label for value `%.*s' for variable %s" msgstr "" "%s: Il file contiene un'etichetta duplicata per il valore `%.*s' per la " "variabile %s" #: sfm-read.c:1378 sfm-read.c:1656 #, c-format msgid "%s: Reading system file: %s" msgstr "%s: Lettura file di sistema: %s" #: sfm-read.c:1380 sfm-read.c:1564 sfm-read.c:1605 #, c-format msgid "%s: Unexpected end of file" msgstr "%s: Fine del file inattesa" #: sfm-read.c:1397 #, c-format msgid "%s: System file contains multiple type 6 (document) records" msgstr "%s: Il file di sistema contiene multipli record di tipo 6 (documento)" #: sfm-read.c:1407 #, c-format msgid "%s: Number of document lines (%d) must be greater than 0" msgstr "%s: Numero di linee del documento (%d) dev'essere più grande di 0" #: sfm-read.c:1518 #, c-format msgid "%s: Error reading file: %s" msgstr "%s: Errore di lettura del file: %s" #: sfm-read.c:1556 #, c-format msgid "%s: Compressed data is corrupted. Data ends partway through a case" msgstr "" "%s: Dati compressi corrotti. I dati terminano parzialmente attraverso un " "caso" #: sfm-read.c:1658 #, c-format msgid "%s: Partial record at end of system file" msgstr "%s: Record parziale alla fine del file di sistema" #: spss.c:382 spss.c:504 msgid "nval is 0" msgstr "nval è 0" #: spss.c:673 #, c-format msgid "problem in reading file '%s'" msgstr "problema di lettura del file '%s'" #: spss.c:683 #, c-format msgid "file '%s' is not in any supported SPSS format" msgstr "il file '%s' non è in alcun formato SPSS supportato" #: stataread.c:95 stataread.c:105 stataread.c:113 stataread.c:140 #: stataread.c:153 stataread.c:163 stataread.c:520 msgid "a binary read error occurred" msgstr "si è verificato un errore in lettura binaria" #: stataread.c:241 msgid "not a Stata version 5-12 .dta file" msgstr "non è un file Stata versione 5-12 .dta" #: stataread.c:439 msgid "" "something strange in the file\n" " (Type 0 characteristic of nonzero length)" msgstr "" "c'è qualcosa di strano nel file\n" " (Type 0 caratteristico di lunghezza non zero)" #: stataread.c:584 msgid "can not yet read Stata .dta on this platform" msgstr "non si possono ancora leggere Stata.dta su questa piattaforma" #: stataread.c:588 stataread.c:1044 msgid "first argument must be a file name\n" msgstr "il primo argomento dev'essere un nome file\n" #: stataread.c:606 stataread.c:613 stataread.c:619 stataread.c:634 #: stataread.c:636 stataread.c:644 stataread.c:652 msgid "a binary write error occurred" msgstr "si è verificato un errore di scrittura binaria" #: stataread.c:722 msgid "this should happen: overrun" msgstr "questo non dovrebbe accadere: overrun" #: stataread.c:724 msgid "this should happen: underrun" msgstr "questo non dovrebbe accadere: underrun" #: stataread.c:983 msgid "this should not happen." msgstr "questo non dovrebbe accadere." #: stataread.c:1040 msgid "cannot yet read write .dta on this platform" msgstr "non è possibile leggere/scrivere .dta su questa piattaforma" #: stataread.c:1048 msgid "data to be saved must be in a data frame" msgstr "la data da salvare dev'essere in un data frame" #: stataread.c:1051 #, c-format msgid "unable to open file for writing: '%s'" msgstr "non è possibile aprire il file in scrittura: '%s'" #: stataread.c:1056 msgid "can only write version 6-10 formats" msgstr "si possono scrivere i formati delle versioni 6-10" foreign/po/R-foreign.pot0000644000175100001440000000561114011446267014723 0ustar hornikusersmsgid "" msgstr "" "Project-Id-Version: foreign 0.8-81\n" "POT-Creation-Date: 2021-02-12 09:19\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid "only one file" msgstr "" msgid "'file' must be character" msgstr "" msgid "internal error - illegal S code value" msgstr "" msgid "not an S object" msgstr "" msgid "S mode %s (near byte offset %s) not supported" msgstr "" msgid "Argument 'file' must be a character string or connection." msgstr "" msgid "Invalid attribute specification." msgstr "" msgid "Type 'relational' currently not implemented." msgstr "" msgid "Missing data section." msgstr "" msgid "Missing attribute section." msgstr "" msgid "Invalid type specification." msgstr "" msgid "Field name: %s changed to: %s" msgstr "" msgid "cannot handle matrix/array columns" msgstr "" msgid "character column %d will be truncated to %d bytes" msgstr "" msgid "unknown column type in data frame" msgstr "" msgid "NA in precision" msgstr "" msgid "NA in scale" msgstr "" msgid "cannot handle unknown type %s" msgstr "" msgid "'missing.type' only applicable to version >= 8 files" msgstr "" msgid "cannot read factor labels from Stata 5 files" msgstr "" msgid "value labels (%s) for %s are missing" msgstr "" msgid "The object \"dataframe\" must have class data.frame" msgstr "" msgid "Version must be 6-12" msgstr "" msgid "Version must be 6-12: using 7" msgstr "" msgid "cannot uniquely abbreviate variable names" msgstr "" msgid "abbreviating variable names" msgstr "" msgid "cannot handle multicolumn columns" msgstr "" msgid "argument 'file' must be a character string or connection" msgstr "" msgid "file has zero or fewer variables: probably not an EpiInfo file" msgstr "" msgid "no records in file" msgstr "" msgid "wrong number of records" msgstr "" msgid "sectionname %s not found" msgstr "" msgid "SAS return code was %d" msgstr "" msgid "re-encoding from %s" msgstr "" msgid "missingness type %s is not handled" msgstr "" msgid "Undeclared level(s)" msgstr "" msgid "," msgstr "" msgid "added in variable:" msgstr "" msgid "Duplicated levels in factor" msgstr "" msgid ":" msgstr "" msgid "I cannot abbreviate the variable names to 'maxchars' or fewer chars" msgstr "" msgid "some variable names were abbreviated" msgstr "" msgid "Cannot uniquely abbreviate the variable names to %d or fewer characters" msgstr "" msgid "Cannot uniquely abbreviate format names to conform to" msgstr "" msgid "eight-character limit and not ending in a digit" msgstr "" msgid "Some variable names were abbreviated or otherwise altered." msgstr "" msgid "data frame contains columns of unsupported class %s" msgid_plural "data frame contains columns of unsupported classes %s" msgstr[0] "" msgstr[1] "" foreign/po/R-pl.po0000644000175100001440000002431613262225142013516 0ustar hornikusersmsgid "" msgstr "" "Project-Id-Version: foreign 0.8-60\n" "Report-Msgid-Bugs-To: bugs@r-project.org\n" "POT-Creation-Date: 2018-04-07 21:21\n" "PO-Revision-Date: \n" "Last-Translator: Łukasz Daniel \n" "Language-Team: Łukasz Daniel \n" "Language: pl_PL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "na-Revision-Date: 2012-05-29 07:55+0100\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "X-Poedit-SourceCharset: iso-8859-1\n" "X-Generator: Poedit 1.5.4\n" # foreign/R/R_systat.R: 21 # stop("only one file") msgid "only one file" msgstr "tylko jeden plik" # foreign/R/R_systat.R: 22 # stop(gettextf("'%s' argument must be a character string", "file")) msgid "'file' must be character" msgstr "argument 'file' musi być łańcuchem tekstowym" # foreign/R/Sread.R: 125 # stop("internal error - illegal S code value") msgid "internal error - illegal S code value" msgstr "błąd wewnętrzny - niedozwolona wartość kodu S" # foreign/R/Sread.R: 130 # stop("not an S object") msgid "not an S object" msgstr "to nie jest obiekt S" # foreign/R/Sread.R: 208 # stop(gettextf("S mode %s (near byte offset %s) not supported", sQuote(code), seek(dump)), domain = "R-foreign") msgid "S mode %s (near byte offset %s) not supported" msgstr "Tryb S %s (obok przesunięcia bajtu %s) nie jest wspierany" # foreign/R/arff.R: 32 # stop(gettextf("'%s' argument must be a character string or connection", "file")) # foreign/R/arff.R: 108 # stop(gettextf("'%s' argument must be a character string or connection", "file")) # foreign/R/read.epiinfo.R: 29 # stop(gettextf("'%s' argument must be a character string or connection", "file")) msgid "Argument 'file' must be a character string or connection." msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem" # foreign/R/arff.R: 51 # stop("Invalid attribute specification.") msgid "Invalid attribute specification." msgstr "Niepoprawne określenie atrybutu." # foreign/R/arff.R: 61 # stop("Type 'relational' currently not implemented.") msgid "Type 'relational' currently not implemented." msgstr "Typ 'relational' na chwilę obecną nie jest zaimplementowany." # foreign/R/arff.R: 76 # stop("Missing data section.") msgid "Missing data section." msgstr "Brakuje sekcji z danymi." # foreign/R/arff.R: 78 # stop("Missing attribute section.") msgid "Missing attribute section." msgstr "Brakuje sekcji z atrybutami." # foreign/R/arff.R: 81 # stop("Invalid type specification.") msgid "Invalid type specification." msgstr "Błędne określenie typu." # foreign/R/dbf.R: 28 # message(gettextf("Field name: %s changed to: %s", sQuote(onames[i]), sQuote(inames[i])), domain = "R-foreign") msgid "Field name: %s changed to: %s" msgstr "Nazwa pola: %s została zamieniona na: %s" # foreign/R/dbf.R: 50 # stop("cannot handle matrix/array columns") msgid "cannot handle matrix/array columns" msgstr "nie można obsłużyć kolumn macierzy/tablicy" # foreign/R/dbf.R: 97 # warning(gettext("character column %d will be truncated to %d bytes", i, max_nchar), domain = "R-foreign") msgid "character column %d will be truncated to %d bytes" msgstr "kolumna tekstowa %d zostanie przycięta do %d bajtów" # foreign/R/dbf.R: 100 # stop("unknown column type in data frame") msgid "unknown column type in data frame" msgstr "nieznany typ kolumny w ramce danych" # foreign/R/dbf.R: 102 # stop("NA in precision") msgid "NA in precision" msgstr "wartość NA w precyzji" # foreign/R/dbf.R: 103 # stop("NA in scale") msgid "NA in scale" msgstr "wartość NA w skali" # foreign/R/octave.R: 169 # warning(gettextf("cannot handle unknown type %s", sQuote(type)), domain = "R-foreign") msgid "cannot handle unknown type %s" msgstr "nie można obsłużyć nieznanego typu %s" # foreign/R/read.dta.R: 60 # warning("'missing.type' only applicable to version >= 8 files") msgid "'missing.type' only applicable to version >= 8 files" msgstr "'missing.type' ma zastosowanie tylko dla plików w wersji>= 8" # foreign/R/read.dta.R: 72 # warning("cannot read factor labels from Stata 5 files") msgid "cannot read factor labels from Stata 5 files" msgstr "nie można odczytać etykiet czynnika z plików Stata 5" # foreign/R/read.dta.R: 80 # warning(gettextf("value labels (%s) for %s are missing", sQuote(ll[v]), sQuote(names(rval)[v])), domain = "R-foreign") msgid "value labels (%s) for %s are missing" msgstr "brakuje etykiet wartości (%s) dla %s" # foreign/R/read.dta.R: 110 # stop("The object \"dataframe\" must have class data.frame") msgid "The object \"dataframe\" must have class data.frame" msgstr "Obiekt \"dataframe\" musi posiadać klasę \"data.frame\"" # foreign/R/read.dta.R: 111 # stop("Version must be 6-12") msgid "Version must be 6-12" msgstr "Wersja musi wynosić 6-12" # foreign/R/read.dta.R: 116 # warning("Version must be 6-12: using 7") msgid "Version must be 6-12: using 7" msgstr "Wersja musi wynosić 6-12: używając 7" # foreign/R/read.dta.R: 127 # stop("cannot uniquely abbreviate variable names") msgid "cannot uniquely abbreviate variable names" msgstr "nie można skrócić nazw zmiennych w unikalny sposób" # foreign/R/read.dta.R: 129 # warning("abbreviating variable names") msgid "abbreviating variable names" msgstr "skracanie nazw zmiennych" # foreign/R/read.dta.R: 170 # stop("cannot handle multicolumn columns") msgid "cannot handle multicolumn columns" msgstr "nie można obsłużyć kolumn zawierających wiele kolumn" # foreign/R/arff.R: 32 # stop(gettextf("'%s' argument must be a character string or connection", "file")) # foreign/R/arff.R: 108 # stop(gettextf("'%s' argument must be a character string or connection", "file")) # foreign/R/read.epiinfo.R: 29 # stop(gettextf("'%s' argument must be a character string or connection", "file")) msgid "argument 'file' must be a character string or connection" msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem" # foreign/R/read.epiinfo.R: 37 # stop("file has zero or fewer variables: probably not an EpiInfo file") msgid "file has zero or fewer variables: probably not an EpiInfo file" msgstr "" "plik posiada zero lub mniej zmiennych: prawdopodobnie nie jest to plik " "EpiInfo" # foreign/R/read.epiinfo.R: 71 # stop("no records in file") msgid "no records in file" msgstr "brak rekordów w pliku" # foreign/R/read.epiinfo.R: 73 # warning("wrong number of records") msgid "wrong number of records" msgstr "nieprawidłowa liczba rekordów" # foreign/R/read.ssd.R: 61 # stop(gettextf("sectionname %s not found", sn[i]), domain = "R-foreign") msgid "sectionname %s not found" msgstr "nie znaleziono nazwy sekcji %s" # foreign/R/read.ssd.R: 111 # warning(gettextf("SAS return code was %d", sysret), domain = "R-foreign") msgid "SAS return code was %d" msgstr "kod zwrotny SAS wyniósł %d" # foreign/R/spss.R: 87 # message(gettextf("re-encoding from %s", cp), domain = "R-foreign") msgid "re-encoding from %s" msgstr "ponowne kodowanie z %s" # foreign/R/spss.R: 153 # warning(gettextf("missingness type %s is not handled", tp), domain = "R-foreign") msgid "missingness type %s is not handled" msgstr "typ braku danych %s nie jest obsługiwany" msgid "Undeclared level(s)" msgstr "" msgid "," msgstr "" msgid "added in variable:" msgstr "" msgid "Duplicated levels in factor" msgstr "" msgid ":" msgstr "" # foreign/R/writeForeignCode.R: 38 # stop("I cannot abbreviate the variable names to eight or fewer letters") #, fuzzy msgid "I cannot abbreviate the variable names to 'maxchars' or fewer chars" msgstr "Nie mogę skrócić nazw zmiennych do ośmiu lub mniej liter" # foreign/R/writeForeignCode.R: 40 # warning("some variable names were abbreviated") msgid "some variable names were abbreviated" msgstr "niektóre nazwy zmiennych zostały skrócone" # foreign/R/writeForeignSAS.R: 28 # stop(gettextf("Cannot uniquely abbreviate the variable names to %d or fewer characters", nmax), domain = "R-foreign") msgid "Cannot uniquely abbreviate the variable names to %d or fewer characters" msgstr "Nie można jednoznacznie skrócić nazw zmiennych do %d lub mniej znaków" # foreign/R/read.dta.R: 127 # stop("cannot uniquely abbreviate variable names") msgid "Cannot uniquely abbreviate format names to conform to" msgstr "Nie można jednoznacznie skrócić nazw formatów do" # foreign/R/writeForeignSAS.R: 40 # stop("Cannot uniquely abbreviate format names to conform to eight-character limit and not ending in a digit") msgid "eight-character limit and not ending in a digit" msgstr "ośmiu znaków nie kończących się cyfrą" # foreign/R/writeForeignSAS.R: 59 # message("Some variable names were abbreviated or otherwise altered.") msgid "Some variable names were abbreviated or otherwise altered." msgstr "Niektóre nazwy zmiennych zostały skrócone lub w inny sposób zmienione." # foreign/R/dbf.R: 55 # stop(sprintf(ngettext(length(cl0), # "data frame contains columns of unsupported class %s", # "data frame contains columns of unsupported classes %s", domain = "R-foreign"), # paste(dQuote(cl0), collapse = ", ")), domain = NA) msgid "data frame contains columns of unsupported class %s" msgid_plural "data frame contains columns of unsupported classes %s" msgstr[0] "ramka zawiera kolumny niewspieranej klasy %s" msgstr[1] "ramka zawiera kolumny niewspieranych klasach %s" msgstr[2] "ramka zawiera kolumny niewspieranych klasach %s" # foreign/R/writeForeignCode.R: 49 # stop("Cannot handle character variables longer than 255") #~ msgid "Cannot handle character variables longer than 255" #~ msgstr "Nie można obsłużyć zmiennych tekstowych dłuższych niż 255 znaków" #~ msgid "Argument is missing" #~ msgstr "Brakuje argumentu" #~ msgid "Unrecognized S mode %s is not supported" #~ msgstr "Nieznany tryb S %s nie jest wspierany" #~ msgid "Argument %s is missing" #~ msgstr "Brakuje argumentu %s" #~ msgid "SAS failed. SAS program at %s" #~ msgstr "SAS nie powiódł się. Program SAS w %s" #~ msgid "a log and other error products should be in the vicinity" #~ msgstr "" #~ "dziennik zdarzeń oraz inne produkty wystąpienia błędu powinny być w " #~ "pobliżu" #~ msgid "The log file will be %s in the current directory" #~ msgstr "Plik dziennika zdarzeń będzie %s w bieżącym katalogu" foreign/po/R-de.po0000644000175100001440000001250113641256174013476 0ustar hornikusers# Translation of src/library/foreign/po/R-foreign.pot to German # Copyright (C) 2005-2012 The R Foundation # This file is distributed under the same license as the foreign package. # Copyright (C) of this file 2009-2012 Chris Leick . # msgid "" msgstr "" "Project-Id-Version: R 4.0.0 / foreign 0.8-77\n" "Report-Msgid-Bugs-To: bugs@r-project.org\n" "POT-Creation-Date: 2018-04-07 21:21\n" "PO-Revision-Date: 2020-04-01 14:54+0200\n" "Last-Translator: Detlef Steuer \n" "Language-Team: r-core@r-project.org\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "only one file" msgstr "nur eine Datei" msgid "'file' must be character" msgstr "'file' muss ein Buchstabe sein." msgid "internal error - illegal S code value" msgstr "interner Fehler - unerlaubter S-Kodewert" msgid "not an S object" msgstr "kein S-Objekt" msgid "S mode %s (near byte offset %s) not supported" msgstr "S-Modus %s (bei Byte-Versatz %s) nicht unterstützt" msgid "Argument 'file' must be a character string or connection." msgstr "Argument 'file' muss eine Zeichenkette oder Verbindung sein." msgid "Invalid attribute specification." msgstr "ungültige Attributsangabe" msgid "Type 'relational' currently not implemented." msgstr "Typ 'relational' derzeit nicht implementiert" msgid "Missing data section." msgstr "fehlender Datenbereich" msgid "Missing attribute section." msgstr "fehlender Attributsbereich" msgid "Invalid type specification." msgstr "ungültige Typangabe" msgid "Field name: %s changed to: %s" msgstr "Feldname: %s geändert zu: %s" msgid "cannot handle matrix/array columns" msgstr "Matrix-/Arrayspalten können nicht gehandhabt werden" msgid "character column %d will be truncated to %d bytes" msgstr "Zeichenspalte %d wird auf %d Bytes gekürzt" msgid "unknown column type in data frame" msgstr "unbekannter Spaltentyp im Dataframe" msgid "NA in precision" msgstr "NA in Genauigkeit" msgid "NA in scale" msgstr "NA in Skala" msgid "cannot handle unknown type %s" msgstr "unbekannter Typ %s kann nicht gehandhabt werden" msgid "'missing.type' only applicable to version >= 8 files" msgstr "'missing.type' nur auf Dateien der Version >=8 anwendbar" msgid "cannot read factor labels from Stata 5 files" msgstr "Faktorbeschriftungen von Stata-5-Dateien können nicht gelesen werden" msgid "value labels (%s) for %s are missing" msgstr "Wertbeschriftungen (%s) für %s fehlen" msgid "The object \"dataframe\" must have class data.frame" msgstr "Das Objekt 'dataframe' muss die Klasse 'data.frame' haben" msgid "Version must be 6-12" msgstr "Version muss 6-12 sein" msgid "Version must be 6-12: using 7" msgstr "Version muss 6-12 sein: 7 wird benutzt" msgid "cannot uniquely abbreviate variable names" msgstr "Variablennamen können nicht eindeutig abgekürzt werden" msgid "abbreviating variable names" msgstr "Variablennamen werden abgekürzt" msgid "cannot handle multicolumn columns" msgstr "mehrspaltige Spalten können nicht gehandhabt werden" msgid "argument 'file' must be a character string or connection" msgstr "Argument 'file' muss eine Zeichenkette oder Verbindung sein" msgid "file has zero or fewer variables: probably not an EpiInfo file" msgstr "" "Datei hat null oder weniger Variablen: Vermutlich ist es keine EpiInfo-Datei" msgid "no records in file" msgstr "Keine Datensätze in Datei" msgid "wrong number of records" msgstr "falsche Anzahl von Datensätzen" msgid "sectionname %s not found" msgstr "Bereichsname %s nicht gefunden" msgid "SAS return code was %d" msgstr "SAS-Rückgabewert war %d" msgid "re-encoding from %s" msgstr "Zurückkodierung von %s" # http://en.wiktionary.org/wiki/missingness msgid "missingness type %s is not handled" msgstr "'missingness'-Typ %s wird nicht verarbeitet" msgid "Undeclared level(s)" msgstr "Nichtdeklarierte Factorstufe(n)" msgid "," msgstr "," msgid "added in variable:" msgstr "hinzugefügt in Variable:" msgid "Duplicated levels in factor" msgstr "Doppelte Faktorstufen in Faktor" msgid ":" msgstr ":" msgid "I cannot abbreviate the variable names to 'maxchars' or fewer chars" msgstr "Die Variablennamen können nicht auf 'maxchar' oder weniger Zeichen abgekürzt werden" msgid "some variable names were abbreviated" msgstr "einige Variablennamen wurden abgekürzt" msgid "Cannot uniquely abbreviate the variable names to %d or fewer characters" msgstr "" "Variablennamen können nicht eindeutig auf %d oder weniger Zeichen abgekürzt " "werden auf" msgid "Cannot uniquely abbreviate format names to conform to" msgstr "Variablennamen können nicht eindeutig abgekürzt werden auf" msgid "eight-character limit and not ending in a digit" msgstr "Acht-Zeichen-Begrenzung und nicht in einer Ziffer enden" msgid "Some variable names were abbreviated or otherwise altered." msgstr "Einige Variablennamen wurden abgekürzt oder anders verändert." msgid "data frame contains columns of unsupported class %s" msgid_plural "data frame contains columns of unsupported classes %s" msgstr[0] "Dataframe enthält Spalten der nicht unterstützen Klasse %s" msgstr[1] "Dataframe enthält Spalten der nicht unterstützen Klassen %s" #~ msgid "Cannot handle character variables longer than 255" #~ msgstr "" #~ "Zeichenvariablen, die länger als 255 sind, können nicht gehandhabt werden" foreign/po/R-it.po0000644000175100001440000001242313651251161013515 0ustar hornikusers# R Italian translation # Copyright (C) The R Foundation # This file is distributed under the same license as the R package. # Daniele Medri , 2005-2020. # msgid "" msgstr "" "Project-Id-Version: R-foreign 0.8-70\n" "Report-Msgid-Bugs-To: bugs.r-project.org\n" "POT-Creation-Date: 2020-04-26 10:14\n" "PO-Revision-Date: \n" "Last-Translator: Daniele Medri \n" "Language-Team: Italian https://github.com/dmedri/R-italian-lang\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.2.1\n" msgid "only one file" msgstr "solo un file" msgid "'file' must be character" msgstr "'file' dev'essere di tipo character" msgid "internal error - illegal S code value" msgstr "errore interno - valore del codice S illegale" msgid "not an S object" msgstr "non è un oggetto S" msgid "S mode %s (near byte offset %s) not supported" msgstr "Modalità S %s (byte offset vicino %s) non supportato" msgid "Argument 'file' must be a character string or connection." msgstr "" "L'argomento 'file' dev'essere una stringa di caratteri o una connessione." msgid "Invalid attribute specification." msgstr "Specificazione attributo non valido." msgid "Type 'relational' currently not implemented." msgstr "Il tipo 'relational' non è attualmente implementato." msgid "Missing data section." msgstr "Sezione dati mancante." msgid "Missing attribute section." msgstr "Sezione attributo mancante." msgid "Invalid type specification." msgstr "Specificazione tipo non valido." msgid "Field name: %s changed to: %s" msgstr "Nome campo: %s cambiato in: %s" msgid "cannot handle matrix/array columns" msgstr "non è possibile gestire le colonne della matrice/array" msgid "character column %d will be truncated to %d bytes" msgstr "la colonna di caratteri %d sarà troncata a %d byte" msgid "unknown column type in data frame" msgstr "tipo di colonna sconosciuto nel data frame" msgid "NA in precision" msgstr "NA in precisione" msgid "NA in scale" msgstr "NA in scala" msgid "cannot handle unknown type %s" msgstr "non è possibile gestire il tipo sconosciuto %s" msgid "'missing.type' only applicable to version >= 8 files" msgstr "'missing.type' applicabile unicamente alla versione >= 8 file" msgid "cannot read factor labels from Stata 5 files" msgstr "non è possibile leggere le etichette del fattore dai file Stata 5" msgid "value labels (%s) for %s are missing" msgstr "le etichette valore (%s) per %s sono mancanti" msgid "The object \"dataframe\" must have class data.frame" msgstr "L'oggetto \"dataframe\" dev'essere di classe data.frame" msgid "Version must be 6-12" msgstr "La versione dev'essere 6-12" msgid "Version must be 6-12: using 7" msgstr "La versione dev'essere 6-12: si utilizza la 7" msgid "cannot uniquely abbreviate variable names" msgstr "non è possibile abbreviare in maniera univoca i nomi delle variabili" msgid "abbreviating variable names" msgstr "abbreviazione dei nomi delle variabili" msgid "cannot handle multicolumn columns" msgstr "non è possibile gestire le colonne multiple" msgid "argument 'file' must be a character string or connection" msgstr "" "l'argomento 'file' dev'essere una stringa di caratteri o una connessione" msgid "file has zero or fewer variables: probably not an EpiInfo file" msgstr "il file ha zero o poche variabili: probabilmente non è un file Epilnfo" msgid "no records in file" msgstr "nessun record nel file" msgid "wrong number of records" msgstr "numero sbagliato di record" msgid "sectionname %s not found" msgstr "sectionname %s non trovato" msgid "SAS return code was %d" msgstr "Il codice restituito da SAS era %d" msgid "re-encoding from %s" msgstr "ri-codifica da %s" msgid "missingness type %s is not handled" msgstr "il tipo di mancanza %s non è gestito" msgid "Undeclared level(s)" msgstr "Livelli non dichiarati" msgid "," msgstr "," msgid "added in variable:" msgstr "aggiunto nella variabile:" msgid "Duplicated levels in factor" msgstr "Livelli duplicati nel fattore" msgid ":" msgstr ":" msgid "I cannot abbreviate the variable names to 'maxchars' or fewer chars" msgstr "" "Non è possibile abbreviare i nomi delle variabili a 'maxchars' o un numero " "di caratteri inferiore" msgid "some variable names were abbreviated" msgstr "alcuni nomi variabile erano abbreviati" msgid "Cannot uniquely abbreviate the variable names to %d or fewer characters" msgstr "" "Non è possibile abbreviare in maniera univoca i nomi delle variabili a %d " "caratteri o meno" msgid "Cannot uniquely abbreviate format names to conform to" msgstr "" "Non è possibile abbreviare univocamente i nomi dei formati a cui conformarsi" msgid "eight-character limit and not ending in a digit" msgstr "limite di otto caratteri e niente termine in una cifra" msgid "Some variable names were abbreviated or otherwise altered." msgstr "Alcuni nomi di variabili saranno abbreviati o alterati in altro modo." msgid "data frame contains columns of unsupported class %s" msgid_plural "data frame contains columns of unsupported classes %s" msgstr[0] "il data frame contiene colonne della classe %s non supportata" msgstr[1] "il data frame contiene colonne delle classi %s non supportate" foreign/po/R-fr.po0000644000175100001440000001377014007533200013507 0ustar hornikusers# Translation of R-foreign.pot to French # Copyright (C) 2005 The R Foundation # This file is distributed under the same license as the foreign R package. # Philippe Grosjean , 2005. # msgid "" msgstr "" "Project-Id-Version: foreign 0.8-10\n" "Report-Msgid-Bugs-To: bugs@r-project.org\n" "POT-Creation-Date: 2018-04-07 21:21\n" "PO-Revision-Date: 2021-02-06 16:32+0100\n" "Last-Translator: Philippe Grosjean \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.4.2\n" msgid "only one file" msgstr "seulement un fichier" msgid "'file' must be character" msgstr "'file' doit être une chaîne de caractères" msgid "internal error - illegal S code value" msgstr "erreur interne - valeur de code S incorrecte" msgid "not an S object" msgstr "ceci n'est pas un objet S" msgid "S mode %s (near byte offset %s) not supported" msgstr "Mode S %s (dans les environs du décalage d'octet %s) non supporté" msgid "Argument 'file' must be a character string or connection." msgstr "L’argument 'file' doit être une chaîne de caractères ou une connexion" msgid "Invalid attribute specification." msgstr "Spécification d'attribut incorrect." msgid "Type 'relational' currently not implemented." msgstr "Type 'relational' non encore implémenté." msgid "Missing data section." msgstr "Section 'data' manquante." msgid "Missing attribute section." msgstr "Section 'attribute' manquante." msgid "Invalid type specification." msgstr "Spécification de type incorrect." msgid "Field name: %s changed to: %s" msgstr "Nom de champ : %s modifié en : %s" msgid "cannot handle matrix/array columns" msgstr "impossible de traiter les colonnes de la matrice/du tableau" msgid "character column %d will be truncated to %d bytes" msgstr "la colonne de chaîne de caractères %d sera tronquée à %d octets" msgid "unknown column type in data frame" msgstr "type inconnu pour une colonne dans le tableau de données" msgid "NA in precision" msgstr "NA dans précision" msgid "NA in scale" msgstr "NA dans scale" msgid "cannot handle unknown type %s" msgstr "impossible de traiter un type inconnu %s" msgid "'missing.type' only applicable to version >= 8 files" msgstr "'missing.type' est seulement applicable pour des fichiers version >= 8" msgid "cannot read factor labels from Stata 5 files" msgstr "impossible de lire les étiquettes des variables facteur depuis les fichiers Stata 5" msgid "value labels (%s) for %s are missing" msgstr "valeurs de libellé (%s) manquantes pour %s" msgid "The object \"dataframe\" must have class data.frame" msgstr "L'objet \"" msgid "Version must be 6-12" msgstr "La version doit être 6-12" msgid "Version must be 6-12: using 7" msgstr "La version doit être 6-12 : la version 7 est utilisée" msgid "cannot uniquely abbreviate variable names" msgstr "impossible d'abbréger de manière unique les noms de variables" msgid "abbreviating variable names" msgstr "abbréviation des noms de variables" msgid "cannot handle multicolumn columns" msgstr "impossible de traiter des colonnes de type 'multicolumn'" msgid "argument 'file' must be a character string or connection" msgstr "l'argument 'file' doit être une chaîne de caractères ou une connexion" msgid "file has zero or fewer variables: probably not an EpiInfo file" msgstr "le fichier aurait zéro variables ou moins : ce n'est probablement pas un fichier EpiInfo" msgid "no records in file" msgstr "aucun enregistrement dans le fichier" msgid "wrong number of records" msgstr "nombre d'enregistrements incorrect" msgid "sectionname %s not found" msgstr "nom de section %s non trouvée" msgid "SAS return code was %d" msgstr "Le code renvoyé par SAS est %d" msgid "re-encoding from %s" msgstr "réencodage depuis %s" msgid "missingness type %s is not handled" msgstr "type de valeur manquante %s non pris en compte" msgid "Undeclared level(s)" msgstr "Niveau(x) non déclaré(s)" msgid "," msgstr "," msgid "added in variable:" msgstr "ajouté dans la variable :" msgid "Duplicated levels in factor" msgstr "Niveaux dupliqués dans la variable qualitative" msgid ":" msgstr ":" msgid "I cannot abbreviate the variable names to 'maxchars' or fewer chars" msgstr "Impossible d'abbréger les noms de variables à 'maxchars' lettres au maximum" msgid "some variable names were abbreviated" msgstr "quelques noms de variables ont été abbrégées" msgid "Cannot uniquely abbreviate the variable names to %d or fewer characters" msgstr "Impossible d'abbréger de manière unique les noms de variables vers %d ou moins de caractères" msgid "Cannot uniquely abbreviate format names to conform to" msgstr "Impossible d'abbréger de manière unique les noms de format pour se conformer à" msgid "eight-character limit and not ending in a digit" msgstr "limite de 8 caractères et sans terminer par un chiffre" msgid "Some variable names were abbreviated or otherwise altered." msgstr "Quelques noms de variables on été abbrégées ou altérées." msgid "data frame contains columns of unsupported class %s" msgid_plural "data frame contains columns of unsupported classes %s" msgstr[0] "le tableau de données contient des colonnes de classe non supportée %s" msgstr[1] "le tableau de données contient des colonnes de classes non supportées %s" #~ msgid "Cannot handle character variables longer than 255" #~ msgstr "Les chaînes de caractères plus longues que 255 ne sont pas prises en compte" #~ msgid "S mode" #~ msgstr "mode S" #~ msgid "(near byte offset" #~ msgstr "(decalage 'near byte'" #~ msgid ") not supported" #~ msgstr ") non support?" #~ msgid "Field name:" #~ msgstr "Nom de champ :" #~ msgid "changed to:" #~ msgstr "chang? en :" #~ msgid "value labels (" #~ msgstr "les ?tiquettes de valeur (" #~ msgid ") for" #~ msgstr ") pour" #~ msgid "are missing" #~ msgstr "sont manquantes" #~ msgid "or fewer characters" #~ msgstr "ou moins de caract?res" foreign/po/de.po0000644000175100001440000006666114011446267013313 0ustar hornikusers# Translation of src/library/Recommended/foreign/po/foreign.pot to German # Copyright (C) 2005-2012 The R Foundation # This file is distributed under the same license as the foreign package. # Copyright (C) of this file 2009-2012 Chris Leick . # msgid "" msgstr "" "Project-Id-Version: R 4.0.0 / foreign 0.8-77\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-12 09:19+0000\n" "PO-Revision-Date: 2020-04-01 14:54+0200\n" "Last-Translator: Detlef Steuer \n" "Language-Team: r-core@r-project.org\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: R_systat.c:131 #, c-format msgid "not a rectangular data file (%s mtype is %d)" msgstr "keine rechteckige Daten-Datei (%s mtype ist %d)" #: R_systat.c:137 msgid "mismatch in numbers of variables" msgstr "keine Übereinstimmung bei Variablenanzahl" #: R_systat.c:173 R_systat.c:684 R_systat.c:689 R_systat.c:695 R_systat.c:698 #: R_systat.c:717 R_systat.c:737 msgid "file access error" msgstr "Dateizugriffsfehler" #: R_systat.c:236 #, c-format msgid "cannot open file '%s'" msgstr "Datei '%s' kann nicht geöffnet werden" #: R_systat.c:256 msgid "getuse: Failure in variable unpacking" msgstr "getuse: Misserfolg beim Variablenentpacken" #: R_systat.c:258 R_systat.c:270 R_systat.c:273 R_systat.c:323 R_systat.c:329 #: R_systat.c:338 msgid "getuse: File access error" msgstr "getuse: Dateizugriffsfehler" #: R_systat.c:319 #, c-format msgid "getuse: byte counter %o octal" msgstr "getuse: Byte-Zähler %o oktal" #: R_systat.c:340 msgid "getuse: terminal null block" msgstr "getuse: Terminal-Nullblock" #: R_systat.c:352 msgid "getuse: non-integer number of observations" msgstr "getuse: nicht ganzzahlige Anzahl der Beobachtungen" #: R_systat.c:413 msgid "getlab: File format unknown" msgstr "getlab: Dateiformat unbekannt" #: R_systat.c:417 R_systat.c:431 R_systat.c:433 R_systat.c:435 R_systat.c:482 #: R_systat.c:484 R_systat.c:486 R_systat.c:509 msgid "getlab: File access error" msgstr "getlab: Dateizugriffsfehler" #: R_systat.c:421 #, c-format msgid "getlab: byte 0 = %o octal" msgstr "getlab: Byte 0 = %o oktal" #: R_systat.c:425 #, c-format msgid "getlab: byte 1 = %o octal" msgstr "getlab: Byte 1 = %o oktal" #: R_systat.c:437 #, c-format msgid "getlab: byte 9 = %o octal" msgstr "getlab: Byte 9 = %o oktal" #: R_systat.c:448 #, c-format msgid "getlab: comment begin byte = %o" msgstr "getlab: Kommentaranfangs-Byte = %o" #: R_systat.c:454 #, c-format msgid "getlab: comment = %c" msgstr "getlab: Kommentar = %c" #: R_systat.c:459 #, c-format msgid "getlab: comment end byte = %o" msgstr "getlab: Kommentarende-Byte = %o" #: R_systat.c:477 #, c-format msgid "getlab: byte nv0 = %o octal" msgstr "getlab: Byte nv0 = %o oktal" #: R_systat.c:488 #, c-format msgid "getlab: byte nv$ = %o octal" msgstr "getlab: Byte nv$ = %o oktal" #: R_systat.c:496 msgid "file has more variables than this function can read" msgstr "Datei hat mehr Variablen, als diese Funktion lesen kann" #: R_systat.c:503 #, c-format msgid "getlab: byte lab[%d]0 = %o, nv=%d" msgstr "getlab: Byte lab[%d]0 = %o, nv=%d " #: R_systat.c:516 #, c-format msgid "$ not in variable label column 9: %s" msgstr "$ nicht in Variablenbeschriftungsspalte 9: %s" #: R_systat.c:536 #, c-format msgid "getlab: byte lab[%d]$ = %o octal" msgstr "getlab: Byte lab[%d]$ = %o oktal" #: R_systat.c:714 msgid "string variable" msgstr "Zeichenkettenvariable" #: Rdbfread.c:56 msgid "unable to open DBF file" msgstr "DBF-Datei kann nicht geöffnet werden" #: Rdbfread.c:64 msgid "no fields in DBF table" msgstr "keine Felder in DBF-Tabelle" #: Rdbfread.c:193 #, c-format msgid "value |%d| found in logical field" msgstr "Wert |%d| in logischem Feld gefunden" #: Rdbfwrite.c:50 SASxport.c:510 SASxport.c:607 msgid "first argument must be a file name" msgstr "erstes Argument muss ein Dateiname sein" #: Rdbfwrite.c:53 msgid "unable to open file" msgstr "Datei kann nicht geöffnet werden" #: Rdbfwrite.c:97 Rdbfwrite.c:135 stataread.c:304 stataread.c:325 #: stataread.c:816 stataread.c:846 msgid "unknown data type" msgstr "unbekannter Datentyp" #: SASxport.c:90 msgid "invalid field length in numeric variable" msgstr "ungültige Feldlänge in numerischer Variable" #: SASxport.c:152 SASxport.c:188 SASxport.c:233 SASxport.c:259 SASxport.c:303 #: SASxport.c:311 msgid "file not in SAS transfer format" msgstr "Datei nicht im SAS-Übertragungsformat" #: SASxport.c:225 SASxport.c:293 msgid "SAS transfer file has incorrect library header" msgstr "SAS-Übertragungsdatei hat falsche Bibliotheks-Header" #: SASxport.c:251 msgid "SAS transfer file has incorrect member header" msgstr "SAS-Übertragungsdatei hat falsche Element-Header" #: SASxport.c:364 SASxport.c:405 SASxport.c:411 msgid "problem accessing SAS XPORT file" msgstr "Problem beim Zugriff auf SAS-XPORT-Datei" #: SASxport.c:513 SASxport.c:610 spss.c:670 stataread.c:592 #, c-format msgid "unable to open file: '%s'" msgstr "Datei kann nicht geöffnet werden: '%s'" #: SASxport.c:612 #, c-format msgid "problem reading SAS XPORT file '%s'" msgstr "Problem beim Lesen der SAS-XPORT-Datei '%s'" #: SASxport.c:641 msgid "problem reading SAS transport file" msgstr "Problem beim Lesen der SAS-Transportdatei" #: file-handle.c:115 #, c-format msgid "file handle `%s' has not been previously declared on FILE HANDLE" msgstr "" "Dateiidentifikator '%s' wurde vorher nicht als 'FILE HANDLE' deklariert" #: format.c:108 #, c-format msgid "format %s may not be used as an input format" msgstr "Format %s kann möglicherweise nicht als Eingabeformat benutzt werden" #: format.c:113 #, c-format msgid "" "input format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "Eingabeformat %s gibt eine falsche Breite %d an. Format %s benötigt eine " "Breite zwischen %d und %d" #: format.c:119 #, c-format msgid "" "input format %s specifies an odd width %d, but format %s requires an even " "width between %d and %d" msgstr "" "Eingabeformat %s gibt eine ungerade Breite %d an, aber das Format %s " "benötigt eine gerade Breite zwischen %d und %d" #: format.c:125 #, c-format msgid "" "Input format %s specifies a bad number of implied decimal places %d. Input " "format %s allows up to 16 implied decimal places" msgstr "" "Eingabeformat %s gibt eine falsche Zahl von %d impliziten Dezimalstellen an. " "Eingabeformat %s erlaubt bis zu 16 implizite Dezimalstellen" #: format.c:144 #, c-format msgid "" "output format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "Ausgabeformat %s gibt eine falsche Breite %d an. Format %s benötigt eine " "Breite zwischen %d und %d" #: format.c:153 #, c-format msgid "" "output format %s requires minimum width %d to allow %d decimal places. Try " "%s%d.%d instead of %s" msgstr "" "Ausgabeformat %s benötigt eine Mindestbreite %d, um %d Dezimalstellen zu " "erlauben. Versuchen Sie %s%d.%d anstelle von %s" #: format.c:160 #, c-format msgid "" "output format %s specifies an odd width %d, but output format %s requires an " "even width between %d and %d" msgstr "" "Ausgabeformat %s gibt eine ungerade Breite %d an, aber das Ausgabeformat %s " "benötigt eine gerade Breite zwischen %d und %d" #: format.c:166 #, c-format msgid "" "Output format %s specifies a bad number of implied decimal places %d. " "Output format %s allows a number of implied decimal places between 1 and 16" msgstr "" "Ausgabeformat %s gibt eine falsche Zahl von %d impliziten Dezimalstellen an. " "Ausgabeformat %s erlaubt zwischen 1 und 16 implizite Dezimalstellen" #: format.c:181 #, c-format msgid "cannot display a string variable of width %d with format specifier %s" msgstr "" "eine Zeichenkettenvariable der Breite %d mit dem Formatkennzeichner %s kann " "nicht angezeigt werden" #: minitab.c:92 minitab.c:158 msgid "non-numeric data types are not yet implemented" msgstr "Nicht numerische Datentypen sind noch nicht implementiert" #: minitab.c:119 #, c-format msgid "unable to open file '%s': '%s'" msgstr "Datei '%s' kann nicht geöffnet werden: '%s'" #: minitab.c:123 #, c-format msgid "file '%s' is not in Minitab Portable Worksheet format" msgstr "Datei '%s' ist nicht im Minitab-Portable-Worksheet-Format" #: minitab.c:126 minitab.c:147 minitab.c:155 minitab.c:162 msgid "file read error" msgstr "Dateilesefehler" #: minitab.c:139 #, c-format msgid "first record for entry %d is corrupt" msgstr "Erster Datensatz für Eintrag %d ist beschädigt" #: pfm-read.c:117 #, c-format msgid "%s: Closing portable file: %s" msgstr "%s: Portierbare Datei wird geschlossen: %s" #: pfm-read.c:138 msgid "Unexpected end of file" msgstr "Unerwartetes Ende der Datei" #: pfm-read.c:146 msgid "Bad line end" msgstr "Falsches Zeilenende" #: pfm-read.c:227 #, c-format msgid "cannot read file %s as portable file: already opened for %s" msgstr "" "Datei %s kann nicht als portierbare Datei gelesen werden: Bereits für %s " "geöffnet" #: pfm-read.c:243 #, c-format msgid "" "an error occurred while opening \"%s\" for reading as a portable file: %s" msgstr "" "beim Öffnen von '%s' zum Lesen als eine portierbare Datei ist ein Fehler " "aufgetreten: %s" #: pfm-read.c:275 msgid "Data record expected" msgstr "Datensatz erwartet" #: pfm-read.c:295 msgid "error reading portable-file dictionary" msgstr "Fehler beim Lesen des portierbaren Dateiwörterbuchs" #: pfm-read.c:358 msgid "Number expected" msgstr "Nummer erwartet" #: pfm-read.c:386 msgid "Missing numeric terminator" msgstr "Fehlendes numerisches Endezeichen" #: pfm-read.c:423 msgid "Bad integer format" msgstr "Falsches Ganzzahlformat" #: pfm-read.c:453 #, c-format msgid "Bad string length %d" msgstr "Falsche Zeichenkettenlänge %d" #: pfm-read.c:523 msgid "Missing SPSSPORT signature" msgstr "SPSSPORT-Signatur fehlt" #: pfm-read.c:541 #, c-format msgid "Unrecognized version code %d" msgstr "Nicht erkannter Versionskode %d" #: pfm-read.c:552 #, c-format msgid "Bad date string length %d" msgstr "Falsche Datums-Zeichenkettenlänge %d" #: pfm-read.c:559 msgid "Bad character in date" msgstr "Falsches Zeichen im Datum" #: pfm-read.c:579 #, c-format msgid "Bad time string length %d" msgstr "Falsche Zeit-Zeichenkettenlänge %d" #: pfm-read.c:586 msgid "Bad character in time" msgstr "Falsches Zeichen in Zeit" #: pfm-read.c:640 #, c-format msgid "%s: Bad format specifier byte %d" msgstr "%s: Falsches Formatkennzeichner-Byte %d" #: pfm-read.c:649 sfm-read.c:1157 sfm-read.c:1167 #, c-format msgid "%s: Bad format specifier byte (%d)" msgstr "%s: Falsches Formatkennzeichner-Byte (%d)" #: pfm-read.c:651 #, c-format msgid "%s variable %s has %s format specifier %s" msgstr "%s Variable %s hat %s Formatkennzeichner %s" #: pfm-read.c:690 msgid "Expected variable count record" msgstr "Variablenanzahl-Datensatz erwartet" #: pfm-read.c:694 #, c-format msgid "Invalid number of variables %d" msgstr "ungültige Zahl von Variablen %d" #: pfm-read.c:730 msgid "Expected variable record" msgstr "Variablendatensatz erwartet" #: pfm-read.c:736 #, c-format msgid "Invalid variable width %d" msgstr "ungültige Variablenbreite %d" #: pfm-read.c:754 #, c-format msgid "position %d: Variable name has %u characters" msgstr "Position %d: Variablenname hat %u Zeichen" #: pfm-read.c:758 #, c-format msgid "position %d: Variable name begins with invalid character" msgstr "Position %d: Variablenname beginnt mit ungültigem Zeichen" # http://www.korrekturen.de/wortliste/klein_schreiben.shtml #: pfm-read.c:762 #, c-format msgid "position %d: Variable name begins with lowercase letter %c" msgstr "" "Position %d: Variablenname beginnt mit kleingeschriebenem Buchstaben %c" #: pfm-read.c:774 #, c-format msgid "position %d: Variable name character %d is lowercase letter %c" msgstr "" "Position %d: Variablennamenszeichen %d ist kleingeschriebener Buchstabe %c" #: pfm-read.c:783 #, c-format msgid "position %d: character `\\%03o' is not valid in a variable name" msgstr "Position %d: Zeichen '\\%03o' ist in einem Variablennamen nicht gültig" #: pfm-read.c:789 #, c-format msgid "Bad width %d for variable %s" msgstr "Falsche Breite %d für Variable %s" #: pfm-read.c:795 #, c-format msgid "Duplicate variable name %s" msgstr "Doppelter Variablenname %s" #: pfm-read.c:839 #, c-format msgid "Bad missing values for %s" msgstr "Falsche fehlende Werte für %s" #: pfm-read.c:862 #, c-format msgid "Weighting variable %s not present in dictionary" msgstr "Gewichtungsvariable %s ist nicht im Wörterbuch enthalten" #: pfm-read.c:932 #, c-format msgid "Unknown variable %s while parsing value labels" msgstr "Unbekannte Variable %s bei der Syntaxanalyse der Wertbeschriftungen" #: pfm-read.c:935 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types " "or widths" msgstr "" "Wertbeschriftungen, die unterschiedliche Variablentypen oder Breiten haben, " "können nicht zu %s und %s zugeordnet werden" #: pfm-read.c:981 #, c-format msgid "Duplicate label for value %g for variable %s" msgstr "Doppelte Beschriftung für Wert %g der Variable %s" #: pfm-read.c:984 #, c-format msgid "Duplicate label for value `%.*s' for variable %s" msgstr "Doppelte Beschriftung für Wert '%.*s' der Variable %s" # CHECKME #: pfm-read.c:1072 msgid "End of file midway through case" msgstr "Ende der Datei mitten im Fall" #: sfm-read.c:168 #, c-format msgid "%s: Closing system file: %s" msgstr "%s: Systemdatei wird geschlossen: %s" #: sfm-read.c:299 #, c-format msgid "cannot read file %s as system file: already opened for %s" msgstr "" "Datei %s kann nicht als Systemdatei gelesen werden: Bereits für %s geöffnet" #: sfm-read.c:314 #, c-format msgid "An error occurred while opening '%s' for reading as a system file: %s" msgstr "" "Beim Öffnen von '%s' zum Lesen als eine Systemdatei ist ein Fehler " "aufgetreten: %s" #: sfm-read.c:345 #, c-format msgid "" "%s: Weighting variable may not be a continuation of a long string variable" msgstr "" "%s: Gewichtungsvariable ist möglicherweise keine Fortsetzung einer langen " "Zeichenkettenvariable" #: sfm-read.c:347 #, c-format msgid "%s: Weighting variable may not be a string variable" msgstr "%s: Gewichtungsvariable ist möglicherweise keine Zeichenkettenvariable" #: sfm-read.c:372 #, c-format msgid "" "%s: Orphaned variable index record (type 4). Type 4 records must always " "immediately follow type 3 records" msgstr "" "%s: Verwaister Variablenindex-Datensatz (Typ 4). Typ-4-Datensätze müssen " "immer unmittelbar auf Typ-3-Datensätze folgen" #: sfm-read.c:452 #, c-format msgid "" "%s: Very long string record(s) found (record type 7, subtype %d), each will " "be imported in consecutive separate variables" msgstr "" "%s: Sehr lange(e) Zeichenketteneinträge gefunden (record Typ 7, Subtyp %d), " "jeder\n" "wird in aufeinanderfolgende, einzelne Variablen importiert" #: sfm-read.c:477 #, c-format msgid "" "%s: Long string value labels record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s: Langer Eintrag mit Zeichenkettenlabels gefunden (record Typ 7, Subtyp " "%d), aber\n" "ignoriert" #: sfm-read.c:482 #, c-format msgid "" "%s: Long string missing values record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s: Langer Eintrag mit Zeichenkette für fehlenden Wert gefunden (record Typ " "7, Subtyp %d), aber ignoriert" #: sfm-read.c:491 #, c-format msgid "%s: Unrecognized record type 7, subtype %d encountered in system file" msgstr "%s: Unerkannter Datensatztyp 7, Untertyp %d in Systemdatei vorgefunden" #: sfm-read.c:514 #, c-format msgid "%s: Unrecognized record type %d" msgstr "%s: Unerkannter Datensatztyp %d" #: sfm-read.c:538 msgid "error reading system-file header" msgstr "Fehler beim Lesen des Systemdatei-Headers" #: sfm-read.c:554 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected " "size %d, count 8" msgstr "" "%s: Falsches Größen-(%d)- oder Anzahl-(%d)-Feld auf Datensatztyp 7, Untertyp " "3.\tErwartete Größe %d, Anzahl 8" # http://de.wikipedia.org/wiki/IEEE_754 #: sfm-read.c:567 #, c-format msgid "" "%s: Floating-point representation in system file is not IEEE-754. read.spss " "cannot convert between floating-point formats" msgstr "" "%s: Gleitkommadarstellung in Systemdatei entspricht nicht IEEE-754. read." "spss kann nicht zwischen Gleitkommaformaten konvertieren" #: sfm-read.c:586 #, c-format msgid "" "%s: File-indicated endianness (%s) does not match endianness intuited from " "file header (%s)" msgstr "" "%s: Durch Datei angegebene Byte-Reihenfolge (%s) entspricht nicht der vom " "Dateikopf vorgesehenen Byte-Reihenfolge (%s)" #: sfm-read.c:598 #, c-format msgid "%s: File-indicated character representation code (%s) is not ASCII" msgstr "" "%s: Durch Datei angegebener Zeichendarstellungskode (%s) ist nicht ASCII" #: sfm-read.c:603 #, c-format msgid "%s: File-indicated character representation code (%d) is unknown" msgstr "%s: Durch Datei angegebener Zeichendarstellungskode (%d) ist unbekannt" #: sfm-read.c:621 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected " "size %d, count 8" msgstr "" "%s: Falsches Größen-(%d)- oder Anzahl-(%d)-Feld auf Datensatztyp 7, Untertyp " "4.\tErwartete Größe %d, Anzahl 8" #: sfm-read.c:635 #, c-format msgid "" "%s: File-indicated value is different from internal value for at least one " "of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, " "%g; LOWEST: %g, %g" msgstr "" "%s: Durch Datei angegebener Wert unterscheidet sich vom internen Wert für " "mindestens einen von drei Systemwerten. SYSMIS: Angegeben %g, erwartet %g; " "HIGHEST: %g, %g; LOWEST: %g, %g" #: sfm-read.c:745 #, c-format msgid "" "%s: Bad magic. Proper system files begin with the four characters `$FL2'. " "This file will not be read" msgstr "" "%s: Falsche 'magic'. Ordnungsgemäße Systemdateien beginnen mit den vier " "Zeichen '$FL2'. Diese Datei wird nicht gelesen" #: sfm-read.c:787 #, c-format msgid "" "%s: File layout code has unexpected value %d. Value should be 2 or 3, in " "big-endian or little-endian format" msgstr "" "%s: Dateilayoutkode hat unerwarteten Wert %d. Der Wert sollte 2 oder 3 sein, " "entweder im Big-endian- oder im Little-endian-Format." #: sfm-read.c:802 #, c-format msgid "%s: Number of elements per case (%d) is not between 1 and %d" msgstr "%s: Anzahl der Elemente pro Fall (%d) ist nicht zwischen 1 und %d" #: sfm-read.c:809 #, c-format msgid "" "%s: Index of weighting variable (%d) is not between 0 and number of elements " "per case (%d)" msgstr "" "%s: Index der Gewichtungsvariable (%d) liegt nicht zwischen 0 und der Anzahl " "der Elemente pro Fall (%d)" #: sfm-read.c:814 #, c-format msgid "%s: Number of cases in file (%d) is not between -1 and %d" msgstr "%s: Anzahl der Fälle in Datei (%d) ist nicht zwischen -1 und %d" #: sfm-read.c:819 #, c-format msgid "%s: Compression bias (%g) is not the usual value of 100" msgstr "%s: Kompressionsverzerrung (%g) hat nicht den üblichen Wert von 100" #: sfm-read.c:921 #, c-format msgid "%s: position %d: Bad record type (%d); the expected value was 2" msgstr "%s: Position %d: Falscher Datensatztyp (%d). Der erwartete Wert war 2" #: sfm-read.c:930 #, c-format msgid "" "%s: position %d: String variable does not have proper number of continuation " "records" msgstr "" "%s: Position %d: Zeichenkettenvariable hat keine angemessene Anzahl von " "Fortsetzungsdatensätzen" #: sfm-read.c:938 #, c-format msgid "%s: position %d: Superfluous long string continuation record" msgstr "" "%s: Position %d: Überflüssig langer Zeichenketten-Fortsetzungsdatensatz" #: sfm-read.c:943 #, c-format msgid "%s: position %d: Bad variable type code %d" msgstr "%s: Position %d: Falscher Variablentyp-Kode %d" #: sfm-read.c:946 #, c-format msgid "%s: position %d: Variable label indicator field is not 0 or 1" msgstr "%s: Position %d: Variablenbeschriftungs-Anzeigefeld ist nicht 0 oder 1" #: sfm-read.c:950 #, c-format msgid "" "%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3" msgstr "" "%s: Position %d: Anzeigefeld für fehlenden Wert ist nicht -3, -2, 0, 1, 2 " "oder 3" #: sfm-read.c:972 #, c-format msgid "" "%s: position %d: Variable name begins with octothorpe ('#'). Scratch " "variables should not appear in system files" msgstr "" "%s: Position %d: Variablenname beginnt mit Rautenzeichen ('#'). Scratch-" "Variablen sollten nicht in Systemdateien erscheinen" #: sfm-read.c:994 #, c-format msgid "" "%s: position %d: character `\\%03o' (%c) is not valid in a variable name" msgstr "" "%s: Position %d: Zeichen '\\%03o' (%c) ist in einem Variablenname nicht " "gültig" #: sfm-read.c:1036 #, c-format msgid "%s: Variable %s indicates variable label of invalid length %d" msgstr "%s: Variable %s gibt Variablenbeschriftung von ungültiger Länge %d an" #: sfm-read.c:1052 #, c-format msgid "%s: Long string variable %s may not have missing values" msgstr "" "%s: Lange Zeichenkettenvariable %s hat möglicherweise keine fehlenden Werte" #: sfm-read.c:1075 #, c-format msgid "%s: String variable %s may not have missing values specified as a range" msgstr "" "%s: Zeichenkettenvariable %s hat möglicherweise keine fehlenden Werte, die " "als ein Bereich angegeben sind" #: sfm-read.c:1118 #, c-format msgid "%s: Long string continuation records omitted at end of dictionary" msgstr "" "%s: Lange Zeichenkettenfortsetzungs-Datensätze am Ende des Wörterbuchs " "weggelassen" #: sfm-read.c:1121 #, c-format msgid "" "%s: System file header indicates %d variable positions but %d were read from " "file" msgstr "" "%s: Systemdatei-Header gibt %d Variablenpositionen an, aber %d wurden aus " "der Datei gelesen" #: sfm-read.c:1130 #, c-format msgid "%s: Duplicate variable name `%s' within system file" msgstr "%s: Doppelter Variablenname '%s' innerhalb Systemdatei" #: sfm-read.c:1170 #, c-format msgid "%s: %s variable %s has %s format specifier %s" msgstr "%s: %s Variable %s hat %s Formatkennzeichner %s" #: sfm-read.c:1249 #, c-format msgid "" "%s: Variable index record (type 4) does not immediately follow value label " "record (type 3) as it ought" msgstr "" "%s: Variablenindex-Datensatz (Typ 4) folgt nicht unmittelbar auf " "Wertbeschriftungs-Datensatz (Typ 3), wie er sollte" #: sfm-read.c:1258 #, c-format msgid "" "%s: Number of variables associated with a value label (%d) is not between 1 " "and the number of variables (%d)" msgstr "" "%s: Zahl der mit einer Wertbeschriftung (%d) assoziierten Variablen liegt " "nicht zwischen 1 und der Anzahl der Variablen (%d)" #: sfm-read.c:1275 #, c-format msgid "" "%s: Variable index associated with value label (%d) is not between 1 and the " "number of values (%d)" msgstr "" "%s: Mit einer Wertbeschriftung (%d) assoziierte Variable liegt nicht " "zwischen 1 und der Anzahl der Werte (%d)" #: sfm-read.c:1281 #, c-format msgid "" "%s: Variable index associated with value label (%d) refers to a continuation " "of a string variable, not to an actual variable" msgstr "" "%s: Mit einer Wertbeschriftung (%d) assoziierter Variablenindex bezieht sich " "auf die Fortsetzung einer Zeichenkettenvariable, nicht auf eine aktuelle " "Variable" #: sfm-read.c:1284 #, c-format msgid "%s: Value labels are not allowed on long string variables (%s)" msgstr "" "%s: Wertbeschriftungen sind nicht für lange Zeichenkettenvariablen (%s) " "erlaubt" #: sfm-read.c:1293 #, c-format msgid "" "%s: Variables associated with value label are not all of identical type. " "Variable %s has %s type, but variable %s has %s type" msgstr "" "%s: Nicht alle mit Wertbeschriftungen assoziierten Variablen sind vom " "gleichen Typ. Variable %s hat %s-Typ, aber Variable %s hat %s-Typ" #: sfm-read.c:1335 #, c-format msgid "%s: File contains duplicate label for value %g for variable %s" msgstr "%s: Datei enthält doppelte Beschriftung für Wert %g der Variablen %s" #: sfm-read.c:1338 #, c-format msgid "%s: File contains duplicate label for value `%.*s' for variable %s" msgstr "" "%s: Datei enthält doppelte Beschriftung für Wert '%.*s' der Variablen %s" #: sfm-read.c:1378 sfm-read.c:1656 #, c-format msgid "%s: Reading system file: %s" msgstr "%s: Systemdatei wird gelesen: %s" #: sfm-read.c:1380 sfm-read.c:1564 sfm-read.c:1605 #, c-format msgid "%s: Unexpected end of file" msgstr "%s: Unerwartetes Ende der Datei" #: sfm-read.c:1397 #, c-format msgid "%s: System file contains multiple type 6 (document) records" msgstr "%s: Systemdatei enthält mehrere Typ-6-Datensätze (Dokument)" #: sfm-read.c:1407 #, c-format msgid "%s: Number of document lines (%d) must be greater than 0" msgstr "%s: Anzahl der Dokumentzeilen (%d) muss größer als 0 sein" #: sfm-read.c:1518 #, c-format msgid "%s: Error reading file: %s" msgstr "%s: Fehler beim Lesen der Datei: %s" # CHECKME #: sfm-read.c:1556 #, c-format msgid "%s: Compressed data is corrupted. Data ends partway through a case" msgstr "" "%s: Gepackte Daten sind beschädigt. Daten enden teilweise durch einen Fall" #: sfm-read.c:1658 #, c-format msgid "%s: Partial record at end of system file" msgstr "%s: Unvollständiger Datensatz am Ende der Systemdatei" #: spss.c:382 spss.c:504 msgid "nval is 0" msgstr "nval ist 0" #: spss.c:673 #, c-format msgid "problem in reading file '%s'" msgstr "Problem beim Lesen der Datei '%s'" #: spss.c:683 #, c-format msgid "file '%s' is not in any supported SPSS format" msgstr "Datei '%s' ist nicht in einem unterstützten SPSS-Format" #: stataread.c:95 stataread.c:105 stataread.c:113 stataread.c:140 #: stataread.c:153 stataread.c:163 stataread.c:520 msgid "a binary read error occurred" msgstr "ein binärer Lesefehler ist aufgetreten" #: stataread.c:241 msgid "not a Stata version 5-12 .dta file" msgstr "keine '.dta'-Stata-Datei der Version 5-12" #: stataread.c:439 msgid "" "something strange in the file\n" " (Type 0 characteristic of nonzero length)" msgstr "" "etwas ist eigenartig in der Datei\n" " (Typ-0-charakteristisch von Länge ungleich Null)" #: stataread.c:584 msgid "can not yet read Stata .dta on this platform" msgstr "Auf dieser Plattform kann Stata-'.dta' noch nicht gelesen werden" #: stataread.c:588 stataread.c:1044 msgid "first argument must be a file name\n" msgstr "erstes Argument muss ein Dateiname sein\n" #: stataread.c:606 stataread.c:613 stataread.c:619 stataread.c:634 #: stataread.c:636 stataread.c:644 stataread.c:652 msgid "a binary write error occurred" msgstr "ein binärer Schreibfehler ist aufgetreten" #: stataread.c:722 msgid "this should happen: overrun" msgstr "das sollte vorkommen: Überlauf" #: stataread.c:724 msgid "this should happen: underrun" msgstr "das sollte vorkommen: Unterlauf" #: stataread.c:983 msgid "this should not happen." msgstr "das sollte nicht vorkommen." #: stataread.c:1040 msgid "cannot yet read write .dta on this platform" msgstr "" "Auf dieser Plattform kann Stata-'.dta' noch nicht gelesen/geschrieben werden" #: stataread.c:1048 msgid "data to be saved must be in a data frame" msgstr "Daten zum Sichern müssen in einem Daten-Frame sein" #: stataread.c:1051 #, c-format msgid "unable to open file for writing: '%s'" msgstr "Datei kann nicht zum Schreiben geöffnet werden: '%s'" #: stataread.c:1056 msgid "can only write version 6-10 formats" msgstr "nur Formate der Versionen 6-10 können geschrieben werden" #~ msgid "%s: position %d: Variable name begins with invalid character" #~ msgstr "%s: Position %d: Variablenname beginnt mit ungültigem Zeichen" #~ msgid "%s: position %d: Variable name begins with lowercase letter %c" #~ msgstr "" #~ "%s: Position %d: Variablenname beginnt mit mit kleingeschriebenem " #~ "Buchstaben %c" #~ msgid "%s: position %d: Variable name character %d is lowercase letter %c" #~ msgstr "" #~ "%s: Position %d: Variablennamenszeichen %d ist kleingeschriebener " #~ "Buchstabe %c" foreign/po/fr.po0000644000175100001440000007143014011446267013320 0ustar hornikusers# Translation of foreign.pot to French # Copyright (C) 2005 The R Foundation # This file is distributed under the same license as the foreign R package. # Philippe Grosjean , 2005. # msgid "" msgstr "" "Project-Id-Version: foreign 0.8-10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-12 09:19+0000\n" "PO-Revision-Date: 2021-02-06 16:20+0100\n" "Last-Translator: Philippe Grosjean \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.4.2\n" #: R_systat.c:131 #, c-format msgid "not a rectangular data file (%s mtype is %d)" msgstr "ceci n'est pas un fichier de données rectangulaire (%s mtype is %d)" #: R_systat.c:137 msgid "mismatch in numbers of variables" msgstr "erreur dans le nombre de variables" #: R_systat.c:173 R_systat.c:684 R_systat.c:689 R_systat.c:695 R_systat.c:698 #: R_systat.c:717 R_systat.c:737 msgid "file access error" msgstr "erreur d'accès fichier" #: R_systat.c:236 #, c-format msgid "cannot open file '%s'" msgstr "impossible d'ouvrir le fichier '%s'" #: R_systat.c:256 msgid "getuse: Failure in variable unpacking" msgstr "getuse : erreur lors de la décompaction de la variable" #: R_systat.c:258 R_systat.c:270 R_systat.c:273 R_systat.c:323 R_systat.c:329 #: R_systat.c:338 msgid "getuse: File access error" msgstr "getuse : erreur d'accès fichier" #: R_systat.c:319 #, c-format msgid "getuse: byte counter %o octal" msgstr "getuse : décompteur d'octets %o octal" #: R_systat.c:340 msgid "getuse: terminal null block" msgstr "getuse : bloc nul terminal" #: R_systat.c:352 msgid "getuse: non-integer number of observations" msgstr "getuse : nombre non entier d'observations" #: R_systat.c:413 msgid "getlab: File format unknown" msgstr "getlab : format de fichier inconnu" #: R_systat.c:417 R_systat.c:431 R_systat.c:433 R_systat.c:435 R_systat.c:482 #: R_systat.c:484 R_systat.c:486 R_systat.c:509 msgid "getlab: File access error" msgstr "getlab : erreur d'accès fichier" #: R_systat.c:421 #, c-format msgid "getlab: byte 0 = %o octal" msgstr "getlab : octet 0 = %o octal" #: R_systat.c:425 #, c-format msgid "getlab: byte 1 = %o octal" msgstr "getlab : octet 1 = %o octal" #: R_systat.c:437 #, c-format msgid "getlab: byte 9 = %o octal" msgstr "getlab : octet 9 = %o octal" #: R_systat.c:448 #, c-format msgid "getlab: comment begin byte = %o" msgstr "getlab : octet de début de commentaire = %o" #: R_systat.c:454 #, c-format msgid "getlab: comment = %c" msgstr "getlab : commentaire = %c" #: R_systat.c:459 #, c-format msgid "getlab: comment end byte = %o" msgstr "getlab : octet de fin de commentaire = %o" #: R_systat.c:477 #, c-format msgid "getlab: byte nv0 = %o octal" msgstr "getlab : octet nv0 = %o octal" #: R_systat.c:488 #, c-format msgid "getlab: byte nv$ = %o octal" msgstr "getlab : octet nv$ = %o octal" #: R_systat.c:496 msgid "file has more variables than this function can read" msgstr "" "le fichier possède plus de variables que cette fonction ne peut en lire" #: R_systat.c:503 #, c-format msgid "getlab: byte lab[%d]0 = %o, nv=%d" msgstr "getlab : octet lab[%d]0 = %o ; nv = %d" #: R_systat.c:516 #, c-format msgid "$ not in variable label column 9: %s" msgstr "$ n'est pas dans l'étiquette de variable à la colonne 9 : %s" #: R_systat.c:536 #, c-format msgid "getlab: byte lab[%d]$ = %o octal" msgstr "getlab : octet lab[%d]$ = %o octal" #: R_systat.c:714 msgid "string variable" msgstr "variable chaîne de caractères" #: Rdbfread.c:56 msgid "unable to open DBF file" msgstr "impossible d'ouvrir le fichier DBF" #: Rdbfread.c:64 msgid "no fields in DBF table" msgstr "aucun champ dans le fichier DBF" #: Rdbfread.c:193 #, c-format msgid "value |%d| found in logical field" msgstr "la valeur |%d| a été trouvée dans un champ booléen" #: Rdbfwrite.c:50 SASxport.c:510 SASxport.c:607 msgid "first argument must be a file name" msgstr "le premier argument doit être un nom de fichier" #: Rdbfwrite.c:53 msgid "unable to open file" msgstr "impossible d'ouvrir le fichier" #: Rdbfwrite.c:97 Rdbfwrite.c:135 stataread.c:304 stataread.c:325 #: stataread.c:816 stataread.c:846 msgid "unknown data type" msgstr "type de donnée inconnu" #: SASxport.c:90 msgid "invalid field length in numeric variable" msgstr "longueur de champ incorrecte dans une variable numérique" #: SASxport.c:152 SASxport.c:188 SASxport.c:233 SASxport.c:259 SASxport.c:303 #: SASxport.c:311 msgid "file not in SAS transfer format" msgstr "le fichier n'a pas un format de transfert SAS" #: SASxport.c:225 SASxport.c:293 msgid "SAS transfer file has incorrect library header" msgstr "Le fichier de transfert SAS a une entête de librairie incorrecte" #: SASxport.c:251 msgid "SAS transfer file has incorrect member header" msgstr "Le fichier de transfert SAS a une entête de membre incorrecte" #: SASxport.c:364 SASxport.c:405 SASxport.c:411 msgid "problem accessing SAS XPORT file" msgstr "problème lors de l'accès d'un fichier SAS XPORT" #: SASxport.c:513 SASxport.c:610 spss.c:670 stataread.c:592 #, c-format msgid "unable to open file: '%s'" msgstr "impossible d'ouvrir le fichier '%s'" #: SASxport.c:612 #, c-format msgid "problem reading SAS XPORT file '%s'" msgstr "problème à la lecture du fichier SAS XPORT '%s'" #: SASxport.c:641 msgid "problem reading SAS transport file" msgstr "problème à la lecture d'un fichier SAS transport" #: file-handle.c:115 #, c-format msgid "file handle `%s' has not been previously declared on FILE HANDLE" msgstr "" "le handle du fichier '%s' n'a pas été préalablement déclaré dans FILE HANDLE" #: format.c:108 #, c-format msgid "format %s may not be used as an input format" msgstr "le format %s ne peut être utilisé comme format d'entrée" #: format.c:113 #, c-format msgid "" "input format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "le format d'entrée %s spécifie une mauvaise largeur %d. Le format %s " "nécessite une largeur comprise entre %d et %d" #: format.c:119 #, c-format msgid "" "input format %s specifies an odd width %d, but format %s requires an even " "width between %d and %d" msgstr "" "le format d'entrée %s spécifie une largeur %d impaire, mais le format %s " "nécessite une largeur paire comprise entre %d et %d" #: format.c:125 #, c-format msgid "" "Input format %s specifies a bad number of implied decimal places %d. Input " "format %s allows up to 16 implied decimal places" msgstr "" "Le format d'entrée %s spécifie un mauvais nombre de décimales implicites %d. " "Le format d'entrée %s ne permet pas plus de 16 décimales implicites" #: format.c:144 #, c-format msgid "" "output format %s specifies a bad width %d. Format %s requires a width " "between %d and %d" msgstr "" "le format de sortie %s spécifie une mauvaise largeur %d. Le format %s " "nécessite une largeur comprise entre %d et %d" #: format.c:153 #, c-format msgid "" "output format %s requires minimum width %d to allow %d decimal places. Try " "%s%d.%d instead of %s" msgstr "" "le format de sortie %s nécessite une largeur minimum %d pour permettre %d " "décimales. Essayez %s%d.%d à la place de %s" #: format.c:160 #, c-format msgid "" "output format %s specifies an odd width %d, but output format %s requires an " "even width between %d and %d" msgstr "" "le format de sortie %s spécifie une largeur %d impaire, mais le format de " "sortie %s nécessite une largeur paire comprise entre %d et %d" #: format.c:166 #, c-format msgid "" "Output format %s specifies a bad number of implied decimal places %d. " "Output format %s allows a number of implied decimal places between 1 and 16" msgstr "" "Le format de sortie %s spécifie un mauvais nombre de décimales implicites " "%d. Le format de sortie %s autorise seulement entre 1 et 16 décimales " "implicites" #: format.c:181 #, c-format msgid "cannot display a string variable of width %d with format specifier %s" msgstr "" "impossible d'afficher une variable caractère de largeur %d avec le format %s" #: minitab.c:92 minitab.c:158 msgid "non-numeric data types are not yet implemented" msgstr "les types de données non numériques ne sont pas encore implémentées" #: minitab.c:119 #, c-format msgid "unable to open file '%s': '%s'" msgstr "impossible d'ouvrir le fichier '%s': '%s'" #: minitab.c:123 #, c-format msgid "file '%s' is not in Minitab Portable Worksheet format" msgstr "le fichier '%s' n'est pas dans le format 'Minitab Portable Worksheet'" #: minitab.c:126 minitab.c:147 minitab.c:155 minitab.c:162 msgid "file read error" msgstr "erreur d'accès fichier" #: minitab.c:139 #, c-format msgid "first record for entry %d is corrupt" msgstr "le premier enregistrement pour l'entrée %d est corrompu" #: pfm-read.c:117 #, c-format msgid "%s: Closing portable file: %s" msgstr "%s : fermeture du fichier portable %s" #: pfm-read.c:138 msgid "Unexpected end of file" msgstr "Fin de fichier inattendue" #: pfm-read.c:146 msgid "Bad line end" msgstr "Mauvaise fin de ligne" #: pfm-read.c:227 #, c-format msgid "cannot read file %s as portable file: already opened for %s" msgstr "" "impossible de lire le fichier %s comme un fichier portable : déjà ouvert " "pour %s" #: pfm-read.c:243 #, c-format msgid "" "an error occurred while opening \"%s\" for reading as a portable file: %s" msgstr "" "une erreur s'est produite lors de l'ouverture de \"%s\" en lecture comme " "fichier portable : %s" #: pfm-read.c:275 msgid "Data record expected" msgstr "Enregistrement de données attendu" #: pfm-read.c:295 msgid "error reading portable-file dictionary" msgstr "erreur à la lecture d'un dictionnaire de fichier portable" #: pfm-read.c:358 msgid "Number expected" msgstr "Nombre attendu" #: pfm-read.c:386 msgid "Missing numeric terminator" msgstr "Terminateur numérique manquant" #: pfm-read.c:423 msgid "Bad integer format" msgstr "Mauvais format d'entier" #: pfm-read.c:453 #, c-format msgid "Bad string length %d" msgstr "Mauvaise longueur de chaîne %d" #: pfm-read.c:523 msgid "Missing SPSSPORT signature" msgstr "Signature SPSSPORT manquante" #: pfm-read.c:541 #, c-format msgid "Unrecognized version code %d" msgstr "Code de version inconnu %d" #: pfm-read.c:552 #, c-format msgid "Bad date string length %d" msgstr "Mauvaise longueur de chaîne de date %d" #: pfm-read.c:559 msgid "Bad character in date" msgstr "Mauvais caractère dans une date" #: pfm-read.c:579 #, c-format msgid "Bad time string length %d" msgstr "Mauvaise longueur de chaîne de temps %d" #: pfm-read.c:586 msgid "Bad character in time" msgstr "Mauvais caractère dans un temps" #: pfm-read.c:640 #, c-format msgid "%s: Bad format specifier byte %d" msgstr "%s : mauvais octet de spécification de type %d" #: pfm-read.c:649 sfm-read.c:1157 sfm-read.c:1167 #, c-format msgid "%s: Bad format specifier byte (%d)" msgstr "%s : mauvais octet de spécification de type (%d)" #: pfm-read.c:651 #, c-format msgid "%s variable %s has %s format specifier %s" msgstr "%s variable %s a %s spécificateur de format %s" #: pfm-read.c:690 msgid "Expected variable count record" msgstr "Compteur d'enregistrements de la variable attendu" #: pfm-read.c:694 #, c-format msgid "Invalid number of variables %d" msgstr "Nombre de variables %d incorrect" #: pfm-read.c:730 msgid "Expected variable record" msgstr "Enregistrement de variable attendu" #: pfm-read.c:736 #, c-format msgid "Invalid variable width %d" msgstr "Largeur de variable %d incorrecte" #: pfm-read.c:754 #, c-format msgid "position %d: Variable name has %u characters" msgstr "position %d : le nom de la variable a %u caractères" #: pfm-read.c:758 #, c-format msgid "position %d: Variable name begins with invalid character" msgstr "position %d : le nom de variable commence par un caractère inapproprié" #: pfm-read.c:762 #, c-format msgid "position %d: Variable name begins with lowercase letter %c" msgstr "position %d : le nom de variable commence avec une lettre minuscule %c" #: pfm-read.c:774 #, c-format msgid "position %d: Variable name character %d is lowercase letter %c" msgstr "" "position %d : le caractère %d du nom de variable est une lettre minuscule %c" #: pfm-read.c:783 #, c-format msgid "position %d: character `\\%03o' is not valid in a variable name" msgstr "" "position %d : le caractère '\\%03o' n'est pas acceptable dans un nom de " "variable" #: pfm-read.c:789 #, c-format msgid "Bad width %d for variable %s" msgstr "Largeur incorrecte %d pour la variable %s" #: pfm-read.c:795 #, c-format msgid "Duplicate variable name %s" msgstr "Nom de variable dupliqué %s" #: pfm-read.c:839 #, c-format msgid "Bad missing values for %s" msgstr "Valeurs manquantes erronées pour %s" #: pfm-read.c:862 #, c-format msgid "Weighting variable %s not present in dictionary" msgstr "La variable de pondération %s n'est pas présente dans le dictionnaire" #: pfm-read.c:932 #, c-format msgid "Unknown variable %s while parsing value labels" msgstr "Variable %s inconnue lors de la lecture des étiquettes de valeurs" #: pfm-read.c:935 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types " "or widths" msgstr "" "Impossible d'assigner les étiquettes de valeurs à %s et %s, parce qu'ils ont " "des types ou des longueurs de variables différents" #: pfm-read.c:981 #, c-format msgid "Duplicate label for value %g for variable %s" msgstr "Etiquette dupliquée pour la valeur %g dans la variable %s" #: pfm-read.c:984 #, c-format msgid "Duplicate label for value `%.*s' for variable %s" msgstr "Etiquette dupliquée pour la valeur `%.*s' dans la variable %s" #: pfm-read.c:1072 msgid "End of file midway through case" msgstr "Fin de fichier rencontrée au milieu d'un cas" #: sfm-read.c:168 #, c-format msgid "%s: Closing system file: %s" msgstr "%s : fermeture du fichier système : %s" #: sfm-read.c:299 #, c-format msgid "cannot read file %s as system file: already opened for %s" msgstr "" "impossible de lire le fichier %s comme un fichier système : déjà ouvert pour " "%s" #: sfm-read.c:314 #, c-format msgid "An error occurred while opening '%s' for reading as a system file: %s" msgstr "" "Une erreur s'est produite lors de l'ouverture de '%s' en lecture comme " "fichier système : %s" #: sfm-read.c:345 #, c-format msgid "" "%s: Weighting variable may not be a continuation of a long string variable" msgstr "" "%s : la variable de pondération ne peut continuer une variable de longue " "chaîne de caractères" #: sfm-read.c:347 #, c-format msgid "%s: Weighting variable may not be a string variable" msgstr "" "%s : la variable de pondération ne peut être une variable de type chaîne de " "caractères" #: sfm-read.c:372 #, c-format msgid "" "%s: Orphaned variable index record (type 4). Type 4 records must always " "immediately follow type 3 records" msgstr "" "%s : enregistrement d'index de variable orphelin (type 4). Les " "enregistrements de type 4 doivent toujours suivre immédiatement des " "enregistrements de type 3" #: sfm-read.c:452 #, c-format msgid "" "%s: Very long string record(s) found (record type 7, subtype %d), each will " "be imported in consecutive separate variables" msgstr "" "%s : enregistrement de chaîne de caractère très long (type 7, sous-type %d), " "chacun d’eux sera importé dans des variables séparées consécutives" #: sfm-read.c:477 #, c-format msgid "" "%s: Long string value labels record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s : labels d’enregistrement de chaîne longue (type 7, sous-type %d), mais " "ignorés" #: sfm-read.c:482 #, c-format msgid "" "%s: Long string missing values record found (record type 7, subtype %d), but " "ignored" msgstr "" "%s : valeurs manquantes d’enregistrement de chaîne longue (type 7, sous-type " "%d), mais ignorées" #: sfm-read.c:491 #, c-format msgid "%s: Unrecognized record type 7, subtype %d encountered in system file" msgstr "" "%s : type 7 d'enregistrement inconnu, le sous-type %d est trouvé dans le " "fichier système" #: sfm-read.c:514 #, c-format msgid "%s: Unrecognized record type %d" msgstr "%s : type d'enregistrement inconnu %d" #: sfm-read.c:538 msgid "error reading system-file header" msgstr "erreur à la lecture de l'entête du fichier système" #: sfm-read.c:554 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected " "size %d, count 8" msgstr "" "%s : mauvaise taille (%d) ou dénombrement (%d) de champs dans les " "enregistrement de type 7, sous-type 3.\tUne taille %d et un dénombrement de " "8 sont attendus" #: sfm-read.c:567 #, c-format msgid "" "%s: Floating-point representation in system file is not IEEE-754. read.spss " "cannot convert between floating-point formats" msgstr "" "%s : la représentation en virgule flottante n'est pas IEEE-754 dans le " "fichier système. read.spss ne peut convertir entre les formats en virgule " "flottante" #: sfm-read.c:586 #, c-format msgid "" "%s: File-indicated endianness (%s) does not match endianness intuited from " "file header (%s)" msgstr "" "%s : représentations 'big/little endian' incompatibles entre le fichier (%s) " "et son entête (%s)" #: sfm-read.c:598 #, c-format msgid "%s: File-indicated character representation code (%s) is not ASCII" msgstr "" "%s : le code de représentation de caractères (%s) dans le fichier n'est pas " "ASCII" #: sfm-read.c:603 #, c-format msgid "%s: File-indicated character representation code (%d) is unknown" msgstr "" "%s : Le code de représentation des caractères indiqué dans le fichier (%d) " "est inconnu" #: sfm-read.c:621 #, c-format msgid "" "%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected " "size %d, count 8" msgstr "" "%s : mauvaise taille (%d) ou dénombrement (%d) de champ d'enregistrement de " "type 7, sous-type 4.\tUne taille %d et un dénombrement de 8 étaient attendus" #: sfm-read.c:635 #, c-format msgid "" "%s: File-indicated value is different from internal value for at least one " "of the three system values. SYSMIS: indicated %g, expected %g; HIGHEST: %g, " "%g; LOWEST: %g, %g" msgstr "" "%s : une valeur indiquée dans le fichier est différente d'une valeur interne " "pour au moins une des trois valeurs système. SYSMIS indique %g, attendu %g ; " "LA PLUS ELEVEE : %g, %g ; LA PLUS FAIBLE : %g, %g" #: sfm-read.c:745 #, c-format msgid "" "%s: Bad magic. Proper system files begin with the four characters `$FL2'. " "This file will not be read" msgstr "" "%s : mauvais nombre magique. Un fichier système correct commence avec les 4 " "caractères `$FL2'. Impossible de lire ce fichier" #: sfm-read.c:787 #, c-format msgid "" "%s: File layout code has unexpected value %d. Value should be 2 or 3, in " "big-endian or little-endian format" msgstr "" "%s : le squelette du fichier a une valeur inattendue %d. La valeur doit être " "2 ou 3, en format 'big endian' ou 'little endian'" #: sfm-read.c:802 #, c-format msgid "%s: Number of elements per case (%d) is not between 1 and %d" msgstr "%s : le nombre d'éléments par cas (%d) n'est pas compris entre 1 et %d" #: sfm-read.c:809 #, c-format msgid "" "%s: Index of weighting variable (%d) is not between 0 and number of elements " "per case (%d)" msgstr "" "%s : l'index d'une variable de pondération (%d) n'est pas compris entre 0 et " "le nombre d'éléments par cas (%d)" #: sfm-read.c:814 #, c-format msgid "%s: Number of cases in file (%d) is not between -1 and %d" msgstr "" "%s : le nombre de cas dans le fichier (%d) n'est pas compris entre -1 et %d" #: sfm-read.c:819 #, c-format msgid "%s: Compression bias (%g) is not the usual value of 100" msgstr "" "%s : le biais de compression (%g) n'est pas la valeur habituelle de 100" #: sfm-read.c:921 #, c-format msgid "%s: position %d: Bad record type (%d); the expected value was 2" msgstr "" "%s : position %d : mauvais type d'enregistrement (%d) ; la valeur attendue " "est 2" #: sfm-read.c:930 #, c-format msgid "" "%s: position %d: String variable does not have proper number of continuation " "records" msgstr "" "%s : position %d : la variable chaîne de caractères n'a pas un nombre " "correct d'enregistrements de continuation" #: sfm-read.c:938 #, c-format msgid "%s: position %d: Superfluous long string continuation record" msgstr "" "%s : position %d : enregistrement de continuation d'une longue chaîne " "superflu" #: sfm-read.c:943 #, c-format msgid "%s: position %d: Bad variable type code %d" msgstr "%s : position %d : mauvais code de type de variable %d" #: sfm-read.c:946 #, c-format msgid "%s: position %d: Variable label indicator field is not 0 or 1" msgstr "" "%s : position %d : le champ indicateur d'étiquette de la variable n'est ni " "0, ni 1" #: sfm-read.c:950 #, c-format msgid "" "%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3" msgstr "" "%s : position %d : le champ indicateur de valeur manquante n'est pas -3, -2, " "-1, 0, 1, 2 ou 3" #: sfm-read.c:972 #, c-format msgid "" "%s: position %d: Variable name begins with octothorpe ('#'). Scratch " "variables should not appear in system files" msgstr "" "%s : position %d : le nom de la variable commence avec un dièse ('#'). Les " "variables \"scratch\" ne devraient pas apparaitre dans les fichiers systèmes" #: sfm-read.c:994 #, c-format msgid "" "%s: position %d: character `\\%03o' (%c) is not valid in a variable name" msgstr "" "%s : position %d : le caractère '\\%03o' (%c) n'est pas autorisé dans le nom " "d'une variable" #: sfm-read.c:1036 #, c-format msgid "%s: Variable %s indicates variable label of invalid length %d" msgstr "" "%s : la variable %s indique une étiquette de variable d'une longueur %d " "incorrecte" #: sfm-read.c:1052 #, c-format msgid "%s: Long string variable %s may not have missing values" msgstr "" "%s : la variable de type longue chaîne %s ne peut avoir de valeurs manquantes" #: sfm-read.c:1075 #, c-format msgid "%s: String variable %s may not have missing values specified as a range" msgstr "" "%s : la variable de chaîne %s ne peut avoir des valeurs manquantes " "spécifiées dans une plage" #: sfm-read.c:1118 #, c-format msgid "%s: Long string continuation records omitted at end of dictionary" msgstr "" "%s : les enregistrements de continuation de longues chaînes sont omis à la " "fin du dictionnaire" #: sfm-read.c:1121 #, c-format msgid "" "%s: System file header indicates %d variable positions but %d were read from " "file" msgstr "" "%s : l'entête du fichier système indique %d positions de variables mais " "seulement %d sont lues depuis le fichier" #: sfm-read.c:1130 #, c-format msgid "%s: Duplicate variable name `%s' within system file" msgstr "%s : nom de variable dupliqué `%s' dans le fichier système" #: sfm-read.c:1170 #, c-format msgid "%s: %s variable %s has %s format specifier %s" msgstr "%s : %s variable %s a %s spécificateur de format %s" #: sfm-read.c:1249 #, c-format msgid "" "%s: Variable index record (type 4) does not immediately follow value label " "record (type 3) as it ought" msgstr "" "%s : l'enregistrement d'index de variable (type 4) ne suit pas directement " "un enregistrement étiquette de valeur (type 3), comme il devrait le faire" #: sfm-read.c:1258 #, c-format msgid "" "%s: Number of variables associated with a value label (%d) is not between 1 " "and the number of variables (%d)" msgstr "" "%s : le nombre de variables associées a une étiquette de valeur (%d) n'est " "pas compris entre 1 et le nombre de variables (%d)" #: sfm-read.c:1275 #, c-format msgid "" "%s: Variable index associated with value label (%d) is not between 1 and the " "number of values (%d)" msgstr "" "%s : l'index de variable associé à une étiquette de valeur (%d) n'est pas " "compris entre 1 et le nombre de valeurs (%d)" #: sfm-read.c:1281 #, c-format msgid "" "%s: Variable index associated with value label (%d) refers to a continuation " "of a string variable, not to an actual variable" msgstr "" "%s : l'index de variable associé à une étiquette de valeur (%d) se réfère à " "la continuation d'une variable chaîne de caractères, pas à la variable elle-" "même" #: sfm-read.c:1284 #, c-format msgid "%s: Value labels are not allowed on long string variables (%s)" msgstr "" "%s : les étiquettes de valeurs ne sont pas permises pour les variables de " "longues chaînes (%s)" #: sfm-read.c:1293 #, c-format msgid "" "%s: Variables associated with value label are not all of identical type. " "Variable %s has %s type, but variable %s has %s type" msgstr "" "%s : les variables associées avec des étiquettes de valeurs ne sont pas " "toutes du même type. La variable %s a le type %s, mais la variable %s a le " "type %s" #: sfm-read.c:1335 #, c-format msgid "%s: File contains duplicate label for value %g for variable %s" msgstr "" "%s : le fichier contient des étiquettes dupliquées pour la valeur %g de la " "variable %s" #: sfm-read.c:1338 #, c-format msgid "%s: File contains duplicate label for value `%.*s' for variable %s" msgstr "" "%s : le fichier contient des étiquettes dupliquées pour la valeur `%.*s' de " "la variable %s" #: sfm-read.c:1378 sfm-read.c:1656 #, c-format msgid "%s: Reading system file: %s" msgstr "%s : lors de la lecture du fichier système : %s" #: sfm-read.c:1380 sfm-read.c:1564 sfm-read.c:1605 #, c-format msgid "%s: Unexpected end of file" msgstr "%s : fin de fichier inattendue" #: sfm-read.c:1397 #, c-format msgid "%s: System file contains multiple type 6 (document) records" msgstr "" "%s : le fichier système contient des enregistrements multiples de type 6 " "(document)" #: sfm-read.c:1407 #, c-format msgid "%s: Number of document lines (%d) must be greater than 0" msgstr "%s : le nombre de lignes du document (%d) doit être supérieur à 0" #: sfm-read.c:1518 #, c-format msgid "%s: Error reading file: %s" msgstr "%s : erreur lors de la lecture du fichier : %s" #: sfm-read.c:1556 #, c-format msgid "%s: Compressed data is corrupted. Data ends partway through a case" msgstr "" "%s : les données compressées sont corrompues. Les données se terminent au " "milieu d'un cas" #: sfm-read.c:1658 #, c-format msgid "%s: Partial record at end of system file" msgstr "%s : enregistrement partiel à la fin d'un fichier système" #: spss.c:382 spss.c:504 msgid "nval is 0" msgstr "nval est égal à 0" #: spss.c:673 #, c-format msgid "problem in reading file '%s'" msgstr "problème lors de la lecture du fichier '%s'" #: spss.c:683 #, c-format msgid "file '%s' is not in any supported SPSS format" msgstr "" "le fichier '%s' n'est enregistré dans aucun des formats supportés de SPSS" #: stataread.c:95 stataread.c:105 stataread.c:113 stataread.c:140 #: stataread.c:153 stataread.c:163 stataread.c:520 msgid "a binary read error occurred" msgstr "une erreur de lecture binaire s'est produite" #: stataread.c:241 msgid "not a Stata version 5-12 .dta file" msgstr "ceci n'est pas un fichier .dta Stata version 5-12" #: stataread.c:439 msgid "" "something strange in the file\n" " (Type 0 characteristic of nonzero length)" msgstr "" "quelque chose d'étrange s'est produit dans le fichier\n" " (caractéristique de type 0 de longueur non nulle)" #: stataread.c:584 msgid "can not yet read Stata .dta on this platform" msgstr "" "la lecture des fichiers Stata .dta n'est pas encore possible sur cette " "architecture" #: stataread.c:588 stataread.c:1044 msgid "first argument must be a file name\n" msgstr "le premier argument doit être un nom de fichier\n" #: stataread.c:606 stataread.c:613 stataread.c:619 stataread.c:634 #: stataread.c:636 stataread.c:644 stataread.c:652 msgid "a binary write error occurred" msgstr "une erreur d'écriture binaire s'est produite" #: stataread.c:722 msgid "this should happen: overrun" msgstr "Ceci devrait se produire : dépassement par le haut." #: stataread.c:724 msgid "this should happen: underrun" msgstr "Ceci devrait se produire : dépassement par le bas" #: stataread.c:983 msgid "this should not happen." msgstr "ceci ne devrait pas se produire." #: stataread.c:1040 msgid "cannot yet read write .dta on this platform" msgstr "" "la lecture ou l'écriture de fichiers Stata .dta n'est pas encore possible " "sur cette architecture" #: stataread.c:1048 msgid "data to be saved must be in a data frame" msgstr "" "les données à sauvegarder doivent être contenues dans un objet \"data frame\"" #: stataread.c:1051 #, c-format msgid "unable to open file for writing: '%s'" msgstr "impossible d'ouvrir le fichier '%s' en écriture" #: stataread.c:1056 msgid "can only write version 6-10 formats" msgstr "" "il est seulement possible d'écrire des fichiers aux formats version 6-10" #~ msgid "%s: position %d: Variable name begins with invalid character" #~ msgstr "" #~ "%s : position %d : le nom de la variable commence avec un caractère non " #~ "autorisé" #~ msgid "%s: position %d: Variable name begins with lowercase letter %c" #~ msgstr "" #~ "%s : position %d : le nom de la variable commence avec une lettre " #~ "minuscule %c" #~ msgid "%s: position %d: Variable name character %d is lowercase letter %c" #~ msgstr "" #~ "%s : position %d : le caractère %d du nom de la variable est une lettre " #~ "minuscule %c"