Writing R Extensions

Total Page:16

File Type:pdf, Size:1020Kb

Writing R Extensions Writing R Extensions Version 3.1.1 (2014-07-10) R Core Team This manual is for R, version 3.1.1 (2014-07-10). Copyright c 1999{2013 R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into an- other language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team. i Table of Contents Acknowledgements :::::::::::::::::::::::::::::::::::::::::::::::: 1 1 Creating R packages::::::::::::::::::::::::::::::::::::::::::: 2 1.1 Package structure ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 1.1.1 The DESCRIPTION file ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1.1.2 Licensing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 1.1.3 Package Dependencies :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 1.1.4 The INDEX file ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 1.1.5 Package subdirectories ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 1.1.6 Data in packages :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 1.1.7 Non-R scripts in packages ::::::::::::::::::::::::::::::::::::::::::::::::::: 15 1.2 Configure and cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 16 1.2.1 Using Makevars ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 1.2.1.1 OpenMP support ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21 1.2.1.2 Using pthreads ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22 1.2.1.3 Compiling in sub-directories :::::::::::::::::::::::::::::::::::::::::::: 23 1.2.2 Configure example::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24 1.2.3 Using F95 code :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 1.2.4 Using C++11 code :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 1.3 Checking and building packages :::::::::::::::::::::::::::::::::::::::::::::::::: 27 1.3.1 Checking packages ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 1.3.2 Building package tarballs :::::::::::::::::::::::::::::::::::::::::::::::::::: 31 1.3.3 Building binary packages :::::::::::::::::::::::::::::::::::::::::::::::::::: 32 1.4 Writing package vignettes :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 1.4.1 Encodings and vignettes ::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 1.4.2 Non-Sweave vignettes:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 1.5 Package namespaces :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 36 1.5.1 Specifying imports and exports :::::::::::::::::::::::::::::::::::::::::::::: 36 1.5.2 Registering S3 methods :::::::::::::::::::::::::::::::::::::::::::::::::::::: 37 1.5.3 Load hooks :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38 1.5.4 useDynLib :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38 1.5.5 An example ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 40 1.5.6 Namespaces with S4 classes and methods :::::::::::::::::::::::::::::::::::: 41 1.6 Writing portable packages :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 42 1.6.1 PDF size :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 45 1.6.2 Check timing :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 45 1.6.3 Encoding issues ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 46 1.6.4 Portable C and C++ code ::::::::::::::::::::::::::::::::::::::::::::::::::: 46 1.6.5 Binary distribution :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 47 1.7 Diagnostic messages :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 48 1.8 Internationalization :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 1.8.1 C-level messages ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 1.8.2 R messages :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 1.8.3 Preparing translations ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 50 1.9 CITATION files :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 50 1.10 Package types ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 51 1.10.1 Frontend ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 51 1.11 Services ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 51 ii 2 Writing R documentation files :::::::::::::::::::::::::::::: 53 2.1 Rd format:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 53 2.1.1 Documenting functions :::::::::::::::::::::::::::::::::::::::::::::::::::::: 54 2.1.2 Documenting data sets :::::::::::::::::::::::::::::::::::::::::::::::::::::: 58 2.1.3 Documenting S4 classes and methods :::::::::::::::::::::::::::::::::::::::: 59 2.1.4 Documenting packages::::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 2.2 Sectioning :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 60 2.3 Marking text ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 60 2.4 Lists and tables :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 62 2.5 Cross-references :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 63 2.6 Mathematics ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 63 2.7 Figures::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 64 2.8 Insertions :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 64 2.9 Indices ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 65 2.10 Platform-specific documentation ::::::::::::::::::::::::::::::::::::::::::::::::: 65 2.11 Conditional text::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 66 2.12 Dynamic pages :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 66 2.13 User-defined macros ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 67 2.14 Encoding ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 67 2.15 Processing documentation files :::::::::::::::::::::::::::::::::::::::::::::::::: 68 2.16 Editing Rd files ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 69 3 Tidying and profiling R code :::::::::::::::::::::::::::::::: 70 3.1 Tidying R code::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 70 3.2 Profiling R code for speed :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 70 3.3 Profiling R code for memory use :::::::::::::::::::::::::::::::::::::::::::::::::: 72 3.3.1 Memory statistics from Rprof ::::::::::::::::::::::::::::::::::::::::::::::: 72 3.3.2 Tracking memory allocations::::::::::::::::::::::::::::::::::::::::::::::::: 73 3.3.3 Tracing copies of an object :::::::::::::::::::::::::::::::::::::::::::::::::: 73 3.4 Profiling compiled code ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 73 3.4.1 Linux ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 74 3.4.1.1 sprof ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 74 3.4.1.2 oprofile and operf ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 74 3.4.2 Solaris :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 77 3.4.3 OS X:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 77 4 Debugging :::::::::::::::::::::::::::::::::::::::::::::::::::: 78 4.1 Browsing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 78 4.2 Debugging R code :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 79 4.3 Checking memory access ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 83 4.3.1 Using gctorture:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 83 4.3.2 Using valgrind ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 83 4.3.3 Using the Address Sanitizer:::::::::::::::::::::::::::::::::::::::::::::::::: 85 4.3.4 Using the Undefined Behaviour Sanitizer ::::::::::::::::::::::::::::::::::::: 86 4.3.5 Other analyses with `clang' :::::::::::::::::::::::::::::::::::::::::::::::::: 87 4.3.6 Using `Dr. Memory' ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 87 4.3.7 Fortran array bounds checking ::::::::::::::::::::::::::::::::::::::::::::::: 87 4.4 Debugging compiled code::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 88 4.4.1 Finding entry points in dynamically loaded code ::::::::::::::::::::::::::::: 89 4.4.2 Inspecting R objects when debugging :::::::::::::::::::::::::::::::::::::::: 89 iii 5 System and foreign language interfaces::::::::::::::::::::: 92 5.1 Operating system access :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 92 5.2 Interface functions .C and .Fortran :::::::::::::::::::::::::::::::::::::::::::::: 92 5.3 dyn.load and dyn.unload ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 94 5.4 Registering native routines ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 95 5.4.1 Speed considerations::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 97 5.4.2 Linking to native routines
Recommended publications
  • Also Includes Slides and Contents From
    The Compilation Toolchain Cross-Compilation for Embedded Systems Prof. Andrea Marongiu ([email protected]) Toolchain The toolchain is a set of development tools used in association with source code or binaries generated from the source code • Enables development in a programming language (e.g., C/C++) • It is used for a lot of operations such as a) Compilation b) Preparing Libraries Most common toolchain is the c) Reading a binary file (or part of it) GNU toolchain which is part of d) Debugging the GNU project • Normally it contains a) Compiler : Generate object files from source code files b) Linker: Link object files together to build a binary file c) Library Archiver: To group a set of object files into a library file d) Debugger: To debug the binary file while running e) And other tools The GNU Toolchain GNU (GNU’s Not Unix) The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and software for embedded systems. The GNU project produced a set of programming tools. Parts of the toolchain we will use are: -gcc: (GNU Compiler Collection): suite of compilers for many programming languages -binutils: Suite of tools including linker (ld), assembler (gas) -gdb: Code debugging tool -libc: Subset of standard C library (assuming a C compiler). -bash: free Unix shell (Bourne-again shell). Default shell on GNU/Linux systems and Mac OSX. Also ported to Microsoft Windows. -make: automation tool for compilation and build Program development tools The process of converting source code to an executable binary image requires several steps, each with its own tool.
    [Show full text]
  • Riscv-Software-Stack-Tutorial-Hpca2015
    Software Tools Bootcamp RISC-V ISA Tutorial — HPCA-21 08 February 2015 Albert Ou UC Berkeley [email protected] Preliminaries To follow along, download these slides at http://riscv.org/tutorial-hpca2015.html 2 Preliminaries . Shell commands are prefixed by a “$” prompt. Due to time constraints, we will not be building everything from source in real-time. - Binaries have been prepared for you in the VM image. - Detailed build steps are documented here for completeness but are not necessary if using the VM. Interactive portions of this tutorial are denoted with: $ echo 'Hello world' . Also as a reminder, these slides are marked with an icon in the upper-right corner: 3 Software Stack . Many possible combinations (and growing) . But here we will focus on the most common workflows for RISC-V software development 4 Agenda 1. riscv-tools infrastructure 2. First Steps 3. Spike + Proxy Kernel 4. QEMU + Linux 5. Advanced Cross-Compiling 6. Yocto/OpenEmbedded 5 riscv-tools — Overview “Meta-repository” with Git submodules for every stable component of the RISC-V software toolchain Submodule Contents riscv-fesvr RISC-V Frontend Server riscv-isa-sim Functional ISA simulator (“Spike”) riscv-qemu Higher-performance ISA simulator riscv-gnu-toolchain binutils, gcc, newlib, glibc, Linux UAPI headers riscv-llvm LLVM, riscv-clang submodule riscv-pk RISC-V Proxy Kernel (riscv-linux) Linux/RISC-V kernel port riscv-tests ISA assembly tests, benchmark suite All listed submodules are hosted under the riscv GitHub organization: https://github.com/riscv 6 riscv-tools — Installation . Build riscv-gnu-toolchain (riscv*-*-elf / newlib target), riscv-fesvr, riscv-isa-sim, and riscv-pk: (pre-installed in VM) $ git clone https://github.com/riscv/riscv-tools $ cd riscv-tools $ git submodule update --init --recursive $ export RISCV=<installation path> $ export PATH=${PATH}:${RISCV}/bin $ ./build.sh .
    [Show full text]
  • Cambridge University Press 978-1-108-78987-5 — How to Write Good Programs Perdita Stevens Index More Information
    Cambridge University Press 978-1-108-78987-5 — How to Write Good Programs Perdita Stevens Index More Information Index A bold page number indicates where a term is deined. abstract syntax tree, 105 C, 35, 45, 189 abstraction, 29, 141 C♯,35 see also model C++, 35, 190 agile, 64, 159, 198 camel case, 89 algorithm, 29, 147, 148, 196 change, 141, 144, 197 Alice, 44 checklist, 127 arguments, 25,28 cloud, 66 functions as, 45 code order of, 108 commented-out, 62 type of, 41, 108 completion, 52,90 assert, 71 dead, 64 assignment, 131 line length, 99 vs. comparison, 126 reputable body of, 46, 63, 94, 99 Atom, 18 spaghetti, 98, 122 autocompletion, 52,90 unreachable, 64 autosave, 57 code sense, 3, 133 coding, 4 backups, 65 coding dojo, 153 bar, see metasyntactic variable coding interview, 148 BASIC, 44, 125 command line, 15, 49 baz, see metasyntactic variable comment, 27, 70, 85–88 BlueJ, 44, 54 commenting-out, 62 breakpoint, 111 comparison bug, 32, 101, 190, 191 of booleans, 126 after removing, 124 of objects, 130 avoiding, 138 vs. assignment, 126 avoiding recurrence of, 77 compiler, 13, 35 in compiler, 109 bug, 109 removing, 122 incremental, 51 the Lauren bug, 78 computational complexity, 148 see also debugging content assist, 52,90 build, 51, 53 contract, 88 202 © in this web service Cambridge University Press www.cambridge.org Cambridge University Press 978-1-108-78987-5 — How to Write Good Programs Perdita Stevens Index More Information Index 203 crash, 118 time, 146 currying, 23 user, 146 Emacs, 18, 49, 58, 90, 95 data science, 192 embedded
    [Show full text]
  • Section “Creating R Packages” in Writing R Extensions
    Writing R Extensions Version 3.1.0 Under development (2013-03-29) R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team. Copyright c 1999{2013 R Core Team i Table of Contents Acknowledgements ::::::::::::::::::::::::::::::::: 1 1 Creating R packages:::::::::::::::::::::::::::: 2 1.1 Package structure :::::::::::::::::::::::::::::::::::::::::::::: 3 1.1.1 The `DESCRIPTION' file :::::::::::::::::::::::::::::::::::: 4 1.1.2 Licensing:::::::::::::::::::::::::::::::::::::::::::::::::: 9 1.1.3 The `INDEX' file :::::::::::::::::::::::::::::::::::::::::: 10 1.1.4 Package subdirectories:::::::::::::::::::::::::::::::::::: 11 1.1.5 Data in packages ::::::::::::::::::::::::::::::::::::::::: 14 1.1.6 Non-R scripts in packages :::::::::::::::::::::::::::::::: 15 1.2 Configure and cleanup :::::::::::::::::::::::::::::::::::::::: 16 1.2.1 Using `Makevars'::::::::::::::::::::::::::::::::::::::::: 19 1.2.1.1 OpenMP support::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Project 0) Inside Your 354 Directory
    Assignment 0 1. Learning Goals 1. Learn some basic unix/linux commands. 2. Start using a text editor of your choice. 3. Become familiar with the build process. 4. Modify a simple C program. 5. Learn how to submit your assignments. 2. Logistics 1. All work for this assignment is to be done on one of the department's instructional Unix/Linux machines. You are welcome to remotely login using ssh, putty, etc., but you will have to figure out those details on your own. It is not that hard really. 2. All assignments in this course will be graded only on CS departmental machines (e.g. Galapagos lab at CS first floor, Room No: 1366) running Linux Operating System. It is your responsibility to make sure that your code runs on these machines correctly. 3. General Advice If you are not using the CS departmental machines with Linux Operating System and would like to code using your laptop then: 1. Please DON’T use an Integrated Development Environment (IDE) for learning to code in C. It’ll hide many of the low­level details from you. You can become a good C programmer only if you understand all these low­level details. 2. Avoid using Windows Operating System for writing C code since the compiler that we’ll use for grading your assignments is gcc (GNU C Compiler) which is a Unix/Linux based C compiler. 3. If you still want to use a computer which already has a Windows OS, then you should have a virtual machine (VMware or Virtualbox) to run a Linux OS or Cygwin (which contains tools like gcc) installed on your Windows machine.
    [Show full text]
  • X86 Disassembly Exploring the Relationship Between C, X86 Assembly, and Machine Code
    x86 Disassembly Exploring the relationship between C, x86 Assembly, and Machine Code PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sat, 07 Sep 2013 05:04:59 UTC Contents Articles Wikibooks:Collections Preface 1 X86 Disassembly/Cover 3 X86 Disassembly/Introduction 3 Tools 5 X86 Disassembly/Assemblers and Compilers 5 X86 Disassembly/Disassemblers and Decompilers 10 X86 Disassembly/Disassembly Examples 18 X86 Disassembly/Analysis Tools 19 Platforms 28 X86 Disassembly/Microsoft Windows 28 X86 Disassembly/Windows Executable Files 33 X86 Disassembly/Linux 48 X86 Disassembly/Linux Executable Files 50 Code Patterns 51 X86 Disassembly/The Stack 51 X86 Disassembly/Functions and Stack Frames 53 X86 Disassembly/Functions and Stack Frame Examples 57 X86 Disassembly/Calling Conventions 58 X86 Disassembly/Calling Convention Examples 64 X86 Disassembly/Branches 74 X86 Disassembly/Branch Examples 83 X86 Disassembly/Loops 87 X86 Disassembly/Loop Examples 92 Data Patterns 95 X86 Disassembly/Variables 95 X86 Disassembly/Variable Examples 101 X86 Disassembly/Data Structures 103 X86 Disassembly/Objects and Classes 108 X86 Disassembly/Floating Point Numbers 112 X86 Disassembly/Floating Point Examples 119 Difficulties 121 X86 Disassembly/Code Optimization 121 X86 Disassembly/Optimization Examples 124 X86 Disassembly/Code Obfuscation 132 X86 Disassembly/Debugger Detectors 137 Resources and Licensing 139 X86 Disassembly/Resources 139 X86 Disassembly/Licensing 141 X86 Disassembly/Manual of Style 141 References Article Sources and Contributors 142 Image Sources, Licenses and Contributors 143 Article Licenses License 144 Wikibooks:Collections Preface 1 Wikibooks:Collections Preface This book was created by volunteers at Wikibooks (http:/ / en.
    [Show full text]
  • A Beginners Guide to Assembly
    A Beginners guide to Assembly By Tom Glint and Rishiraj CS301 | Fall 2020 Contributors: Varun and Shreyas 1 2 3 4 5 6 .out file on Linux .exe on Windows 7 Our Focus 8 Prominent ISAs 9 10 An intriguing Example! 11 Some Basics ● % - indicates register names. Example : %rbp ● $ - indicates constants Example : $100 ● Accessing register values: ○ %rbp : Access value stored in register rbp ○ (%rbp) : Treat value stored in register rbp as a pointer. Access the value stored at address pointed by the pointer. Basically *rbp ○ 4(%rbp) : Access value stored at address which is 4 bytes after the address stored in rbp. Basically *(rbp + 4) 12 An intriguing Example! 13 An intriguing Example! For each function call, new space is created on the stack to store local variables and other data. This is known as a stack frame . To accomplish this, you will need to write some code at the beginning and end of each function to create and destroy the stack frame 14 An intriguing Example! rbp is the frame pointer. In our code, it gets a snapshot of the stack pointer (rsp) so that when rsp is changed, local variables and function parameters are still accessible from a constant offset from rbp. 15 An intriguing Example! move immediate value 3000 to (%rbp-8) 16 An intriguing Example! add immediate value 3 to (%rbp-8) 17 An intriguing Example! Move immediate value 100 to (%rbp-4) 18 An intriguing Example! Move (%rbp-4) to auxiliary register 19 An intriguing Example! Pop the base pointer to restore state 20 An intriguing Example! The calling convention dictates that a function’s return value is stored in %eax, so the above instruction sets us up to return y at the end of our function.
    [Show full text]
  • Tutorial: Creating an LLVM Toolchain for the Cpu0 Architecture Release 12.0.0
    Tutorial: Creating an LLVM Toolchain for the Cpu0 Architecture Release 12.0.0 Chen Chung-Shu Aug 13, 2021 CONTENTS 1 About 1 1.1 Authors..................................................1 1.2 Acknowledgments............................................1 1.3 Build steps................................................1 1.4 Revision history.............................................2 1.5 Licensing.................................................2 1.6 Outline of Chapters............................................2 2 Cpu0 ELF linker 5 2.1 ELF to Hex................................................6 2.2 Create Cpu0 backend under LLD.................................... 21 2.3 Summary................................................. 45 3 Optimization 47 3.1 LLVM IR optimization.......................................... 47 3.2 Project.................................................. 51 4 Library 53 4.1 Compiler-rt................................................ 53 4.2 Avr libc.................................................. 54 4.3 Software Float Point Support...................................... 54 5 Resources 59 5.1 Build steps................................................ 59 5.2 Book example code............................................ 59 5.3 Alternate formats............................................. 59 5.4 Presentation files............................................. 59 5.5 Search this website............................................ 59 i ii CHAPTER ONE ABOUT • Authors • Acknowledgments • Build steps • Revision history •
    [Show full text]
  • Section “Creating R Packages” in Writing R Extensions
    Writing R Extensions Version 3.0.0 RC (2013-03-28) R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team. Copyright c 1999{2013 R Core Team i Table of Contents Acknowledgements ::::::::::::::::::::::::::::::::: 1 1 Creating R packages:::::::::::::::::::::::::::: 2 1.1 Package structure :::::::::::::::::::::::::::::::::::::::::::::: 3 1.1.1 The `DESCRIPTION' file :::::::::::::::::::::::::::::::::::: 4 1.1.2 Licensing:::::::::::::::::::::::::::::::::::::::::::::::::: 9 1.1.3 The `INDEX' file :::::::::::::::::::::::::::::::::::::::::: 10 1.1.4 Package subdirectories:::::::::::::::::::::::::::::::::::: 11 1.1.5 Data in packages ::::::::::::::::::::::::::::::::::::::::: 14 1.1.6 Non-R scripts in packages :::::::::::::::::::::::::::::::: 15 1.2 Configure and cleanup :::::::::::::::::::::::::::::::::::::::: 16 1.2.1 Using `Makevars'::::::::::::::::::::::::::::::::::::::::: 19 1.2.1.1 OpenMP support:::::::::::::::::::::::::::::::::::: 22 1.2.1.2
    [Show full text]
  • Writing R Extensions
    Writing R Extensions Version 4.1.1 Patched (2021-09-22) R Core Team This manual is for R, version 4.1.1 Patched (2021-09-22). Copyright c 1999{2021 R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into an- other language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team. i Table of Contents Acknowledgements ::::::::::::::::::::::::::::::::::::::::::::::::: 1 1 Creating R packages ::::::::::::::::::::::::::::::::::::::::::: 2 1.1 Package structure :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 1.1.1 The DESCRIPTION file ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1.1.2 Licensing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 1.1.3 Package Dependencies::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 1.1.3.1 Suggested packages:::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 1.1.4 The INDEX file ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 13 1.1.5 Package subdirectories :::::::::::::::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Year of the Horse. the Months of The
    here are many animals named in the Template of the Hidden Texts which appear anomalous to the context. It turns out they are Chinese years or Celtic symbols (such as salmon) or constellations. Also there are several codes which the word HORSE indicates. The months of the horse,which happen to be the same horses as those of the "apocalypse" (the "unveiling"), the constellations: of the winged horse Scheat of Pegasus, the colt Equulus the foal, the horse's blaze Kurnah in Cepheus, Hippocampus the seahorse, Leucippe the white horse, Alpha Andromeda and then there is the Year of the Horse. The months of the horse have far too many ciphers ~ nag, Dan, ornament, Ma, ears, Be, Elm, shoe, Ara, Bau and all the other words which mean Gemini, Cancer, Virgo, Libra/October, Scorpio and Sagittarius. Something big is slotted for Sagittarius. The White Horse Warning at Uffington is Sagittarius, complete with the large cross of the bow and arrow. Sagittarius is not shown at all on the zodiac column of St John The Divine. This forum is a collection of all the lines with the word horse or fourteen coded within them. Before we get started on the year which is the beginning of the end for our current lifestyle, a pertinent detail will be outlined. The matter of the "shar" of the Nibiru system. The shar is the "year", the orbit this solar system keeps. Many people have many different numbers of our years in one shart. It seems the Anakim (the biblical spelling for a civilization who have as many names as there are tribes on Earth) do have some control over their system.
    [Show full text]
  • Porting IRIX® Applications to SGI® Altix® Platforms: SGI Propack™ for Linux®
    Porting IRIX® Applications to SGI® Altix® Platforms: SGI ProPack™ for Linux® 007-4674-001 CONTRIBUTORS WrittenbyStevenLevine Illustrated by Chrystie Danzer Production by Karen Jacobson Engineering contributions by George Pirocanac COPYRIGHT © 2004, Silicon Graphics, Inc. All rights reserved; provided portions may be copyright in third parties, as indicated elsewhere herein. No permission is granted to copy, distribute, or create derivative works from the contents of this electronic documentation in any manner, in whole or in part, without the prior written permission of Silicon Graphics, Inc. LIMITED RIGHTS LEGEND The software described in this document is “commercial computer software” provided with restricted rights (except as to included open/free source) as specified in the FAR 52.227-19 and/or the DFAR 227.7202, or successive sections. Use beyond license provisions is a violation of worldwide intellectual property laws, treaties and conventions. This document is provided with limited rights as defined in 52.227-14. TRADEMARKS AND ATTRIBUTIONS Silicon Graphics, SGI, the SGI logo, Altix, IRIX, Origin, Onyx, Onyx2, and XFS are registered trademarks and CaseVision, NUMAflex, NUMAlink, OpenMP, Performance Co-Pilot, ProDev, SGI Advanced Linux, SGI ProPack, SGIconsole, and SHMEM are trademarks of Silicon Graphics, Inc., in the United States and/or other countries worldwide. SGI Advanced Linux Environment 3.0 is based on Red Hat Enterprise Linux AS 3.0, but is not sponsored by or endorsed by Red Hat, Inc. in any way. Cray is a registered trademark of Cray, Inc. FLEXlm is a registered trademark of Macrovision Corporation. Java is a registered trademark of Sun Microsystems, Inc. in the United States and/or other countries.
    [Show full text]