id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
R_base_tools/R_base_all_425_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# zutils: Miscellaneous Internal/Programming Utilities
## Description
Miscellaneous internal... | |
R_base_tools/strings.html7_116_0.txt | You can use the other arguments of ` regex() ` to control details of the
match:
* ` ignore_case = TRUE ` allows characters to match either their uppercase or lowercase forms. This always uses the current locale.
bananas <- c("banana", "Banana", "BANANA")
str_view(bananas, "banana")
#> [1] │ <b... | |
R_base_tools/R_base_all_81_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# identical: Test Objects for Exact Equality
## Description
The safe and reliable way to tes... | |
R_base_tools/strings.html7_86_0.txt | To extract the actual text of a match, use ` str_extract() ` . To show that
off, we’re going to need a more complicated example. I’m going to use the
Harvard sentences , which were designed to test VOIP systems, but are also
useful for practicing regexps. These are provided in ` stringr::sentences ` :
... | |
R_base_tools/stringr.html4_46_0.txt | We won’t list out all of the meta-characters here. Instead, understand that in
the next sections we will introduce a number of expressions that use special
characters. To use those characters literally, we will need to escape them in
strings.
Question 2 Return to the dataset we introduced at the beginning of the lab | |
R_base_tools/R_base_all_162_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# match.fun: Extract a Function Specified by Name
## Description
When called inside function... | |
R_base_tools/R_base_all_146_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# base-package: The R Base Package
## Description
Base R functions
## Arguments
## Detai... | |
R_base_tools/stringr.html4_53_0.txt | ### Regular Expressions
While regular expressions does refer to this entire process itself, there are
also sets of patterns that we refer to as regular expressions. A pretty decent
list is included on the cheat sheet. Here, we will finally introduce the
period we have seen so frequently in it’s natural environment. I... | |
R_base_tools/R_base_all_208_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# sys.source: Parse and Evaluate Expressions from a File
## Description
Parses expressions i... | |
R_base_tools/strings.html7_14_0.txt | Base R contains many functions to work with strings but we’ll avoid them
because they can be inconsistent, which makes them hard to remember. Instead
we’ll use functions from stringr. These have more intuitive names, and all
start with ` str_ ` . For example, ` str_length() ` tells you the number of
characters in a st... | |
R_base_tools/strings.html7_104_0.txt | #### 14.4.4.1 Exercises
1. Replace all forward slashes in a string with backslashes. | |
R_base_tools/R_base_all_248_1.txt | occur
x <- "\U10437"
charToRaw(x)
foo <- tempfile()
writeLines(x, file(foo, encoding = "UTF-16LE"))
## next two are OS-specific, but are mandated by POSIX
system(paste("od -x", foo)) # 2-byte units, correct on little-endian platform
system(paste("od -t x1", foo)) # single bytes as hex
y ... | |
R_base_tools/R_base_all_97_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# commandArgs: Extract Command Line Arguments
## Description
Provides access to a copy of th... | |
R_base_tools/R_base_all_38_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# class: Object Classes
## Description
R possesses a simple generic function mechanism whic... | |
R_base_tools/R_base_all_69_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# base-deprecated: Deprecated Functions in Package base
## Description
These functions are ... | |
R_base_tools/R_base_all_73_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# RdUtils: Utilities for Processing Rd Files
## Description
Utilities for converting files i... | |
R_base_tools/R_base_all_298_1.txt | nixes do, though). The interpretation of ` mode `
in the Windows system functions is non-POSIX and only supports setting the
read-only attribute of the file. So R interprets ` mode ` to mean set read-
only if and only if ` (mode & 0200) == 0 ` (interpreted in octal). Windows has
a much more extensive system of file p... | |
R_base_tools/stringr.html4_0_0.txt | # String Manipulation and Regular Expressions
# Preamble | |
R_base_tools/R_base_all_132_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# assignOps: Assignment Operators
## Description
Assign a value to a name.
## Usage
... | |
R_base_tools/stringr.html4_59_0.txt |
s <- c("a1", "b2", "c3", "d4")
# Only match those with 1 or 3
str_subset(s, pattern = "[13]")
## [1] "a1" "c3"
Using ` "^" ` combined with square brackets, we can also request anything but
the patterns in brackets. We need to be careful, though, because this may
match match ot... | |
R_base_tools/strings.html7_124_0.txt | ### 14.5.1 Exercises
1. How would you find all strings containing ` \ ` with ` regex() ` vs. with ` fixed() ` ? | |
R_base_tools/R_base_all_194_1.txt | ) ` ).
## See Also
` [ grep ](/link/grep?package=base&version=3.6.2) ` , ` [ adist
](/link/adist?package=base&version=3.6.2) ` . A different interface to
approximate string matching is provided by ` [ aregexec
](/link/aregexec?package=base&version=3.6.2) () ` .
## Examples
[ Run this code
](https://app.datacamp.c... | |
R_base_tools/R_base_all_2_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# conflicts: Search for Masked Objects on the Search Path
## Description
` conflicts ` repor... | |
R_base_tools/stringr.html3_20_0.txt | * ` str_extract() ` extracts text corresponding to the first match, returning a character vector. ` str_extract_all() ` extracts all matches and returns a list of character vectors.
# What are the phone numbers?
str_extract(strings, phone)
#> [1] NA "219 733 8965" "329-293-8753" "5... | |
R_base_tools/R_base_all_296_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# gc: Garbage Collection
## Description
A call of ` gc ` causes a garbage collection to take... | |
R_base_tools/R_base_all_44_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# append: Vector Merging
## Description
Add elements to a vector.
## Usage
... | |
R_base_tools/strings.html7_38_0.txt | In this book, I’ll write regular expression as ` \. ` and strings that
represent the regular expression as ` "\\." ` .
#### 14.3.1.1 Exercises | |
R_base_tools/R_base_all_361_1.txt | bout lazy evaluation, etc:
f1 <- function(x, y = x) { x <- x + 1; y }
s1 <- function(x, y = substitute(x)) { x <- x + 1; y }
s2 <- function(x, y) { if(missing(y)) y <- substitute(x); x <- x + 1; y }
a <- 10
f1(a) # 11
s1(a) # 11
s2(a) # a
typeof(s2(a)) # "symbol"
... | |
R_base_tools/R_base_all_111_1.txt | e New S Language_ .
Wadsworth & Brooks/Cole.
## See Also
` [ duplicated ](/link/duplicated?package=base&version=3.6.2) ` which gives
the indices of duplicated elements.
` [ rle ](/link/rle?package=base&version=3.6.2) ` which is the equivalent of
the Unix ` uniq -c ` command.
## Examples
[ Run this code
](https:/... | |
R_base_tools/R_base_all_408_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# save: Save R Objects
## Description
` save ` writes an external representation of R obje... | |
R_base_tools/R_base_all_279_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Colon: Colon Operator
## Description
Generate regular sequences.
## Usage
... | |
R_base_tools/R_base_all_332_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# paste: Concatenate Strings
## Description
Concatenate vectors after converting to characte... | |
R_base_tools/R_base_all_242_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# browser: Environment Browser
## Description
Interrupt the execution of an expression and a... | |
R_base_tools/R_base_all_365_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# groupGeneric: S3 Group Generic Functions
## Description
Group generic methods can be defin... | |
R_base_tools/strings.html7_10_0.txt | That means if you want to include a literal backslash, you’ll need to double
it up: ` "\\" ` .
Beware that the printed representation of a string is not the same as string
itself, because the printed representation shows the escapes. To see the raw
contents of the string, use ` writeLines() ` : | |
R_base_tools/R_base_all_249_1.txt | rsions%2F3.6.2%2Ftopics%2FtextConnection&utm_source=r-docs&utm_medium=docs&utm_term=textConnection&utm_content=run_example_in_workspace)
# NOT RUN {
zz <- textConnection(LETTERS)
readLines(zz, 2)
scan(zz, "", 4)
pushBack(c("aa", "bb"), zz)
scan(zz, "", 4)
close(zz)
zz <- ... | |
R_base_tools/R_base_all_199_5.txt | .
` warning.length ` :
sets the truncation limit for error and warning messages. A non-negative
integer, with allowed values 100…8170, default 1000.
` nwarnings ` :
the limit for the number of warnings kept when ` warn = 0 ` , default 50. This
will discard messages if called whilst they are being collec... | |
R_base_tools/stringr.html4_19_0.txt | ### Mutating Strings
#### Replace strings | |
R_base_tools/R_base_all_333_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# library.dynam: Loading DLLs from Packages
## Description
Load the specified file of compil... | |
R_base_tools/strings.html7_121_0.txt |
str_detect(a1, fixed(a2))
#> [1] FALSE
str_detect(a1, coll(a2))
#> [1] TRUE
* ` coll() ` : compare strings using standard coll ation rules. This is useful for doing case insensitive matching. Note that ` coll() ` takes a ` locale ` parameter that controls which rules are used for compari... | |
R_base_tools/R_base_all_365_1.txt | thod is found for either argument the internal method
is used.
Note that the ` [ data.frame ](/link/data.frame?package=base&version=3.6.2) ` methods for the comparison ( ` "Compare" ` : ` == ` , ` < ` , …) and logic ( ` "Logic" ` : ` & ` ` | ` and ` ! ` ) operators return a logical ` [ matrix ](/link/matrix?package=ba... | |
R_base_tools/stringr.html4_43_0.txt | ### View
While we will not include it here in the lab for brevity’s sake, there is a
very useful function called ` str_view ` which allows you to see visually the
pattern in a string by enclosing the pattern in brackets. As our regular
expressions get more sophisticated, this will help visualize what exactly your
pat... | |
R_base_tools/stringr.html4_15_0.txt | This lab will cover some of the most commonly used elements of the ` stringr `
package, as well as introduce regular expressions
A cheat sheet for both of these together is provided here: CHEATSHEET | |
R_base_tools/strings.html7_6_0.txt | ## 14.2 String basics
You can create strings with either single quotes or double quotes. Unlike
other languages, there is no difference in behaviour. I recommend always using
` " ` , unless you want to create a string that contains multiple ` " ` . | |
R_base_tools/strings.html7_97_0.txt | (Unsurprisingly, our heuristic for detecting nouns is poor, and also picks up
adjectives like smooth and parked.)
If your data is in a tibble, it’s often easier to use ` tidyr::extract() ` .
It works like ` str_match() ` but requires you to name the matches, which are
then placed in new columns: | |
R_base_tools/R_base_all_34_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# warning: Warning Messages
## Description
Generates a warning message that corresponds to i... | |
R_base_tools/R_base_all_381_1.txt | ) {
cat("current frame is", sys.nframe(), "\n")
cat("parents are", sys.parents(), "\n")
print(sys.function(0)) # ggg
print(sys.function(2)) # gg
}
if(y > 0) gg(y-1) else ggg()
}
gg(3)
t1 <- function() {
aa <- "here"
t2 <- funct... | |
R_base_tools/stringr.html3_8_0.txt | ## Whitespace
Three functions add, remove, or modify whitespace: | |
R_base_tools/R_base_all_371_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# AsIs: Inhibit Interpretation/Conversion of Objects
## Description
Change the class of an o... | |
R_base_tools/R_base_all_259_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# sink: Send R Output to a File
## Description
` sink ` diverts R output to a connection (... | |
R_base_tools/R_base_all_10_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# aperm: Array Transposition
## Description
Transpose an array by permuting its dimensions a... | |
R_base_tools/R_base_all_313_1.txt | ase%2Fversions%2F3.6.2%2Ftopics%2Fkappa&utm_source=r-docs&utm_medium=docs&utm_term=kappa&utm_content=run_example_in_workspace)
# NOT RUN {
kappa(x1 <- cbind(1, 1:10)) # 15.71
kappa(x1, exact = TRUE) # 13.68
kappa(x2 <- cbind(x1, 2:11)) # high! [x2 is singular!]
hilbert <- func... | |
R_base_tools/stringr.html4_11_0.txt | We can force coercion in the other direction, but mismatches will result in
missing ( ` NA ` ) values.
as.numeric(x)
## [1] 1 2 3 NA | |
R_base_tools/R_micropan_11_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# geneWeights: Gene cluster weighting
## Description
This function computes weights for ... | |
R_base_tools/R_base_all_242_1.txt | wse[ n ]> ` : here ` var{n} `
indicates the ‘browser level’. The browser can be called when browsing (and
often is when ` [ debug ](/link/debug?package=base&version=3.6.2) ` is in
use), and each recursive call increases the number. (The actual number is the
number of ‘contexts’ on the context stack: this is usually `... | |
R_base_tools/R_base_all_131_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# table: Cross Tabulation and Table Creation
## Description
` table ` uses the cross-classif... | |
R_base_tools/stringr.html3_13_0.txt | ## Locale sensitive
A handful of stringr functions are locale-sensitive: they will perform
differently in different regions of the world. These functions are case
transformation functions: | |
R_base_tools/R_base_all_251_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# attach: Attach Set of R Objects to Search Path
## Description
The database is attached to ... | |
R_base_tools/R_base_all_294_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# rank: Sample Ranks
## Description
Returns the sample ranks of the values in a vector. Ties... | |
R_base_tools/strings.html7_91_0.txt | You’ll learn more about lists in lists and iteration .
If you use ` simplify = TRUE ` , ` str_extract_all() ` will return a matrix
with short matches expanded to the same length as the longest: | |
R_base_tools/strings.html7_44_0.txt | You can also match the boundary between words with ` \b ` . I don’t often use
this in R, but I will sometimes use it when I’m doing a search in RStudio when
I want to find the name of a function that’s a component of other functions.
For example, I’ll search for ` \bsum\b ` to avoid matching ` summarise ` , `
summary `... | |
R_base_tools/R_micropan_37_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# plot.Panpca: Plotting and printing ` Panpca ` objects
## Description
Generic functions... | |
R_base_tools/R_base_all_22_1.txt | rm=pretty&utm_content=run_example_in_workspace)
Powered by [ DataCamp ](https://www.datacamp.com/)
| |
R_base_tools/strings.html7_75_0.txt |
# How many common words start with t?
sum(str_detect(words, "^t"))
#> [1] 65
# What proportion of common words end with a vowel?
mean(str_detect(words, "[aeiou]$"))
#> [1] 0.2765306
When you have complex logical conditions (e.g. match a or b but not c unless
d) it’s often easier to co... | |
R_base_tools/R_base_all_28_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# gzcon: (De)compress I/O Through Connections
## Description
` gzcon ` provides a modified c... | |
R_base_tools/R_base_all_155_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# range: Range of Values
## Description
` range ` returns a vector containing the minimum an... | |
R_base_tools/R_base_all_168_1.txt | ong the search path for executables given by the environment variable ` PATH ` .
Packages often want to supply dependent DLLs in their ` libs ` directory, and
do this by setting the ` PATH ` variable ( ` [ library.dynam
](/link/library.dynam?package=base&version=3.6.2) ` does that automatically in
recent versions of ... | |
R_base_tools/R_base_all_312_1.txt |
# NOT RUN {
x <- c("abcd", "efgh", "abce")
abbreviate(x, 2)
abbreviate(x, 2, strict = TRUE) # >> 1st and 3rd are == "ab"
(st.abb <- abbreviate(state.name, 2))
stopifnot(identical(unname(st.abb),
abbreviate(state.name, 2, named=FALSE)))
table(nchar(st.abb)) # out ... | |
R_base_tools/R_base_all_325_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# on.exit: Function Exit Code
## Description
` on.exit ` records the expression given as its... | |
R_base_tools/R_base_all_282_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# bquote: Partial substitution in expressions
## Description
An analogue of the LISP backquo... | |
R_base_tools/R_base_all_119_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# names: The Names of an Object
## Description
Functions to get or set the names of an objec... | |
R_base_tools/R_base_all_231_2.txt | o handle indexing of
specific classes of objects, see [ InternalMethods
](/link/InternalMethods?package=base&version=3.6.2) as well as ` [
[.data.frame ](/link/%5B.data.frame?package=base&version=3.6.2) ` and ` [
[.factor ](/link/%5B.factor?package=base&version=3.6.2) ` . The descriptions
here apply only to the default... | |
R_base_tools/R_base_all_314_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# license: The R License Terms
## Description
The license terms under which R is distribut... | |
R_base_tools/R_base_all_145_2.txt | same length restriction: as from R
3.2.0 input matrices with more elements (but meeting the row and column
restrictions) are allowed.
## References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.
## See Also
` [ c ](/link/c?package=base&version=3.6.2) ` to c... | |
R_base_tools/strings.html6_3_0.txt |
Download PDF | |
R_base_tools/R_base_all_31_2.txt | ass ` "libraryIQR" ` . (The
structure of this class may change in future versions.) Use ` .packages(all =
TRUE) ` to obtain just the names of all available packages, and ` [
installed.packages ](/link/installed.packages?package=base&version=3.6.2) () `
for even more information.
` library(help = somename) ` computes b... | |
R_base_tools/R_base_all_65_1.txt | s, and the known R
library trees. These are now dynamic variables which one can get or set using
` [ .dynLibs ](/link/.dynLibs?package=base&version=3.6.2) ` and ` [ .libPaths
](/link/.libPaths?package=base&version=3.6.2) ` , respectively.
` Machine() ` and ` Platform() ` were functions returning the variables ` [
.Ma... | |
R_base_tools/R_base_all_17_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Logic: Logical Operators
## Description
These operators act on raw, logical and number-lik... | |
R_base_tools/strings.html7_15_0.txt | The common ` str_ ` prefix is particularly useful if you use RStudio, because
typing ` str_ ` will trigger autocomplete, allowing you to see all stringr
functions:
### 14.2.2 Combining strings | |
R_base_tools/R_base_all_199_8.txt | etRepositories?package=base&version=3.6.2) ` and to select from
multiple (text) help files in ` [ help
](/link/help?package=base&version=3.6.2) ` .
` Ncpus ` :
an integer \\(n \ge 1\\), used in ` [ install.packages
](/link/install.packages?package=base&version=3.6.2) ` as default for the
number of cpus to use i... | |
R_base_tools/R_base_all_1_2.txt | he more complicated methods (especially ` "Mersenne-Twister" ` and `
"Knuth-TAOCP" ` ). There is no guarantee that different values of ` seed `
will seed the RNG differently, although any exceptions would be extremely
rare. If called with ` seed = NULL ` it re-initializes (see ‘Note’) as if no
seed had yet been set.
T... | |
R_base_tools/R_base_all_359_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# callCC: Call With Current Continuation
## Description
A downward-only version of Scheme's ... | |
R_base_tools/R_base_all_372_1.txt | s since an epoch), but
_only_ if ` origin ` is supplied.
The ` format ` and ` as.character ` methods ignore any fractional part of the
date.
## References
International Organization for Standardization (2004, 1988, 1997, …) _ISO
8601. Data elements and interchange formats -- Information interchange --
Representatio... | |
R_base_tools/R_base_all_320_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# dots: …, ` ..1 ` , etc used in Functions
## Description
` … ` and ` ..1 ` , ` ..2 ` etc ar... | |
R_base_tools/R_micropan_38_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# getAccessions: Collecting contig accession numbers
## Description
Retrieving the acces... | |
R_base_tools/R_base_all_191_1.txt | I <- seq_len(k); chartr(p0(A), p0(c(A[-I], A[I])), ch)
}
pw <- "my secret pass phrase"
(crypw <- rot(pw, 13)) #-> you can send this off
## now ``decrypt'' :
rot(crypw, 54 - 13) # -> the original:
stopifnot(identical(pw, rot(crypw, 54 - 13)))
# }
Run the code above in your br... | |
R_base_tools/R_base_all_86_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# ls: List Objects
## Description
` ls ` and ` objects ` return a vector of character string... | |
R_base_tools/R_base_all_394_1.txt | aN
1/0 + 1/0 # Inf
1/0 - 1/0 # NaN
stopifnot(
1/0 == Inf,
1/Inf == 0
)
sin(Inf)
cos(Inf)
tan(Inf)
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversion... | |
R_base_tools/R_base_all_58_1.txt |
Although not guaranteed, it is a reasonable assumption that if present long
doubles will have at least as much range and accuracy as the ISO/IEC 60559
80-bit ‘extended precision’ format.
libcurl
is ` libcurl ` available in this build? Used by function ` [ curlGetHeaders
](/link/curlGetHeaders?package=base&vers... | |
R_base_tools/R_base_all_397_1.txt | Character versions are sorted lexicographically, and this depends on the
collating sequence of the locale in use: the help for ‘ [ Comparison
](/link/Comparison?package=base&version=3.6.2) ’ gives details. The max/min of
an empty character vector is defined to be character ` NA ` . (One could argue
that as ` "" ` is th... | |
R_base_tools/R_base_all_232_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Primitive: Look Up a Primitive Function
## Description
` .Primitive ` looks up by name a ‘... | |
R_base_tools/strings.html6_11_0.txt | * ` str_replace_all(string, pattern, replacement) ` : Replace all matched patterns in each string. Also ` str_remove_all() ` .
str_replace_all(fruit, "p", "-")
* ` str_to_lower(string, locale = "en") ` 1 : Convert strings to lower case.
str_to_lower(sentences) | |
R_base_tools/stringr.html3_0_0.txt | # Introduction to stringr
There are four main families of functions in stringr: | |
R_base_tools/strings.html7_52_0.txt | 1. Start with a vowel.
2. That only contain consonants. (Hint: thinking about matching “not”-vowels.) | |
R_base_tools/stringr.html3_5_0.txt | You can access individual character using ` str_sub() ` . It takes three
arguments: a character vector, a ` start ` position and an ` end ` position.
Either position can either be a positive integer, which counts from the left,
or a negative integer which counts from the right. The positions are
inclusive, and if longe... | |
R_base_tools/R_base_all_311_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# exists: Is an Object Defined?
## Description
Look for an R object of the given name and ... | |
R_base_tools/R_base_all_396_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# jitter: ‘Jitter’ (Add Noise) to Numbers
## Description
Add a small amount of noise to a nu... | |
R_base_tools/R_micropan_31_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# panMatrix: Computing the pan-matrix for a set of gene clusters
## Description
A pan-ma... | |
R_base_tools/R_base_all_85_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# iconv: Convert Character Vector between Encodings
## Description
This uses system faciliti... | |
R_base_tools/R_base_all_92_2.txt | nimal storage. _Communications of the ACM_ , **12** , 185--186.
10.1145/362875.362901.
## See Also
‘ [ Comparison ](/link/Comparison?package=base&version=3.6.2) ’ for how
character strings are collated.
` [ order ](/link/order?package=base&version=3.6.2) ` for sorting on or
reordering multiple variables.
` [ is.un... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.