diff --git a/articles/building-reproducible-development-environments-with-rix.html b/articles/building-reproducible-development-environments-with-rix.html index 8d0ef855..1d824151 100644 --- a/articles/building-reproducible-development-environments-with-rix.html +++ b/articles/building-reproducible-development-environments-with-rix.html @@ -178,7 +178,7 @@

Day-to-day use of {rix} overwrite = TRUE)

This generates the following default.nix file:

#> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:52 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes
@@ -242,7 +242,7 @@ 

Day-to-day use of {rix}(note the value provided to the ide argument).

This generates the following default.nix file:

#> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:52 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes
@@ -299,7 +299,7 @@ 

Running old projects with {rix}= TRUE)

The file looks like this:

#> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:53 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
@@ -354,7 +354,7 @@ 

Installing old packages archiv
 cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
 #> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:53 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
@@ -428,7 +428,7 @@ 

Installing packages from Github
 cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
 #> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:34:59 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:55 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
@@ -509,7 +509,7 @@ 

A complete example
 cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
 #> 
-#> # This file was generated by the {rix} R package on Sat Aug 12 11:35:01 2023
+#> # This file was generated by the {rix} R package on Sat Aug 12 13:22:57 2023
 #> # with following call:
 #> RIX_CALL
 #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
diff --git a/index.html b/index.html
index e6a8667f..a6362b76 100644
--- a/index.html
+++ b/index.html
@@ -206,6 +206,7 @@ 

Dev status

  • R-CMD-check
  • runiverse-package rix
  • +
  • Docs

