R Location Of Packages

2021年4月14日
Register here: http://gg.gg/p1dg6
*R Location Of Packages Usps
*R Package DirectorylibPaths {base}R DocumentationSearch Paths for Packages
The Comprehensive R Archive Network CRAN is a network of web servers around the world where you can find the R source code, R manuals and documentation, and contributed packages. CRAN isn’t a single website; it’s a collection of web servers, each with an identical copy of all the information on CRAN. Thus, each web server is called a mirror.
Note that, every time you install an R package, R may ask you to specify a CRAN mirror (or server). Choose one that’s close to your location, and R will connect to that server to download and install the package files. It’s also possible to install multiple packages at the same time, as follow: install.packages(c(’readr’, ’ggplot2’)). Installed.packages scans the ‘ DESCRIPTION ’ files of each package found along lib.loc and returns a matrix of package names, library paths and version numbers. The information found is cached (by library) for the R session and specified fields argument, and updated only if the top-level library directory has been altered, for example by installing or removing a package.Description
.libPaths gets/sets the library trees within which packages arelooked for.Usage
*A repository is a place where packages are located so you can install them from it. Although you or your organization might have a local repository, typically they are online and accessible to everyone. Three of the most popular repositories for R packages are.
*On Location is your only source for Official Super Bowl 55 Tampa Bay ticket packages with exact seat locations & NFL verified tickets. Premium Super Bowl LV pregame hospitality closest to Raymond James Stadium, post-game field access & more!Argumentsnew
a character vector with the locations of R librarytrees. Tilde expansion (path.expand) is done, and ifany element contains one of *?[, globbing is done wheresupported by the platform: see Sys.glob.include.site
a logical value indicating whether the value of.Library.site should be included in the new set of librarytree locations. Defaulting to TRUE, it is ignored when.libPaths is called without the new argument.Details
.Library is a character string giving the location of thedefault library, the ‘library’ subdirectory of R_HOME.
.Library.site is a (possibly empty) character vector giving thelocations of the site libraries, by default the ‘site-library’subdirectory of R_HOME (which may not exist).
.libPaths is used for getting or setting the library trees thatR knows about (and hence uses when looking for packages). If calledwith argument new, by default, the library search path is set tothe existing directories in unique(c(new, .Library.site, .Library))and this is returned. If include.site is FALSE when thenew argument is set, .Library.site is excluded from thenew library search path. If called without the new argument, acharacter vector with the currently active library trees is returned.
How paths new with a trailing slash are treated isOS-dependent. On a POSIX filesystem existing directories can usuallybe specified with a trailing slash: on Windows filepaths with atrailing slash (or backslash) are invalid and so will never be addedto the library search path.
The library search path is initialized at startup from the environmentvariable R_LIBS (which should be a colon-separated list ofdirectories at which R library trees are rooted) followed by those inenvironment variable R_LIBS_USER. Only directories which existat the time will be included.
By default R_LIBS is unset, and R_LIBS_USER is set todirectory ‘R/R.version$platform-library/x.y’of the home directory (or ‘Library/R/arch/x.y/library’ forCRAN macOS builds), for Rx.y.z.
.Library.site can be set via the environment variableR_LIBS_SITE (as a non-empty colon-separated list of library trees).
Both R_LIBS_USER and R_LIBS_SITE feature possibleexpansion of specifiers for R version specific information as part ofthe startup process. The possible conversion specifiers all startwith a % and are followed by a single letter (use %%to obtain %), with currently available conversionspecifications as follows:%V
R version number including the patchlevel (e.g.,2.5.0).%v
R version number excluding the patchlevel (e.g.,2.5).%p
the platform for which R was built, the value ofR.version$platform.R Location Of Packages Usps%o
the underlying operating system, the value ofR.version$os.%a
the architecture (CPU) R was built on/for, thevalue of R.version$arch.R Package Directory
(See version for details on R version information.)
Function .libPaths always uses the values of .Libraryand .Library.site in the base namespace. .Library.sitecan be set by the site in ‘Rprofile.site’, which should befollowed by a call to .libPaths(.libPaths()) to make use of theupdated value.
For consistency, the paths are always normalized bynormalizePath(winslash = ’/’).Value
A character vector of file paths.References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)The New S Language.Wadsworth & Brooks/Cole.See AlsoExamples
When a package is installed, everything in inst/ is copied into the top-level package directory. In some sense inst/ is the opposite of .Rbuildignore - where .Rbuildignore lets you remove arbitrary files and directories from the top level, inst/ lets you add them. You are free to put anything you like in inst/ with one caution: because inst/ is copied into the top-level directory, you should never use a subdirectory with the same name as an existing directory. This means that you should avoid inst/build, inst/data, inst/demo, inst/exec, inst/help, inst/html, inst/inst, inst/libs, inst/Meta, inst/man, inst/po, inst/R, inst/src, inst/tests, inst/tools and inst/vignettes.
This chapter discusses the most common files found in inst/:
*
inst/AUTHOR and inst/COPYRIGHT. If the copyright and authorship of apackage is particularly complex, you can use plain text files,inst/COPYRIGHTS and inst/AUTHORS, to provide more information.
*
inst/CITATION: how to cite the package, seepackage citation for details.
*
inst/docs: This is an older convention for vignettes, and should be avoidedin modern packages.
*
inst/extdata: additional external data for examples and vignettes.See external data for more detail.
*
inst/java, inst/python etc. See other languages.
To find a file in inst/ from code use system.file(). For example, to find inst/extdata/mydata.csv, you’d call system.file(’extdata’, ’mydata.csv’, package = ’mypackage’). Note that you omit the inst/ directory from the path. This will work if the package is installed, or if it’s been loaded with devtools::load_all().16.1 Package citation
The CITATION file lives in the inst directory and is intimately connected to the citation() function which tells you how to cite R and R packages. Calling citation() without any arguments tells you how to cite base R:
Calling it with a package name tells you how to cite that package:
To customise the citation for your package, add a inst/CITATION that looks like this:
You need to create inst/CITATION. As you can see, it’s pretty simple: you only need to learn one new function, citEntry(). The most important arguments are:
*
entry: the type of citation, “Article”, “Book”, “PhDThesis” etc.
*
The standard bibliographic information like title, author (which shouldbe a personList()), year, journal, volume, issue, pages, …
A complete list of arguments can be found in ?bibentry.
Use citHeader() and citFooter() to add additional exhortations.16.2 Other languages
Sometimes a package contains useful supplementary scripts in other programming languages. Generally, you should avoid these, because it adds an additional extra dependency, but it may be useful when wrapping substantial amounts of code from another language. For example, gdata wraps the Perl module Spreadsheet::ParseExcel to read excel files into R.
The convention is to put scripts of this nature into a subdirectory of inst/, inst/python, inst/perl, inst/ruby etc. If these scripts are essential to your package, make sure you also add the appropriate programming language to the SystemRequirements field in the DESCRIPTION. (This field is for human reading so don’t worry about exactly how you specify it.)
Java is a special case because you need to include both the source code (which should go in java/ and be listed in .Rinstignore), and the compiled jar files (which should go in inst/java). Make sure to add rJava to Imports.
Register here: http://gg.gg/p1dg6

https://diarynote-jp.indered.space

コメント

最新の日記 一覧

<<  2025年7月  >>
293012345
6789101112
13141516171819
20212223242526
272829303112

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索