id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
R_base_tools/R_base_all_379_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)
# double: Double-Precision Vectors
## Description
Create, coerce to or test for a double-pre... | |
R_base_tools/strings.html6_2_0.txt | * Edit this page
* Report an issue
# String manipulation with stringr :: Cheatsheet | |
R_base_tools/R_base_all_80_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.readlink: Read File Symbolic Links
## Description
Find out if a file path is a symboli... | |
R_base_tools/R_base_all_307_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)
# message: Diagnostic Messages
## Description
Generate a diagnostic message from its argumen... | |
R_base_tools/R_base_all_328_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)
# getDLLRegisteredRoutines: Reflectance Information for C/Fortran routines in
a DLL
## Descri... | |
R_base_tools/strings.html7_93_0.txt | 1. In the previous example, you might have noticed that the regular expression matched “flickered”, which is not a colour. Modify the regex to fix the problem.
2. From the Harvard sentences data, extract: | |
R_base_tools/strings.html7_101_0.txt | ` str_replace() ` and ` str_replace_all() ` allow you to replace matches
with new strings. The simplest use is to replace a pattern with a fixed
string:
x <- c("apple", "pear", "banana")
str_replace(x, "[aeiou]", "-")
#> [1] "-pple" "p-ar" "b-nana"
str_replace_all(x, "[aeiou]", "-")
... | |
R_base_tools/R_base_all_385_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)
# Dates: Date Class
## Description
Description of the class ` "Date" ` representing calendar... | |
R_base_tools/strings.html7_2_0.txt | * Welcome
* 1 Introduction
* Explore
* 2 Introduction
* 3 Data visualisation
* 4 Workflow: basics
* 5 Data transformation
* 6 Workflow: scripts
* 7 Exploratory Data Analysis
* 8 Workflow: projects
* Wrangle
* 9 Introduction
* 10 Tibbles
* 11 Data import
* 12 Tidy ... | |
R_base_tools/R_base_all_11_1.txt | "col")
x3 <- array(x, dim = c(dim(x),3),
dimnames = c(dimnames(x), list(C = paste0("cop.",1:3))))
identical(x, apply( x, 2, identity))
identical(x3, apply(x3, 2:3, identity))
# }
# NOT RUN {
##- function with extra args:
cave <- function(x, c1, c2) c(mean(x[c1]), mean(x[c2]))
... | |
R_base_tools/strings.html7_23_0.txt |
x <- c("Apple", "Banana", "Pear")
str_sub(x, 1, 3)
#> [1] "App" "Ban" "Pea"
# negative numbers count backwards from end
str_sub(x, -3, -1)
#> [1] "ple" "ana" "ear"
Note that ` str_sub() ` won’t fail if the string is too short: it will just
return as much as possible: | |
R_base_tools/strings.html6_10_0.txt | * ` str_sub() <- value ` : Replace substrings by identifying the substrings with ` str_sub() ` and assigning into the results.
str_sub(fruit, 1, 3) <- "str"
* ` str_replace(string, pattern, replacement) ` : Replace the first matched pattern in each string. Also ` str_remove() ` .
str_re... | |
R_base_tools/R_base_all_168_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)
# dyn.load: Foreign Function Interface
## Description
Load or unload DLLs (also known as sha... | |
R_base_tools/strings.html7_26_0.txt | Above I used ` str_to_lower() ` to change the text to lower case. You can
also use ` str_to_upper() ` or ` str_to_title() ` . However, changing case
is more complicated than it might at first appear because different languages
have different rules for changing case. You can pick which set of rules to use
by specifyi... | |
R_base_tools/R_base_all_113_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)
# Trig: Trigonometric Functions
## Description
These functions give the obvious trigonometri... | |
R_base_tools/R_base_all_24_1.txt | nk/is.list?package=base&version=3.6.2) ` , etc.
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fvector&utm_source=r-docs&utm_medium=docs&utm_term=vector&utm_content=run_example_in_workspace)
# NOT RUN {
df ... | |
R_base_tools/R_base_all_269_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)
# readline: Read a Line from the Terminal
## Description
` readline ` reads a line from the ... | |
R_base_tools/R_base_all_248_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)
# utf8Conversion: Convert Integer Vectors to or from UTF-8-encoded Character
Vectors
## Descr... | |
R_base_tools/R_base_all_190_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)
# split: Divide into Groups and Reassemble
## Description
` split ` divides the data in the ... | |
R_base_tools/strings.html7_65_0.txt | (Shortly, you’ll also see how they’re useful in conjunction with ` str_match()
` .)
#### 14.3.5.1 Exercises | |
R_base_tools/R_micropan_19_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)
# dClust: Clustering sequences based on domain sequence
## Description
Proteins are clus... | |
R_base_tools/strings.html7_27_0.txt | The locale is specified as a ISO 639 language code, which is a two or three
letter abbreviation. If you don’t already know the code for your language,
Wikipedia has a good list. If you leave the locale blank, it will use the
current locale, as provided by your operating system.
Another important operation that’s affe... | |
R_base_tools/R_base_all_84_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)
# .Script: Scripting Language Interface
## Description
Internal interface to run a script th... | |
R_base_tools/R_base_all_305_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)
# file.show: Display One or More Text Files
## Description
Display one or more (plain) text ... | |
R_base_tools/R_base_all_72_1.txt | ther different and is reported by `
icuGetCollate("actual") ` , often ` "root" ` ). Most English locales fall back
to ` "root" ` as although e.g. ` "en_GB" ` is a valid locale (at least on some
platforms), it contains no special rules for collation. Note that ` "C" ` is
not a supported ICU locale and hence ` R_ICU_LOCA... | |
R_base_tools/R_base_all_87_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)
# is.language: Is an Object a Language Object?
## Description
` is.language ` returns ` TRUE... | |
R_base_tools/R_base_all_166_1.txt | se&version=3.6.2) ` , which
attempts to convert to a numeric matrix.
A matrix is the special case of a two-dimensional ` [ array
](/link/array?package=base&version=3.6.2) ` .
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fm... | |
R_base_tools/R_micropan_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
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# distJaccard: Computing Jaccard distances between genomes
## Description
Computes the J... | |
R_base_tools/strings.html7_99_0.txt | #### 14.4.3.1 Exercises
1. Find all words that come after a “number” like “one”, “two”, “three” etc. Pull out both the number and the word. | |
R_base_tools/stringr.html4_6_0.txt | As a corollary of the fact that strings have length, they also have associated
indices meaning that it is possible for me to specify that I want, say, the
second letter of a string
y <- "rstudio"
str_sub(y, start = 2, end = 2)
## [1] "s" | |
R_base_tools/stringr.html4_62_0.txt |
states <- data.frame(states = rownames(USArrests))
head(states)
## states
## 1 Alabama
## 2 Alaska
## 3 Arizona
## 4 Arkansas
## 5 California
## 6 Colorado
Using the ` dplyr ` package along with ` stringr ` functions introduced in
this lab, cr... | |
R_base_tools/R_base_all_185_2.txt |
not matter whether they are visible in the environment in which the generic is
defined.) As from R 3.5.0, the registration data base is searched after the
top level environment (see ` [ topenv
](/link/topenv?package=base&version=3.6.2) ` ) of the calling environment (but
before the parents of the top level environme... | |
R_base_tools/strings.html7_98_0.txt |
tibble(sentence = sentences) %>%
tidyr::extract(
sentence, c("article", "noun"), "(a|the) ([^ ]+)",
remove = FALSE
)
#> # A tibble: 720 × 3
#> sentence article noun
#> <chr> <chr> <c... | |
R_base_tools/R_base_all_417_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)
# contributors: R Project Contributors
## Description
The R Who-is-who, describing who mad... | |
R_base_tools/R_micropan_14_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)
# readHmmer: Reading results from a HMMER3 scan
## Description
Reading a text file produ... | |
R_base_tools/R_base_all_210_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)
# Foreign: Foreign Function Interface
## Description
Functions to make calls to compiled cod... | |
R_base_tools/R_base_all_330_1.txt | .subset2 ` are essentially equivalent to the `
[ [ ](/link/%5B?package=base&version=3.6.2) ` and ` [ [[
](/link/%5B%5B?package=base&version=3.6.2) ` operators, except that methods
dispatch does not take place. This is to avoid expensive unclassing when
applying the default method to an object. They should not normally ... | |
R_base_tools/R_base_all_157_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)
# seq.POSIXt: Generate Regular Sequences of Times
## Description
The method for ` [ seq ](/l... | |
R_base_tools/R_base_all_401_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)
# l10n_info: Localization Information
## Description
Report on localization information.
##... | |
R_base_tools/R_base_all_331_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)
# body: Access to and Manipulation of the Body of a Function
## Description
Get or set the b... | |
R_base_tools/strings.html6_5_0.txt | * Spanish
* Vietnamese
The stringr package provides a set of internally consistent tools for
working with character strings, i.e. sequences of characters surrounded by
quotation marks. | |
R_base_tools/strings.html6_22_0.txt | ## Order Strings
* ` str_order(x, decreasing = FALSE, na_last = TRUE, locale = "en", numeric = FALSE, ...)^1^ ` : Return the vector of indexes that sorts a character vector.
fruit[str_order(fruit)] | |
R_base_tools/stringr.html3_12_0.txt | 2. The opposite of ` str_pad() ` is ` str_trim() ` , which removes leading and trailing whitespace:
x <- c(" a ", "b ", " c")
str_trim(x)
#> [1] "a" "b" "c"
str_trim(x, "left")
#> [1] "a " "b " "c"
3. You can use ` str_wrap() ` to modify existing whitespace in order to wra... | |
R_base_tools/R_base_all_81_1.txt | d to UTF-8.
If ` attrib.as.set ` is true, as by default, comparison of attributes view
them as a set (and not a vector, so order is not tested).
If ` ignore.bytecode ` is true (the default), the compiled bytecode of a
function (see ` [ cmpfun ](/link/cmpfun?package=base&version=3.6.2) ` ) will
be ignored in the compa... | |
R_base_tools/R_base_all_229_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)
# cat: Concatenate and Print
## Description
Outputs the objects, concatenating the represent... | |
R_base_tools/strings.html6_23_0.txt | * ` str_sort(x, decreasing = FALSE, na_last = TRUE, locale = "en", numeric = FALSE, ...)^1^ ` : Sort a character vector.
str_sort(fruit)
## Helpers | |
R_base_tools/R_base_all_152_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)
# asplit: Split Array/Matrix By Its Margins
## Description
Split an array or matrix by its m... | |
R_base_tools/R_micropan_0_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)
# isOrtholog: Identifies orthologs in gene clusters
## Description
Finds the ortholog se... | |
R_base_tools/stringr.html3_26_0.txt |
a1 <- "\u00e1"
a2 <- "a\u0301"
c(a1, a2)
#> [1] "á" "aÌ"
a1 == a2
#> [1] FALSE
They render identically, but because theyâre defined differently, ` fixed()
` doesnât find a match. Instead, you can use ` coll() ` , explained below,
to respect human character comparison rules: | |
R_base_tools/R_base_all_266_1.txt | used.
` .onLoad ` , ` .onUnload ` , ` .onAttach ` and ` .onDetach ` are looked for
as internal objects in the namespace and should not be exported (whereas `
.Last.lib ` should be).
Note that packages are not detached nor namespaces unloaded at the end of an
R session unless the user arranges to do so (e.g., _via_ ... | |
R_base_tools/R_base_all_303_1.txt | artial matching of column names if
the match is unique, see ` [ Extract
](/link/Extract?package=base&version=3.6.2) ` ). The replacement method (for `
$ ` ) checks ` value ` for the correct number of rows, and replicates it if
necessary.
When ` [ ` and ` [[ ` are used with two indices ( ` x[i, j] ` and ` x[[i, j]]
` )... | |
R_base_tools/R_base_1_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)
# Constants: Built-in Constants
## Description
Constants built into R .
## Usage
... | |
R_base_tools/R_base_all_328_1.txt | dlls <- getLoadedDLLs()
getDLLRegisteredRoutines(dlls[["base"]])
getDLLRegisteredRoutines("stats")
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FgetDLLRegistere... | |
R_base_tools/R_base_all_224_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)
# eval: Evaluate an (Unevaluated) Expression
## Description
Evaluate an R expression in a ... | |
R_base_tools/R_micropan_20_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)
# rarefaction: Rarefaction curves for a pan-genome
## Description
Computes rarefaction c... | |
R_base_tools/R_base_all_350_1.txt | tracted by the ` units `
function, which also has a replacement form. If the units are changed, the
numerical value is scaled accordingly. The replacement version keeps
attributes such as names and dimensions.
Note that ` units = "days" ` means a period of 24 hours, hence takes no
account of Daylight Savings Time. Dif... | |
R_base_tools/stringr.html4_42_0.txt | Up until this point, the ` stringr ` functions we have introduced may seem a
bit limited in their usefulness. However, each of the above examples is
intended to provide an unambiguous illustration of how each of these functions
work. In this current section, we combine our ` stringr ` functions with
patterns produced b... | |
R_base_tools/R_base_all_107_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)
# as.POSIX*: Date-time Conversion Functions
## Description
Functions to manipulate objects o... | |
R_base_tools/R_base_all_394_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)
# is.finite: Finite, Infinite and NaN Numbers
## Description
` is.finite ` and ` is.infinite... | |
R_base_tools/R_base_3_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)
# integer: Integer Vectors
## Description
Creates or tests for objects of type ` "integer" `... | |
R_base_tools/R_base_all_361_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)
# substitute: Substituting and Quoting Expressions
## Description
` substitute ` returns the... | |
R_base_tools/strings.html7_25_0.txt |
str_sub(x, 1, 1) <- str_to_lower(str_sub(x, 1, 1))
x
#> [1] "apple" "banana" "pear"
### 14.2.4 Locales | |
R_base_tools/stringr.html4_29_0.txt | Question 1 Using the functions we have learned so far, modify the string
below to produce the string ` "United_States" `
s <- c(" UNITED STATES ") | |
R_base_tools/R_base_all_398_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)
# scale: Scaling and Centering of Matrix-like Objects
## Description
` scale ` is generic fu... | |
R_base_tools/R_base_all_244_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)
# invisible: Change the Print Mode to Invisible
## Description
Return a (temporarily) invisi... | |
R_base_tools/R_base_all_373_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)
# eapply: Apply a Function Over Values in an Environment
## Description
` eapply ` applies `... | |
R_base_tools/R_base_all_310_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)
# sweep: Sweep out Array Summaries
## Description
Return an array obtained from an input arr... | |
R_base_tools/strings.html6_37_0.txt | * ` [:alnum:] ` contains alphanumeric characters, including ` [:digit:] ` , ` [:alpha:] ` , ` [:lower:] ` , and ` [:upper:] `
* ` [:digit:] ` contains the digits 0 through 9 | |
R_base_tools/R_base_all_263_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)
# writeLines: Write Lines to a Connection
## Description
Write text lines to a connection.
... | |
R_base_tools/R_base_all_205_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)
# libPaths: Search Paths for Packages
## Description
` .libPaths ` gets/sets the library tre... | |
R_base_tools/stringr.html4_14_0.txt | In the second case, see see that one of the entries in annotated as ` 55* ` .
As we want to remove the annotation without losing the entry, we will need
some more tools. Problems such as this are the primary motivation for this
lab.
# Lab | |
R_base_tools/R_base_all_222_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)
# locales: Query or Set Aspects of the Locale
## Description
Get details of or set aspects o... | |
R_base_tools/R_base_all_43_2.txt | ble and the names of the base time zone and the alternate (daylight-
saving) time zone. Sometimes this may just be of length one, giving the [ time
zone ](/link/time%20zone?package=base&version=3.6.2) name.
` "POSIXct" ` objects may also have an attribute ` "tzone" ` , a character
vector of length one. If set to a non... | |
R_base_tools/strings.html6_21_0.txt | * ` str_trim(string, side = c("left", "right", "both")) ` : Trim whitespace from the start and/or end of a string.
str_trim(str_pad(fruit, 17))
* ` str_squish(string) ` : Trim white space from each end and collapse multiple spaces into single spaces.
str_squish(str_pad(fruit, 17, "both"... | |
R_base_tools/R_base_all_193_1.txt | the default is only appropriate when writing and then reading
files on the same platform).
## See Also
The ‘R Data Import/Export’ manual.
` readChar ` to read/write fixed-length strings.
` [ connections ](/link/connections?package=base&version=3.6.2) ` , ` [
readLines ](/link/readLines?package=base&version=3.6.2) ... | |
R_base_tools/R_micropan_21_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)
# prodigalPredict: Gene predictions using Prodigal
## Description
Finds coding genes in ... | |
R_base_tools/stringr.html4_22_0.txt | Like all ` stringr ` functions, this is vectorized, meaning that we can do
this on a vector of character strings.
# A vector of hypothetical ids
ids <- c("M289", "M432", "F201", "M365")
ids <- str_replace(string = ids, pattern = "M", replacement = "MALE")
ids
## [1] "MALE28... | |
R_base_tools/R_base_all_116_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)
# list: Lists -- Generic and Dotted Pairs
## Description
Functions to construct, coerce and ... | |
R_base_tools/R_base_all_327_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)
# taskCallbackManager: Create an R-level Task Callback Manager
## Description
This provides ... | |
R_base_tools/R_base_all_311_1.txt | gh ls is in pos = 3
exists("ls", 2, inherits = FALSE) # false
## These are true (in most circumstances):
identical(ls, get0("ls"))
identical(NULL, get0(".foo.bar.")) # default ifnotfound = NULL (!)
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp... | |
R_base_tools/R_base_all_231_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)
# Extract: Extract or Replace Parts of an Object
## Description
Operators acting on vectors,... | |
R_base_tools/R_base_all_257_1.txt | used.
Junction points and symbolic links are followed, so information is given about
the file/directory to which the link points rather than about the link.
## See Also
` [ Sys.readlink ](/link/Sys.readlink?package=base&version=3.6.2) ` to find
out about symbolic links, ` [ files ](/link/files?package=base&version=... | |
R_base_tools/R_base_all_30_1.txt | s&utm_term=eigen&utm_content=run_example_in_workspace)
# NOT RUN {
eigen(cbind(c(1,-1), c(-1,1)))
eigen(cbind(c(1,-1), c(-1,1)), symmetric = FALSE)
# same (different algorithm).
eigen(cbind(1, c(1,-1)), only.values = TRUE)
eigen(cbind(-1, 2:1)) # complex values
eigen(print(cb... | |
R_base_tools/R_base_all_1_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)
# Random: Random Number Generation
## Description
` .Random.seed ` is an integer vector, con... | |
R_base_tools/R_base_all_195_1.txt | 1234
sqrt(1i) # remember elementary math?
utils::str(0xA0)
identical(1L, as.integer(1))
## You can combine the "0x" prefix with the "L" suffix :
identical(0xFL, as.integer(15))
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace... | |
R_base_tools/stringr.html4_4_0.txt | Strings have a number of unique properties that will be helpful to keep in
mind; one of these is the concept of length. When we refer to the length of a
string, we are referring to the number of characters that the string contains:
# This is both a string and a vector of length 1
y <- "four"
... | |
R_base_tools/R_base_all_187_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)
# serialize: Simple Serialization Interface
## Description
A simple low-level interface for ... | |
R_base_tools/strings.html7_54_0.txt | 2. Empirically verify the rule “i before e except after c”.
3. Is “q” always followed by a “u”? | |
R_base_tools/strings.html7_39_0.txt | 1. Explain why each of these strings don’t match a ` \ ` : ` "\" ` , ` "\\" ` , ` "\\\" ` .
2. How would you match the sequence ` "'\ ` ? | |
R_base_tools/R_base_all_351_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)
# lapply: Apply a Function over a List or Vector
## Description
` lapply ` returns a list of... | |
R_base_tools/strings.html6_27_0.txt | Regular expressions, or regexps , are a concise language for describing
patterns in strings.
### Need to Know | |
R_base_tools/R_base_all_7_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)
# length: Length of an Object
## Description
Get or set the length of vectors (including lis... | |
R_base_tools/R_base_all_352_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)
# bindenv: Binding and Environment Locking, Active Bindings
## Description
These functions r... | |
R_base_tools/R_base_all_270_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)
# as.function: Convert Object to Function
## Description
` as.function ` is a generic functi... | |
R_base_tools/R_base_all_346_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)
# socketSelect: Wait on Socket Connections
## Description
Waits for the first of several soc... | |
R_base_tools/strings.html7_28_0.txt |
x <- c("apple", "eggplant", "banana")
str_sort(x, locale = "en") # English
#> [1] "apple" "banana" "eggplant"
str_sort(x, locale = "haw") # Hawaiian
#> [1] "apple" "eggplant" "banana"
### 14.2.5 Exercises | |
R_base_tools/R_base_all_55_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)
# system.file: Find Names of R System Files
## Description
Finds the full file names of file... | |
R_base_tools/R_base_all_171_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)
# row+colnames: Row and Column Names
## Description
Retrieve or set the row or column names ... | |
R_base_tools/strings.html7_125_0.txt | 2. What are the five most common words in ` sentences ` ?
## 14.6 Other uses of regular expressions | |
R_base_tools/stringr.html4_16_0.txt | ## stringr
The ` stringr ` package, as the name implies, was created to assist with the
manipulation of strings in ` R ` . The motivation for string manipulation
arises from a number of avenues. Often, there are issues with data entry,
making it difficult to use and manipulate data as intended; this is what we
saw in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.