diff --git a/pkgdown.yml b/pkgdown.yml index b8184c45..0898792d 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -7,5 +7,5 @@ articles: interactive-use: interactive-use.html reproducible-analytical-pipelines-with-nix: reproducible-analytical-pipelines-with-nix.html save-the-nix-package-versions-data: save-the-nix-package-versions-data.html -last_built: 2023-08-12T11:34Z +last_built: 2023-08-12T13:22Z diff --git a/search.json b/search.json index 63f33d0e..c3b0549c 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" 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 3 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, see . Copyright (C) This program 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."},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"introduction-and-installation","dir":"Articles","previous_headings":"","what":"Introduction and installation","title":"Building reproducible development environments with rix","text":"goal {rix} provide easy way generate default.nix files. files used Nix package manager build environment according instructions defined . Users can specify version R, R packages, needed software, IDE etc available within environment. Writing files can daunting newcomers, {rix} provides function called rix(), takes care bulk work {rix} require Nix installed generate default.nix files, generate file one machine, build use environment another machine Nix installed (CI/CD service like Github Actions example). wish fully take advantage Nix, suggest use Determinate System’s installer. Nix can installed Linux, macOS Windows (Windows WSL2 must enabled). Linux, Nix instaled, software installed saved /nix directory root partition. Complete development environments built Nix can take much space, available space root parttion limited, advise mount /nix folder another partition space (example, secondary hard drive). , edit /etc/fstab add following line end: map /nix /home/path_to/nix can larger partition. enough space root partition, can ignore instructions.","code":"/home/path_to/nix /nix none bind 0 0"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"nix-environments","dir":"Articles","previous_headings":"","what":"Nix environments","title":"Building reproducible development environments with rix","text":"environment built Nix totally isolated rest system. Suppose program sl installed system, suppose build Nix environment also comes sl. activate environment, version sl run called one included Nix environment. , however, start sl Nix environment come , system’s sl get used instead. can useful working interactively Nix environment, can use usual IDE work . exception RStudio: RStudio looks R predefined paths “see” R provided Nix environment, instead use version installed machine. means use RStudio work interactively R, need install RStudio inside environment. rix::rix() can generate default.nix file .","code":""},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"day-to-day-use-of-rix","dir":"Articles","previous_headings":"","what":"Day-to-day use of {rix}","title":"Building reproducible development environments with rix","text":"ideal workflow using {rix} create new, separate environment start project. Let’s say wish analyse data set, need dplyr ggplot2. Let’s also suppose use RStudio IDE. rix::rix() function, can easily generate right default.nix file. need provide following inputs rix(): r_ver: version R required. Use “current” latest version; r_pkgs: required R packages. example “dplyr”; other_pkgs: required system packages, needed. example “quarto”, Python interpreter; git_pkgs: list git packages add. See example ; ide: integrated development editor use. example “rstudio” want use RStudio. Refer “Interactive work {rix}” details; path: path save default.nix file. overwrite: whether overwrite default.nix file . situation, create environment following call rix(): generates following default.nix file: start using environment, open console folder containing default.nix use following Nix command: nix-build Nix command builds environment according specifications found default.nix file. environment done building, find new file called result next default.nix file. file symlink software installed Nix. now use environment, type: can now start RStudio provided environment typing rstudio. start version RStudio specific environment. already RStudio installed using operating system’s installer, version RStudio able interact Nix environments. RStudio looks R certain specific paths don’t include Nix environments. case editors like Visual Studio Code Emacs. use Visual Studio Code, can use following call rix(): (note value provided ide argument). generates following default.nix file: can see, specifying ide = \"code\" adds languageserver package list packages must installed environment. Visual Studio Code requires package interact R. install Nix environment-specific version Visual Studio Code. Now, instead typing rstudio Nix shell environment, type code start Visual Studio Code usually use. use another editor, like Emacs, use ide = \"\", start editor inside activated Nix environment. details interactive use, read “Interactive use” vignette.","code":"path_default_nix <- tempdir() rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes #> # which will install R version current #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 #> #> ]; #> }; #> my-rstudio = rstudioWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 #> #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> my-rstudio #> ]; #> } nix-build nix-shell path_default_nix <- tempdir() rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"code\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes #> # which will install R version current #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 languageserver #> #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"running-old-projects-with-rix","dir":"Articles","previous_headings":"","what":"Running old projects with {rix}","title":"Building reproducible development environments with rix","text":"example shows create default.nix instructions build environment R version 4.2.1, dplyr janitor packages specific IDE: file looks like : first line quite important, shows revision nixpkgs used environment. revision commit hash particular release nixpkgs, : 79b3d4bcae8. revision nixpkgs one shipped version 4.2.1 R, dplyr janitor packages get installed versions available revision well. means R versions package versions always coupled using Nix. However, need specific version R, also specific version package available particular Nix revision, one solution install package Github.","code":"path_default_nix <- tempdir() rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor\"), other_pkgs = c(\"quarto\"), git_pkgs = NULL, ide = \"other\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr janitor #> #> ]; #> }; #> other-pkgs = [quarto]; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> other-pkgs #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"installing-old-packages-archived-on-cran","dir":"Articles","previous_headings":"","what":"Installing old packages archived on CRAN","title":"Building reproducible development environments with rix","text":"also possible install arbitrary version package archived CRAN: feature ideally used sparingly. want reconstruct environment around 2019, use version R current time. ensure every package gets installed version compatible version R, might case need install old version one particular package.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr@0.8.0\", \"janitor@1.0.0\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"other\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:34:57 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> #> (buildRPackage { #> name = \"dplyr\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.8.0.tar.gz\"; #> sha256 = \"sha256-f30raalLd9KoZKZSxeTN71PG6BczXRIiP6g7EZeH09U=\"; #> }; #> propagatedBuildInputs = [ #> assertthat glue magrittr pkgconfig R6 Rcpp rlang tibble tidyselect BH plogr Rcpp #> ]; #> }) #> (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"installing-packages-from-github","dir":"Articles","previous_headings":"","what":"Installing packages from Github","title":"Building reproducible development environments with rix","text":"also possible install packages Github: install two packages Github: {housing} package specifically code fusen branch. commit also provided, pin exact version package needed. fusen package also installed, main branch commit d617172447d.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor\"), other_pkgs = c(\"quarto\"), git_pkgs = list( list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), list(package_name = \"fusen\", repo_url = \"https://github.com/ThinkR-open/fusen\", branch_name = \"main\", commit = \"d617172447d2947efb20ad6a4463742b8a5d79dc\") ), ide = \"other\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:34:59 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr janitor #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) #> ]; #> }; #> other-pkgs = [quarto]; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> other-pkgs #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"a-complete-example","dir":"Articles","previous_headings":"","what":"A complete example","title":"Building reproducible development environments with rix","text":"example shows features {rix} can work together: learn using {rix} daily basis, read Interactive use vignette.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor@1.0.0\"), other_pkgs = c(\"quarto\"), git_pkgs = list( list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), list(package_name = \"fusen\", repo_url = \"https://github.com/ThinkR-open/fusen\", branch_name = \"main\", commit = \"d617172447d2947efb20ad6a4463742b8a5d79dc\") ), ide = \"rstudio\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 11:35:01 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> other-pkgs = [quarto]; #> my-rstudio = rstudioWrapper.override { #> packages = with rPackages; [ #> dplyr #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> my-rstudio #> other-pkgs #> ]; #> }"},{"path":"/articles/interactive-use.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Interactive use","text":"vignette describes interactive use environments built {rix} using GUI editor like RStudio. discuss two scenarios: one already R RStudio installed operating system using usual installation method operating system, another used Nix install R RStudio (IDE).","code":""},{"path":"/articles/interactive-use.html","id":"scenario-1-you-installed-r-and-rstudio-as-usual","dir":"Articles","previous_headings":"","what":"Scenario 1: you installed R and RStudio as usual","title":"Interactive use","text":"Let’s suppose already running R RStudio wish start using {rix} define reproducible environments new projects starting today. environments get built using Nix package manager include required R packages project also specific version R, required system-level dependency well. used using RStudio, also need install RStudio using Nix project-specific environments. run project-specific version RStudio R, first need create default.nix file build environment defined therein using Nix. done, need activate environment running project-specific version RStudio. Suppose example generated default.nix file project called “kmeans”, suppose project following path: ~/Documents/kmeans (Windows something like C:\\Users\\Billy\\Documents\\kmeans). Navigate folder using terminal, run nix-shell. dropped Nix shell. can type rstudio run project specific version RStudio packages. can work usual. can also define shortcut project take care activating environment launching rstudio. example, define bash alias like : execute RStudio right project simply typing kmeans terminal. ’s also possible create executable script can save PATH: Name script something like kmeans_project, make executable (using chmod +x kmeans_project), now can run RStudio within environment anywhere.","code":"alias kmeans='nix-shell ~/Documents/kmeans/default.nix --run rstudio # !/usr/bin/env nix-shell # !nix-shell /home/Billy/Document/kmeans/default.nix -i bash rstudio"},{"path":"/articles/interactive-use.html","id":"scenario-2-you-install-r-and-rstudio-using-nix","dir":"Articles","previous_headings":"","what":"Scenario 2: you install R and RStudio using Nix","title":"Interactive use","text":"don’t R installed use {rix} package generate new expressions. case might consider installing Nix first, running following command inside terminal get dropped temporary Nix shell, can use generate new default.nix files: Running command download R {rix} start R session inside terminal. can now run something like : generate default.nix, use file generate environment R, Rstudio, dplyr ggplot2. need add packages project, rerun command , add needed packages r_pkgs.","code":"nix-shell --expr \"$(curl -sl https://raw.githubusercontent.com/b-rodrigues/rix/master/inst/extdata/default.nix)\" rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = \".\", # change to a project's path overwrite = TRUE)"},{"path":"/articles/interactive-use.html","id":"other-ides","dir":"Articles","previous_headings":"","what":"Other IDEs","title":"Interactive use","text":"Visual Studio Code Emacs tested unlike RStudio, can use version either VS Code Emacs already installed system. ’s nothing stopping installing project-specific version VS Code Emacs well. Configuration settings accessible across every version every environment, since globally defined level system.","code":""},{"path":"/articles/reproducible-analytical-pipelines-with-nix.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Reproducible Analytical Pipelines with Nix","text":"Isolated environments great run pipelines safe reproducible manner. vignette details build reproducible analytical pipeline using environment built Nix contains right version R packages.","code":""},{"path":"/articles/reproducible-analytical-pipelines-with-nix.html","id":"an-example-of-a-reproducible-analytical-pipeline-using-nix","dir":"Articles","previous_headings":"","what":"An example of a reproducible analytical pipeline using Nix","title":"Reproducible Analytical Pipelines with Nix","text":"Suppose used targets build pipeline project using tailor-made Nix environment. call rix() used build environment: call rix() generates following default.nix file: environment gets built default.nix file contains R version 4.2.2, targets tarchetypes packages, well {housing} packages, package developing specifically project. Github, gets installed using buildRPackage function Nix. can use environment work project, launch targets pipeline. Github repository contains finalized project. use targets execute pipeline environment running terminal: wish run pipeline whenever drop Nix shell, add Shell-hook generated default.nix file: Now, time drop Nix shell project using nix-shell, pipeline gets automatically executed.","code":"rix(r_ver = \"4.2.2\", r_pkgs = c(\"targets\", \"tarchetypes\", \"rmarkdown\"), other_pkgs = NULL, git_pkgs = list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), ide = \"other\", project_path = \".\", overwrite = TRUE) # This file was generated by the {rix} R package on Sat Aug 5 16:43:41 2023 # It uses nixpkgs' revision 8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8 for reproducibility purposes # which will install R version 4.2.2 # Report any issues to https://github.com/b-rodrigues/rix { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8.tar.gz\") {} }: with pkgs; let my-r = rWrapper.override { packages = with rPackages; [ targets tarchetypes rmarkdown (buildRPackage { name = \"housing\"; src = fetchgit { url = \"https://github.com/rap4all/housing/\"; branchName = \"fusen\"; rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; }; propagatedBuildInputs = [ dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr ]; }) ]; }; in mkShell { LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; buildInputs = [ my-r ]; } cd /absolute/path/to/housing/ && nix-shell default.nix --run \"Rscript -e 'targets::tar_make()'\" ... mkShell { shellHook = '' Rscript -e \"targets::tar_make()\" ''; LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; buildInputs = [ my-r ]; }"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bruno Rodrigues. Author, maintainer. Philipp Baumann. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rodrigues B, Baumann P (2023). rix: Rix: Reproducible Environments Nix. R package version 0.1.1.","code":"@Manual{, title = {rix: Rix: Reproducible Environments With Nix}, author = {Bruno Rodrigues and Philipp Baumann}, year = {2023}, note = {R package version 0.1.1}, }"},{"path":[]},{"path":"/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Rix: Reproducible Environments With Nix","text":"{rix} R package provides functions help setup reproducible isolated development environments contain R required packages need project. achieved using Nix package manager must install separately. Nix package manager extremely powerful: , possible work totally reproducible development environments, even install old releases R R packages. Nix, essentially possible replace renv Docker combined. need tools languages like Python Julia, can also done easily. Nix available Linux, macOS Windows.","code":""},{"path":"/index.html","id":"the-nix-package-manager","dir":"","previous_headings":"","what":"The Nix package manager","title":"Rix: Reproducible Environments With Nix","text":"Nix piece software can installed computer (regardless OS) can used install software like package manager. ’re familiar Ubuntu Linux distribution, likely used apt-get install software. macOS, may used homebrew similar purposes. Nix functions similar way, many advantages classic package managers. main advantage Nix, least purposes, repository software huge. writing, contains 80’000 packages, entirety CRAN available Nix’s repositories. means using Nix, possible install R, also packages required project. obvious question use Nix instead simply installing R R packages usual. answer Nix makes sure install every dependency package, required system libraries. example, xlsx package requires Java programming language installed computer successfully install. can difficult achieve, xlsx bullied many R developers throughout years (especially using Linux distribution, sudo R CMD javareconf still plagues nightmares). Nix, suffices declare want xlsx package project, Nix figures automatically Java required installs configures . just happens without required intervention user. second advantage Nix possible pin certain revision project. Pinning revision ensures every package Nix installs always exactly versions, regardless future packages get installed.","code":""},{"path":"/index.html","id":"rix-workflow","dir":"","previous_headings":"","what":"Rix workflow","title":"Rix: Reproducible Environments With Nix","text":"idea {rix} declare environment need, using provided rix() function, turn generates required file Nix actually generate environment. can use environment either work interactively, run R scripts. possible many environments projects. environment isolated (, ’s ). main function {rix} called rix(). rix() several arguments: R version need project list R packages project needs optional list additional software (example, Python interpreter, Quarto) optional list packages install Github whether want use RStudio IDE project (VS Code, another environment) path save file called default.nix. example: call writes default.nix file current working directory. default.nix can turn used Nix build environment containing RStudio, current (latest) version R, latest versions dplyr {chronicler} packages. th case RStudio, actually needs installed environment. RStudio changes default environment variables globally installed RStudio (one install normally) recognize R installed Nix environment. case IDEs VS code Emacs. Another example: call generate default.nix installs R version 4.1.0, dplyr {chronicler} packages. user wishes use VS Code, ide argument set “code”. installs required languageserver package well, unlike ide = \"rstudio\" install VS Code environment. Users instead use globally installed VS Code. ’s also possible install specific versions packages: usually better build environment using version R current time release dplyr version 1.0.0, instead using current version R install old package.","code":"rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"chronicler\"), ide = \"rstudio\") rix(r_ver = \"4.1.0\", r_pkgs = c(\"dplyr\", \"chronicler\"), ide = \"code\") rix(r_ver = \"current\", r_pkgs = c(\"dplyr@1.0.0\"), ide = \"code\")"},{"path":"/index.html","id":"defaultnix","dir":"","previous_headings":"Rix workflow","what":"default.nix","title":"Rix: Reproducible Environments With Nix","text":"Nix package manager can used build reproducible development environments according specifications found file called default.nix, contains expression, Nix jargon. make easier R programmers use Nix, {rix} can used write file . {rix} require Nix installed, generate expressions use machines. actually build environment using default.nix, file, go chose write (ideally new, empty folder root folder project) use Nix package manager build environment. Call following function terminal: Nix done building environment, can start working interactively using following command: drop Nix shell. can now call IDE choice. RStudio, simply call: start RStudio. RStudio use version R library packages environment.","code":"nix-build nix-shell rstudio"},{"path":"/index.html","id":"running-programs-from-an-environment","dir":"","previous_headings":"Rix workflow","what":"Running programs from an environment","title":"Rix: Reproducible Environments With Nix","text":"create bash script put path make process streamlined. example, project called housing, create script execute start project: execute RStudio environment housing project. use targets execute pipeline environment running: ’s possible execute pipeline automatically using -called “shell hook”. See “Non-interactive use” vignette details.","code":"!#/bin/bash nix-shell /absolute/path/to/housing/default.nix --run rstudio cd /absolute/path/to/housing/ && nix-shell default.nix --run \"Rscript -e 'targets::tar_make()'\""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Rix: Reproducible Environments With Nix","text":"can install development version rix GitHub : can install {rix} r-universe, serves CRAN-like R package repository: stated , {rix} require Nix installed generate default.nix files. machine R already installed, want start using {rix} generate default.nix files, first start installing Nix, use following command drop temporary Nix shell comes R {rix} pre-installed: immediately start R session inside terminal. can now run something like : generate default.nix, use file generate environment R, Rstudio, dplyr ggplot2. need add packages project, rerun command , add needed packages r_pkgs.","code":"# install.packages(\"remotes\") remotes::install_github(\"b-rodrigues/rix\") install.packages(\"rix\", repos = c(\"https://b-rodrigues.r-universe.dev\", \"https://cloud.r-project.org\")) nix-shell --expr \"$(curl -sl https://raw.githubusercontent.com/b-rodrigues/rix/master/inst/extdata/default.nix)\" rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = \".\", overwrite = TRUE)"},{"path":[]},{"path":"/index.html","id":"windows-pre-requisites","dir":"","previous_headings":"Installing Nix","what":"Windows pre-requisites","title":"Rix: Reproducible Environments With Nix","text":"Windows, need Windows Subsystem Linux 2 (WSL2) run Nix. recent version Windows 10 11, can simply run administrator PowerShell: can find installation notes official MS documentation.","code":"wsl --install"},{"path":"/index.html","id":"installing-nix-using-the-determinate-systems-installer","dir":"","previous_headings":"Installing Nix","what":"Installing Nix using the Determinate Systems installer","title":"Rix: Reproducible Environments With Nix","text":"make installation de-installation Nix simple, recommend Determinate Systems installer can find . installer works system make uninstalling Nix easy well.","code":""},{"path":"/index.html","id":"docker","dir":"","previous_headings":"Installing Nix","what":"Docker","title":"Rix: Reproducible Environments With Nix","text":"can also try Nix inside Docker. , can start image NixOS Docker image. NixOS full GNU/Linux distribution uses Nix system package manager.","code":""},{"path":"/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Rix: Reproducible Environments With Nix","text":"package developed using fusen package. want contribute, please edit .Rmd files found dev/ folder. , inflate package using fusen::inflate_all(). errors found (warning notes ok), commit open PR. learn use fusen (don’t worry, ’s super easy), refer vignette.","code":""},{"path":"/reference/available_r.html","id":null,"dir":"Reference","previous_headings":"","what":"available_r List available R versions — available_r","title":"available_r List available R versions — available_r","text":"available_r List available R versions","code":""},{"path":"/reference/available_r.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"available_r List available R versions — available_r","text":"","code":"available_r()"},{"path":"/reference/available_r.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"available_r List available R versions — available_r","text":"character vector containing available R versrions.","code":""},{"path":"/reference/available_r.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"available_r List available R versions — available_r","text":"","code":"available_r() #> [1] \"current\" \"3.0.2\" \"3.0.3\" \"3.1.0\" \"3.1.2\" \"3.1.3\" \"3.2.0\" #> [8] \"3.2.1\" \"3.2.2\" \"3.2.3\" \"3.2.4\" \"3.3.3\" \"3.4.0\" \"3.4.1\" #> [15] \"3.4.2\" \"3.4.3\" \"3.4.4\" \"3.5.0\" \"3.5.1\" \"3.5.2\" \"3.5.3\" #> [22] \"3.6.0\" \"3.6.1\" \"3.6.2\" \"3.6.3\" \"4.0.0\" \"4.0.2\" \"4.0.3\" #> [29] \"4.0.4\" \"4.1.1\" \"4.1.2\" \"4.1.3\" \"4.2.0\" \"4.2.1\" \"4.2.2\""},{"path":"/reference/find_rev.html","id":null,"dir":"Reference","previous_headings":"","what":"find_rev Find the right Nix revision — find_rev","title":"find_rev Find the right Nix revision — find_rev","text":"find_rev Find right Nix revision","code":""},{"path":"/reference/find_rev.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"find_rev Find the right Nix revision — find_rev","text":"","code":"find_rev(r_version)"},{"path":"/reference/find_rev.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"find_rev Find the right Nix revision — find_rev","text":"r_version Character. R version look , example, \"4.2.0\". nixpkgs revision provided instead, gets returned.","code":""},{"path":"/reference/find_rev.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"find_rev Find the right Nix revision — find_rev","text":"character. Nix revision use","code":""},{"path":"/reference/find_rev.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"find_rev Find the right Nix revision — find_rev","text":"","code":"find_rev(\"4.2.0\") #> [1] \"f597e7e9fcf37d8ed14a12835ede0a7d362314bd\""},{"path":"/reference/get_current.html","id":null,"dir":"Reference","previous_headings":"","what":"get_current Get the current R version and packages — get_current","title":"get_current Get the current R version and packages — get_current","text":"get_current Get current R version packages","code":""},{"path":"/reference/get_current.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_current Get the current R version and packages — get_current","text":"","code":"get_current()"},{"path":"/reference/get_current.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_current Get the current R version and packages — get_current","text":"character. commit hash latest nixpkgs-unstable revision","code":""},{"path":"/reference/nix_build.html","id":null,"dir":"Reference","previous_headings":"","what":"Invoke shell command nix-build from an R session — nix_build","title":"Invoke shell command nix-build from an R session — nix_build","text":"Invoke shell command nix-build R session","code":""},{"path":"/reference/nix_build.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invoke shell command nix-build from an R session — nix_build","text":"","code":"nix_build(project_path = \".\", exec_mode = c(\"blocking\", \"non-blocking\"))"},{"path":"/reference/nix_build.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invoke shell command nix-build from an R session — nix_build","text":"project_path Path folder default.nix file resides. session. exec_mode Either \"blocking\" (default) \"non-blocking. either block R session nix-build shell command executed, run nix-build background (\"non-blocking\").","code":""},{"path":"/reference/nix_build.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Invoke shell command nix-build from an R session — nix_build","text":"integer process ID (PID) nix-build shell command launched, nix_build() call assigned R object. Otherwise, returned \"invisible\".","code":""},{"path":"/reference/r_nix_revs.html","id":null,"dir":"Reference","previous_headings":"","what":"r_nix_revs — r_nix_revs","title":"r_nix_revs — r_nix_revs","text":"Nix revisions old R releases","code":""},{"path":"/reference/r_nix_revs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"r_nix_revs — r_nix_revs","text":"","code":"r_nix_revs"},{"path":"/reference/r_nix_revs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"r_nix_revs — r_nix_revs","text":"data frame 34 rows 3 variables: version R version revision Nix revision containing version R date Date revision available","code":""},{"path":"/reference/r_nix_revs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"r_nix_revs — r_nix_revs","text":"Nix Package Version, Marcelo Lazaroni","code":""},{"path":"/reference/rix.html","id":null,"dir":"Reference","previous_headings":"","what":"rix Generates a Nix expression that builds a reproducible development environment — rix","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"rix Generates Nix expression builds reproducible development environment","code":""},{"path":"/reference/rix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"","code":"rix( r_ver = \"current\", r_pkgs, other_pkgs = NULL, git_pkgs = NULL, ide = \"other\", project_path = \".\", overwrite = FALSE )"},{"path":"/reference/rix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"r_ver Character, defaults \"current\". required R version. use current version R, use \"current\". can check R versions available using available_r. nixpkgs revision provided instead, gets returned. r_pkgs Vector characters. List required R packages analysis . other_pkgs Vector characters. List software wish install R packages command line applications example. git_pkgs List. list packages install Git. See details information. ide Character, defaults \"\". wish use RStudio work interactively use \"rstudio\", \"code\" Visual Studio Code. editors, use \"\". tested RStudio, VS Code Emacs. editors work, please open issue. project_path Character, defaults current working directory. write default.nix, example \"/home/path//project\". file thus written file \"/home/path//project/default.nix\". overwrite Logical, defaults FALSE. TRUE, overwrite default.nix file specified path.","code":""},{"path":"/reference/rix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"Nothing, function side-effect writing file called \"default.nix\" working directory. file contains expression build reproducible environment using Nix package manager.","code":""},{"path":"/reference/rix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"function write default.nix chosen path. Using Nix package manager, possible build reproducible development environment using nix-build command path. environment contain chosen version R packages, interfere installed version (via Nix ) machine. Every dependency, including R package dependencies also system dependencies like compilers get installed well environment. use RStudio interactive work, set rstudio parameter TRUE. use another IDE (example Emacs Visual Studio Code), need add default.nix file, can simply use version installed computer. built environment using nix-build, can drop interactive session using nix-shell. See \"Building reproducible development environments rix\" vignette detailled instructions. Packages install Github must provided list 4 elements: \"package_name\", \"repo_url\", \"branch_name\" \"commit\". argument can also list lists 4 elements. also possible install old versions packages specifying version. example, install latest version {AER} old version {ggplot2}, write: r_pkgs = c(\"AER\", \"ggplot2@2.2.1\"). Note however result dependency hell, older version package might need older versions dependencies, packages might need recent version dependencies. instead want use environment looked time {ggplot2}'s version 2.2.1 release, use Nix revision closest date, setting r_ver = \"3.1.0\", version R current time. ensures Nix builds complete coherent environment.","code":""},{"path":[]},{"path":[]},{"path":"/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"","what":"New features","title":"rix 0.1.0 (2023-08-11)","text":"Added nix_build() helper runs nix-build interactively R. (#22) rix() now supports installing packages GitHub CRAN archives. rix() now supports using nixpkgs revision instead R version reproducibility Generated default.nix files now also include call made generate top-level comment.","code":""},{"path":"/news/index.html","id":"changes-0-1-0","dir":"Changelog","previous_headings":"","what":"Changes","title":"rix 0.1.0 (2023-08-11)","text":"path argument rix() changed project_path.","code":""},{"path":"/news/index.html","id":"rix-development-version","dir":"Changelog","previous_headings":"","what":"rix (development version)","title":"rix (development version)","text":"Basic functionality added.","code":""}] +[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" 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 3 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, see . Copyright (C) This program 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."},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"introduction-and-installation","dir":"Articles","previous_headings":"","what":"Introduction and installation","title":"Building reproducible development environments with rix","text":"goal {rix} provide easy way generate default.nix files. files used Nix package manager build environment according instructions defined . Users can specify version R, R packages, needed software, IDE etc available within environment. Writing files can daunting newcomers, {rix} provides function called rix(), takes care bulk work {rix} require Nix installed generate default.nix files, generate file one machine, build use environment another machine Nix installed (CI/CD service like Github Actions example). wish fully take advantage Nix, suggest use Determinate System’s installer. Nix can installed Linux, macOS Windows (Windows WSL2 must enabled). Linux, Nix instaled, software installed saved /nix directory root partition. Complete development environments built Nix can take much space, available space root parttion limited, advise mount /nix folder another partition space (example, secondary hard drive). , edit /etc/fstab add following line end: map /nix /home/path_to/nix can larger partition. enough space root partition, can ignore instructions.","code":"/home/path_to/nix /nix none bind 0 0"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"nix-environments","dir":"Articles","previous_headings":"","what":"Nix environments","title":"Building reproducible development environments with rix","text":"environment built Nix totally isolated rest system. Suppose program sl installed system, suppose build Nix environment also comes sl. activate environment, version sl run called one included Nix environment. , however, start sl Nix environment come , system’s sl get used instead. can useful working interactively Nix environment, can use usual IDE work . exception RStudio: RStudio looks R predefined paths “see” R provided Nix environment, instead use version installed machine. means use RStudio work interactively R, need install RStudio inside environment. rix::rix() can generate default.nix file .","code":""},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"day-to-day-use-of-rix","dir":"Articles","previous_headings":"","what":"Day-to-day use of {rix}","title":"Building reproducible development environments with rix","text":"ideal workflow using {rix} create new, separate environment start project. Let’s say wish analyse data set, need dplyr ggplot2. Let’s also suppose use RStudio IDE. rix::rix() function, can easily generate right default.nix file. need provide following inputs rix(): r_ver: version R required. Use “current” latest version; r_pkgs: required R packages. example “dplyr”; other_pkgs: required system packages, needed. example “quarto”, Python interpreter; git_pkgs: list git packages add. See example ; ide: integrated development editor use. example “rstudio” want use RStudio. Refer “Interactive work {rix}” details; path: path save default.nix file. overwrite: whether overwrite default.nix file . situation, create environment following call rix(): generates following default.nix file: start using environment, open console folder containing default.nix use following Nix command: nix-build Nix command builds environment according specifications found default.nix file. environment done building, find new file called result next default.nix file. file symlink software installed Nix. now use environment, type: can now start RStudio provided environment typing rstudio. start version RStudio specific environment. already RStudio installed using operating system’s installer, version RStudio able interact Nix environments. RStudio looks R certain specific paths don’t include Nix environments. case editors like Visual Studio Code Emacs. use Visual Studio Code, can use following call rix(): (note value provided ide argument). generates following default.nix file: can see, specifying ide = \"code\" adds languageserver package list packages must installed environment. Visual Studio Code requires package interact R. install Nix environment-specific version Visual Studio Code. Now, instead typing rstudio Nix shell environment, type code start Visual Studio Code usually use. use another editor, like Emacs, use ide = \"\", start editor inside activated Nix environment. details interactive use, read “Interactive use” vignette.","code":"path_default_nix <- tempdir() rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:52 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes #> # which will install R version current #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 #> #> ]; #> }; #> my-rstudio = rstudioWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 #> #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> my-rstudio #> ]; #> } nix-build nix-shell path_default_nix <- tempdir() rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"code\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:52 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd for reproducibility purposes #> # which will install R version current #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr ggplot2 languageserver #> #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"running-old-projects-with-rix","dir":"Articles","previous_headings":"","what":"Running old projects with {rix}","title":"Building reproducible development environments with rix","text":"example shows create default.nix instructions build environment R version 4.2.1, dplyr janitor packages specific IDE: file looks like : first line quite important, shows revision nixpkgs used environment. revision commit hash particular release nixpkgs, : 79b3d4bcae8. revision nixpkgs one shipped version 4.2.1 R, dplyr janitor packages get installed versions available revision well. means R versions package versions always coupled using Nix. However, need specific version R, also specific version package available particular Nix revision, one solution install package Github.","code":"path_default_nix <- tempdir() rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor\"), other_pkgs = c(\"quarto\"), git_pkgs = NULL, ide = \"other\", project_path = path_default_nix, overwrite = TRUE) #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:53 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr janitor #> #> ]; #> }; #> other-pkgs = [quarto]; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> other-pkgs #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"installing-old-packages-archived-on-cran","dir":"Articles","previous_headings":"","what":"Installing old packages archived on CRAN","title":"Building reproducible development environments with rix","text":"also possible install arbitrary version package archived CRAN: feature ideally used sparingly. want reconstruct environment around 2019, use version R current time. ensure every package gets installed version compatible version R, might case need install old version one particular package.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr@0.8.0\", \"janitor@1.0.0\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"other\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:53 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> #> (buildRPackage { #> name = \"dplyr\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.8.0.tar.gz\"; #> sha256 = \"sha256-f30raalLd9KoZKZSxeTN71PG6BczXRIiP6g7EZeH09U=\"; #> }; #> propagatedBuildInputs = [ #> assertthat glue magrittr pkgconfig R6 Rcpp rlang tibble tidyselect BH plogr Rcpp #> ]; #> }) #> (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"installing-packages-from-github","dir":"Articles","previous_headings":"","what":"Installing packages from Github","title":"Building reproducible development environments with rix","text":"also possible install packages Github: install two packages Github: {housing} package specifically code fusen branch. commit also provided, pin exact version package needed. fusen package also installed, main branch commit d617172447d.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor\"), other_pkgs = c(\"quarto\"), git_pkgs = list( list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), list(package_name = \"fusen\", repo_url = \"https://github.com/ThinkR-open/fusen\", branch_name = \"main\", commit = \"d617172447d2947efb20ad6a4463742b8a5d79dc\") ), ide = \"other\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:55 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr janitor #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) #> ]; #> }; #> other-pkgs = [quarto]; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> other-pkgs #> ]; #> }"},{"path":"/articles/building-reproducible-development-environments-with-rix.html","id":"a-complete-example","dir":"Articles","previous_headings":"","what":"A complete example","title":"Building reproducible development environments with rix","text":"example shows features {rix} can work together: learn using {rix} daily basis, read Interactive use vignette.","code":"rix(r_ver = \"4.2.1\", r_pkgs = c(\"dplyr\", \"janitor@1.0.0\"), other_pkgs = c(\"quarto\"), git_pkgs = list( list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), list(package_name = \"fusen\", repo_url = \"https://github.com/ThinkR-open/fusen\", branch_name = \"main\", commit = \"d617172447d2947efb20ad6a4463742b8a5d79dc\") ), ide = \"rstudio\", project_path = path_default_nix, overwrite = TRUE) cat(readLines(paste0(path_default_nix, \"/default.nix\")), sep = \"\\n\") #> #> # This file was generated by the {rix} R package on Sat Aug 12 13:22:57 2023 #> # with following call: #> RIX_CALL #> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes #> # which will install R version 4.2.1 #> # Report any issues to https://github.com/b-rodrigues/rix #> { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a.tar.gz\") {} }: #> #> with pkgs; #> #> let #> my-r = rWrapper.override { #> packages = with rPackages; [ #> dplyr #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> other-pkgs = [quarto]; #> my-rstudio = rstudioWrapper.override { #> packages = with rPackages; [ #> dplyr #> (buildRPackage { #> name = \"housing\"; #> src = fetchgit { #> url = \"https://github.com/rap4all/housing/\"; #> branchName = \"fusen\"; #> rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; #> sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr #> ]; #> }) #> (buildRPackage { #> name = \"fusen\"; #> src = fetchgit { #> url = \"https://github.com/ThinkR-open/fusen\"; #> branchName = \"main\"; #> rev = \"d617172447d2947efb20ad6a4463742b8a5d79dc\"; #> sha256 = \"sha256-TOHA1ymLUSgZMYIA1a2yvuv0799svaDOl3zOhNRxcmw=\"; #> }; #> propagatedBuildInputs = [ #> attachment cli desc devtools glue here magrittr parsermd roxygen2 stringi tibble tidyr usethis yaml #> ]; #> }) (buildRPackage { #> name = \"janitor\"; #> src = fetchzip { #> url = \"https://cran.r-project.org/src/contrib/Archive/janitor/janitor_1.0.0.tar.gz\"; #> sha256 = \"sha256-3NJomE/CNbOZ+ohuVZJWe2n1RVGUm8x8a0A0qzLmdN4=\"; #> }; #> propagatedBuildInputs = [ #> dplyr tidyr snakecase magrittr purrr rlang #> ]; #> }) #> ]; #> }; #> in #> mkShell { #> LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; #> buildInputs = [ #> my-r #> my-rstudio #> other-pkgs #> ]; #> }"},{"path":"/articles/interactive-use.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Interactive use","text":"vignette describes interactive use environments built {rix} using GUI editor like RStudio. discuss two scenarios: one already R RStudio installed operating system using usual installation method operating system, another used Nix install R RStudio (IDE).","code":""},{"path":"/articles/interactive-use.html","id":"scenario-1-you-installed-r-and-rstudio-as-usual","dir":"Articles","previous_headings":"","what":"Scenario 1: you installed R and RStudio as usual","title":"Interactive use","text":"Let’s suppose already running R RStudio wish start using {rix} define reproducible environments new projects starting today. environments get built using Nix package manager include required R packages project also specific version R, required system-level dependency well. used using RStudio, also need install RStudio using Nix project-specific environments. run project-specific version RStudio R, first need create default.nix file build environment defined therein using Nix. done, need activate environment running project-specific version RStudio. Suppose example generated default.nix file project called “kmeans”, suppose project following path: ~/Documents/kmeans (Windows something like C:\\Users\\Billy\\Documents\\kmeans). Navigate folder using terminal, run nix-shell. dropped Nix shell. can type rstudio run project specific version RStudio packages. can work usual. can also define shortcut project take care activating environment launching rstudio. example, define bash alias like : execute RStudio right project simply typing kmeans terminal. ’s also possible create executable script can save PATH: Name script something like kmeans_project, make executable (using chmod +x kmeans_project), now can run RStudio within environment anywhere.","code":"alias kmeans='nix-shell ~/Documents/kmeans/default.nix --run rstudio # !/usr/bin/env nix-shell # !nix-shell /home/Billy/Document/kmeans/default.nix -i bash rstudio"},{"path":"/articles/interactive-use.html","id":"scenario-2-you-install-r-and-rstudio-using-nix","dir":"Articles","previous_headings":"","what":"Scenario 2: you install R and RStudio using Nix","title":"Interactive use","text":"don’t R installed use {rix} package generate new expressions. case might consider installing Nix first, running following command inside terminal get dropped temporary Nix shell, can use generate new default.nix files: Running command download R {rix} start R session inside terminal. can now run something like : generate default.nix, use file generate environment R, Rstudio, dplyr ggplot2. need add packages project, rerun command , add needed packages r_pkgs.","code":"nix-shell --expr \"$(curl -sl https://raw.githubusercontent.com/b-rodrigues/rix/master/inst/extdata/default.nix)\" rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = \".\", # change to a project's path overwrite = TRUE)"},{"path":"/articles/interactive-use.html","id":"other-ides","dir":"Articles","previous_headings":"","what":"Other IDEs","title":"Interactive use","text":"Visual Studio Code Emacs tested unlike RStudio, can use version either VS Code Emacs already installed system. ’s nothing stopping installing project-specific version VS Code Emacs well. Configuration settings accessible across every version every environment, since globally defined level system.","code":""},{"path":"/articles/reproducible-analytical-pipelines-with-nix.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Reproducible Analytical Pipelines with Nix","text":"Isolated environments great run pipelines safe reproducible manner. vignette details build reproducible analytical pipeline using environment built Nix contains right version R packages.","code":""},{"path":"/articles/reproducible-analytical-pipelines-with-nix.html","id":"an-example-of-a-reproducible-analytical-pipeline-using-nix","dir":"Articles","previous_headings":"","what":"An example of a reproducible analytical pipeline using Nix","title":"Reproducible Analytical Pipelines with Nix","text":"Suppose used targets build pipeline project using tailor-made Nix environment. call rix() used build environment: call rix() generates following default.nix file: environment gets built default.nix file contains R version 4.2.2, targets tarchetypes packages, well {housing} packages, package developing specifically project. Github, gets installed using buildRPackage function Nix. can use environment work project, launch targets pipeline. Github repository contains finalized project. use targets execute pipeline environment running terminal: wish run pipeline whenever drop Nix shell, add Shell-hook generated default.nix file: Now, time drop Nix shell project using nix-shell, pipeline gets automatically executed.","code":"rix(r_ver = \"4.2.2\", r_pkgs = c(\"targets\", \"tarchetypes\", \"rmarkdown\"), other_pkgs = NULL, git_pkgs = list(package_name = \"housing\", repo_url = \"https://github.com/rap4all/housing/\", branch_name = \"fusen\", commit = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"), ide = \"other\", project_path = \".\", overwrite = TRUE) # This file was generated by the {rix} R package on Sat Aug 5 16:43:41 2023 # It uses nixpkgs' revision 8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8 for reproducibility purposes # which will install R version 4.2.2 # Report any issues to https://github.com/b-rodrigues/rix { pkgs ? import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8.tar.gz\") {} }: with pkgs; let my-r = rWrapper.override { packages = with rPackages; [ targets tarchetypes rmarkdown (buildRPackage { name = \"housing\"; src = fetchgit { url = \"https://github.com/rap4all/housing/\"; branchName = \"fusen\"; rev = \"1c860959310b80e67c41f7bbdc3e84cef00df18e\"; sha256 = \"sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4=\"; }; propagatedBuildInputs = [ dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr ]; }) ]; }; in mkShell { LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; buildInputs = [ my-r ]; } cd /absolute/path/to/housing/ && nix-shell default.nix --run \"Rscript -e 'targets::tar_make()'\" ... mkShell { shellHook = '' Rscript -e \"targets::tar_make()\" ''; LOCALE_ARCHIVE = \"${glibcLocales}/lib/locale/locale-archive\"; buildInputs = [ my-r ]; }"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bruno Rodrigues. Author, maintainer. Philipp Baumann. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rodrigues B, Baumann P (2023). rix: Rix: Reproducible Environments Nix. R package version 0.1.1.","code":"@Manual{, title = {rix: Rix: Reproducible Environments With Nix}, author = {Bruno Rodrigues and Philipp Baumann}, year = {2023}, note = {R package version 0.1.1}, }"},{"path":[]},{"path":"/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Rix: Reproducible Environments With Nix","text":"{rix} R package provides functions help setup reproducible isolated development environments contain R required packages need project. achieved using Nix package manager must install separately. Nix package manager extremely powerful: , possible work totally reproducible development environments, even install old releases R R packages. Nix, essentially possible replace renv Docker combined. need tools languages like Python Julia, can also done easily. Nix available Linux, macOS Windows.","code":""},{"path":"/index.html","id":"the-nix-package-manager","dir":"","previous_headings":"","what":"The Nix package manager","title":"Rix: Reproducible Environments With Nix","text":"Nix piece software can installed computer (regardless OS) can used install software like package manager. ’re familiar Ubuntu Linux distribution, likely used apt-get install software. macOS, may used homebrew similar purposes. Nix functions similar way, many advantages classic package managers. main advantage Nix, least purposes, repository software huge. writing, contains 80’000 packages, entirety CRAN available Nix’s repositories. means using Nix, possible install R, also packages required project. obvious question use Nix instead simply installing R R packages usual. answer Nix makes sure install every dependency package, required system libraries. example, xlsx package requires Java programming language installed computer successfully install. can difficult achieve, xlsx bullied many R developers throughout years (especially using Linux distribution, sudo R CMD javareconf still plagues nightmares). Nix, suffices declare want xlsx package project, Nix figures automatically Java required installs configures . just happens without required intervention user. second advantage Nix possible pin certain revision project. Pinning revision ensures every package Nix installs always exactly versions, regardless future packages get installed.","code":""},{"path":"/index.html","id":"rix-workflow","dir":"","previous_headings":"","what":"Rix workflow","title":"Rix: Reproducible Environments With Nix","text":"idea {rix} declare environment need, using provided rix() function, turn generates required file Nix actually generate environment. can use environment either work interactively, run R scripts. possible many environments projects. environment isolated (, ’s ). main function {rix} called rix(). rix() several arguments: R version need project list R packages project needs optional list additional software (example, Python interpreter, Quarto) optional list packages install Github whether want use RStudio IDE project (VS Code, another environment) path save file called default.nix. example: call writes default.nix file current working directory. default.nix can turn used Nix build environment containing RStudio, current (latest) version R, latest versions dplyr {chronicler} packages. th case RStudio, actually needs installed environment. RStudio changes default environment variables globally installed RStudio (one install normally) recognize R installed Nix environment. case IDEs VS code Emacs. Another example: call generate default.nix installs R version 4.1.0, dplyr {chronicler} packages. user wishes use VS Code, ide argument set “code”. installs required languageserver package well, unlike ide = \"rstudio\" install VS Code environment. Users instead use globally installed VS Code. ’s also possible install specific versions packages: usually better build environment using version R current time release dplyr version 1.0.0, instead using current version R install old package.","code":"rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"chronicler\"), ide = \"rstudio\") rix(r_ver = \"4.1.0\", r_pkgs = c(\"dplyr\", \"chronicler\"), ide = \"code\") rix(r_ver = \"current\", r_pkgs = c(\"dplyr@1.0.0\"), ide = \"code\")"},{"path":"/index.html","id":"defaultnix","dir":"","previous_headings":"Rix workflow","what":"default.nix","title":"Rix: Reproducible Environments With Nix","text":"Nix package manager can used build reproducible development environments according specifications found file called default.nix, contains expression, Nix jargon. make easier R programmers use Nix, {rix} can used write file . {rix} require Nix installed, generate expressions use machines. actually build environment using default.nix, file, go chose write (ideally new, empty folder root folder project) use Nix package manager build environment. Call following function terminal: Nix done building environment, can start working interactively using following command: drop Nix shell. can now call IDE choice. RStudio, simply call: start RStudio. RStudio use version R library packages environment.","code":"nix-build nix-shell rstudio"},{"path":"/index.html","id":"running-programs-from-an-environment","dir":"","previous_headings":"Rix workflow","what":"Running programs from an environment","title":"Rix: Reproducible Environments With Nix","text":"create bash script put path make process streamlined. example, project called housing, create script execute start project: execute RStudio environment housing project. use targets execute pipeline environment running: ’s possible execute pipeline automatically using -called “shell hook”. See “Non-interactive use” vignette details.","code":"!#/bin/bash nix-shell /absolute/path/to/housing/default.nix --run rstudio cd /absolute/path/to/housing/ && nix-shell default.nix --run \"Rscript -e 'targets::tar_make()'\""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Rix: Reproducible Environments With Nix","text":"can install development version rix GitHub : can install {rix} r-universe, serves CRAN-like R package repository: stated , {rix} require Nix installed generate default.nix files. machine R already installed, want start using {rix} generate default.nix files, first start installing Nix, use following command drop temporary Nix shell comes R {rix} pre-installed: immediately start R session inside terminal. can now run something like : generate default.nix, use file generate environment R, Rstudio, dplyr ggplot2. need add packages project, rerun command , add needed packages r_pkgs.","code":"# install.packages(\"remotes\") remotes::install_github(\"b-rodrigues/rix\") install.packages(\"rix\", repos = c(\"https://b-rodrigues.r-universe.dev\", \"https://cloud.r-project.org\")) nix-shell --expr \"$(curl -sl https://raw.githubusercontent.com/b-rodrigues/rix/master/inst/extdata/default.nix)\" rix(r_ver = \"current\", r_pkgs = c(\"dplyr\", \"ggplot2\"), other_pkgs = NULL, git_pkgs = NULL, ide = \"rstudio\", project_path = \".\", overwrite = TRUE)"},{"path":[]},{"path":"/index.html","id":"windows-pre-requisites","dir":"","previous_headings":"Installing Nix","what":"Windows pre-requisites","title":"Rix: Reproducible Environments With Nix","text":"Windows, need Windows Subsystem Linux 2 (WSL2) run Nix. recent version Windows 10 11, can simply run administrator PowerShell: can find installation notes official MS documentation.","code":"wsl --install"},{"path":"/index.html","id":"installing-nix-using-the-determinate-systems-installer","dir":"","previous_headings":"Installing Nix","what":"Installing Nix using the Determinate Systems installer","title":"Rix: Reproducible Environments With Nix","text":"make installation de-installation Nix simple, recommend Determinate Systems installer can find . installer works system make uninstalling Nix easy well.","code":""},{"path":"/index.html","id":"docker","dir":"","previous_headings":"Installing Nix","what":"Docker","title":"Rix: Reproducible Environments With Nix","text":"can also try Nix inside Docker. , can start image NixOS Docker image. NixOS full GNU/Linux distribution uses Nix system package manager.","code":""},{"path":"/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Rix: Reproducible Environments With Nix","text":"package developed using fusen package. want contribute, please edit .Rmd files found dev/ folder. , inflate package using fusen::inflate_all(). errors found (warning notes ok), commit open PR. learn use fusen (don’t worry, ’s super easy), refer vignette.","code":""},{"path":"/reference/available_r.html","id":null,"dir":"Reference","previous_headings":"","what":"available_r List available R versions — available_r","title":"available_r List available R versions — available_r","text":"available_r List available R versions","code":""},{"path":"/reference/available_r.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"available_r List available R versions — available_r","text":"","code":"available_r()"},{"path":"/reference/available_r.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"available_r List available R versions — available_r","text":"character vector containing available R versrions.","code":""},{"path":"/reference/available_r.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"available_r List available R versions — available_r","text":"","code":"available_r() #> [1] \"current\" \"3.0.2\" \"3.0.3\" \"3.1.0\" \"3.1.2\" \"3.1.3\" \"3.2.0\" #> [8] \"3.2.1\" \"3.2.2\" \"3.2.3\" \"3.2.4\" \"3.3.3\" \"3.4.0\" \"3.4.1\" #> [15] \"3.4.2\" \"3.4.3\" \"3.4.4\" \"3.5.0\" \"3.5.1\" \"3.5.2\" \"3.5.3\" #> [22] \"3.6.0\" \"3.6.1\" \"3.6.2\" \"3.6.3\" \"4.0.0\" \"4.0.2\" \"4.0.3\" #> [29] \"4.0.4\" \"4.1.1\" \"4.1.2\" \"4.1.3\" \"4.2.0\" \"4.2.1\" \"4.2.2\""},{"path":"/reference/find_rev.html","id":null,"dir":"Reference","previous_headings":"","what":"find_rev Find the right Nix revision — find_rev","title":"find_rev Find the right Nix revision — find_rev","text":"find_rev Find right Nix revision","code":""},{"path":"/reference/find_rev.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"find_rev Find the right Nix revision — find_rev","text":"","code":"find_rev(r_version)"},{"path":"/reference/find_rev.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"find_rev Find the right Nix revision — find_rev","text":"r_version Character. R version look , example, \"4.2.0\". nixpkgs revision provided instead, gets returned.","code":""},{"path":"/reference/find_rev.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"find_rev Find the right Nix revision — find_rev","text":"character. Nix revision use","code":""},{"path":"/reference/find_rev.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"find_rev Find the right Nix revision — find_rev","text":"","code":"find_rev(\"4.2.0\") #> [1] \"f597e7e9fcf37d8ed14a12835ede0a7d362314bd\""},{"path":"/reference/get_current.html","id":null,"dir":"Reference","previous_headings":"","what":"get_current Get the current R version and packages — get_current","title":"get_current Get the current R version and packages — get_current","text":"get_current Get current R version packages","code":""},{"path":"/reference/get_current.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_current Get the current R version and packages — get_current","text":"","code":"get_current()"},{"path":"/reference/get_current.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_current Get the current R version and packages — get_current","text":"character. commit hash latest nixpkgs-unstable revision","code":""},{"path":"/reference/nix_build.html","id":null,"dir":"Reference","previous_headings":"","what":"Invoke shell command nix-build from an R session — nix_build","title":"Invoke shell command nix-build from an R session — nix_build","text":"Invoke shell command nix-build R session","code":""},{"path":"/reference/nix_build.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invoke shell command nix-build from an R session — nix_build","text":"","code":"nix_build(project_path = \".\", exec_mode = c(\"blocking\", \"non-blocking\"))"},{"path":"/reference/nix_build.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invoke shell command nix-build from an R session — nix_build","text":"project_path Path folder default.nix file resides. session. exec_mode Either \"blocking\" (default) \"non-blocking. either block R session nix-build shell command executed, run nix-build background (\"non-blocking\").","code":""},{"path":"/reference/nix_build.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Invoke shell command nix-build from an R session — nix_build","text":"integer process ID (PID) nix-build shell command launched, nix_build() call assigned R object. Otherwise, returned \"invisible\".","code":""},{"path":"/reference/r_nix_revs.html","id":null,"dir":"Reference","previous_headings":"","what":"r_nix_revs — r_nix_revs","title":"r_nix_revs — r_nix_revs","text":"Nix revisions old R releases","code":""},{"path":"/reference/r_nix_revs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"r_nix_revs — r_nix_revs","text":"","code":"r_nix_revs"},{"path":"/reference/r_nix_revs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"r_nix_revs — r_nix_revs","text":"data frame 34 rows 3 variables: version R version revision Nix revision containing version R date Date revision available","code":""},{"path":"/reference/r_nix_revs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"r_nix_revs — r_nix_revs","text":"Nix Package Version, Marcelo Lazaroni","code":""},{"path":"/reference/rix.html","id":null,"dir":"Reference","previous_headings":"","what":"rix Generates a Nix expression that builds a reproducible development environment — rix","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"rix Generates Nix expression builds reproducible development environment","code":""},{"path":"/reference/rix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"","code":"rix( r_ver = \"current\", r_pkgs, other_pkgs = NULL, git_pkgs = NULL, ide = \"other\", project_path = \".\", overwrite = FALSE )"},{"path":"/reference/rix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"r_ver Character, defaults \"current\". required R version. use current version R, use \"current\". can check R versions available using available_r. nixpkgs revision provided instead, gets returned. r_pkgs Vector characters. List required R packages analysis . other_pkgs Vector characters. List software wish install R packages command line applications example. git_pkgs List. list packages install Git. See details information. ide Character, defaults \"\". wish use RStudio work interactively use \"rstudio\", \"code\" Visual Studio Code. editors, use \"\". tested RStudio, VS Code Emacs. editors work, please open issue. project_path Character, defaults current working directory. write default.nix, example \"/home/path//project\". file thus written file \"/home/path//project/default.nix\". overwrite Logical, defaults FALSE. TRUE, overwrite default.nix file specified path.","code":""},{"path":"/reference/rix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"Nothing, function side-effect writing file called \"default.nix\" working directory. file contains expression build reproducible environment using Nix package manager.","code":""},{"path":"/reference/rix.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"rix Generates a Nix expression that builds a reproducible development environment — rix","text":"function write default.nix chosen path. Using Nix package manager, possible build reproducible development environment using nix-build command path. environment contain chosen version R packages, interfere installed version (via Nix ) machine. Every dependency, including R package dependencies also system dependencies like compilers get installed well environment. use RStudio interactive work, set rstudio parameter TRUE. use another IDE (example Emacs Visual Studio Code), need add default.nix file, can simply use version installed computer. built environment using nix-build, can drop interactive session using nix-shell. See \"Building reproducible development environments rix\" vignette detailled instructions. Packages install Github must provided list 4 elements: \"package_name\", \"repo_url\", \"branch_name\" \"commit\". argument can also list lists 4 elements. also possible install old versions packages specifying version. example, install latest version {AER} old version {ggplot2}, write: r_pkgs = c(\"AER\", \"ggplot2@2.2.1\"). Note however result dependency hell, older version package might need older versions dependencies, packages might need recent version dependencies. instead want use environment looked time {ggplot2}'s version 2.2.1 release, use Nix revision closest date, setting r_ver = \"3.1.0\", version R current time. ensures Nix builds complete coherent environment.","code":""},{"path":[]},{"path":[]},{"path":"/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"","what":"New features","title":"rix 0.1.0 (2023-08-11)","text":"Added nix_build() helper runs nix-build interactively R. (#22) rix() now supports installing packages GitHub CRAN archives. rix() now supports using nixpkgs revision instead R version reproducibility Generated default.nix files now also include call made generate top-level comment.","code":""},{"path":"/news/index.html","id":"changes-0-1-0","dir":"Changelog","previous_headings":"","what":"Changes","title":"rix 0.1.0 (2023-08-11)","text":"path argument rix() changed project_path.","code":""},{"path":"/news/index.html","id":"rix-development-version","dir":"Changelog","previous_headings":"","what":"rix (development version)","title":"rix (development version)","text":"Basic functionality added.","code":""}]